adding contact’s activities endpoint to a table
AnsweredConnector name: activecampaign
Table name: contact_activities (new table)
API documentation link:
https://developers.activecampaign.com/reference/list-contact-activitieshttps://developers.activecampaign.com/reference/list-all-email-activities
Additional details:
Our use case
Most ActiveCampaign contacts are also our customers, so linking email activity to our own data lets us analyse campaign performance in much more depth than ActiveCampaign's own reporting can.
Our current setup
We don't call the ActiveCampaign API ourselves. All our ActiveCampaign data comes in through two Fivetran connectors:
- Fivetran webhook connector: gives us opens and clicks per contact ID. This works well.
-
Fivetran ActiveCampaign connector: we use the
email_activitytable to see when emails were sent and to which contacts.
Because we rely only on these connectors, we can only use the tables and relationships in your ERD (https://fivetran.com/connector-erd/activecampaign). Based on that ERD, the only way to link a sent email to its campaign would be email_activity.messageid → campaign.
The problem
For campaign and automation sends, messageid is always empty in email_activity. ActiveCampaign support confirmed this is expected behaviour for /api/3/emailActivities. No parameter fills it in, and that endpoint doesn't return campaignid. As a result, the tables Fivetran currently syncs give us no reliable way to connect a "sent" activity to its campaign.
What ActiveCampaign recommends
ActiveCampaign support pointed us to the published activities endpoint:
GET /api/3/contacts/{contactId}
GET /api/3/activities?contact={contactId}&orders[tstamp]=DESC&include=reference.log.message,reference.log.campaign,reference.message,reference.campaign,reference.link
In this response, sent logs and engagement records include both campaignid and messageid, and the subject comes through the sideloaded message data. This works for both campaign and automation emails.
We can't use this ourselves, because we don't work with the API directly. That's why we're asking whether Fivetran can support it in the ActiveCampaign connector.
Our request
- Add a
contact_activitiestable based on/api/3/activities, includingcampaignid,messageid, activity type and timestamp, and the contact reference. - Sync the sideloaded relationships (
log,message,campaign,link) as related tables or columns, so sent activities can be joined to campaigns and messages. - If that's not possible, please tell us whether there's another way to get
campaignidfor sent activities within the current connector schema.
We'd rather not build and maintain our own API extraction next to the Fivetran connectors just for this relationship. Native support in the ActiveCampaign connector would be very valuable for us.
-
Official comment
Hi Famke,
Thank you for the detailed write-up.
We have added this to our active backlog and are reviewing how to expose campaign and message identifiers for sent activities in the ActiveCampaign connector. Roughly how many contacts does your account have? That will help us understand the sync volume we need to plan for. We will keep you updated on this thread as we make progress.
Best,
Syead Mujtaba Imam Rizwi
Please sign in to leave a comment.
Comments
1 comment