Custom write to Campaign Log Record (CampaignLogRecord)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mfliorko
    Junior Member
    • Jun 2023
    • 28

    Custom write to Campaign Log Record (CampaignLogRecord)

    Currently, CampaignLogRecord contains records of Mass Email campaign activities - Sent, Opened, Opted Out, etc.
    We figured out that CampaignLogRecord can be extended for tracking activities of other types of campaigns.

    We tried to send POST request via API:
    Code:
    https://espo.insoftex.com/api/v1/Campaign/{campaignId}/campaignLogRecords
    and body like
    Code:
    [
      {
        "campaignId": "{campaign id, e.g., 0123456789>",
        "campaignName": "{...some campaign name...}",
        "parentId": "{contact id, e.g., 0123456789}",
        "parentType": "Contact",
        "parentName": "{...some contact name...}",
        "application": "Espo",
        "action": "Sent",
        "actionDate": "2025-01-06",
        "objectId": null,
        "objectType": null
        "objectName": "",
        "queueItemId": null,
        "isTest": false,
        "data": null,
        "stringData": null,
        "stringAdditionalData": null
      }
    ]
    the request returns Ok code with an inner response "false". And no records are added to CampaignLogRecord. The table is special, you cannot amend it in Entity Manager.

    My question is rather conceptual - does EspoCRM support adding new records to CampaignLogRecord via API?
    If yes, what should we change in the sample code above?
  • yuri
    Member
    • Mar 2014
    • 8510

    #2
    It's not possible this way. You would need to create a custom API route and implement it.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    Working...