SOLVED

Re: How to get lead activity data for particular email PROGRAM through API ?

Go to solution
juliamunkhzul
Level 2

How to get lead activity data for particular email PROGRAM through API ?

is it possible to filter program name or id when exporting activities through api?

 either rest/v1/activities.json or bulk/v1/activities/export/create.json it's returning mixed activities for all campaigns

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: How to get lead activity data for particular email PROGRAM through API ?

There’s not, only by the asset itself (e.g. in the case of Send Email, the numeric Email ID).

 

You should be prepared to filter activities on the client side; one advantage of the paginated API in this regard is you can stream data and remove unwanted entries on the fly. Still, the data will go over the wire.

View solution in original post

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: How to get lead activity data for particular email PROGRAM through API ?

There’s not, only by the asset itself (e.g. in the case of Send Email, the numeric Email ID).

 

You should be prepared to filter activities on the client side; one advantage of the paginated API in this regard is you can stream data and remove unwanted entries on the fly. Still, the data will go over the wire.

juliamunkhzul
Level 2

Re: How to get lead activity data for particular email PROGRAM through API ?

Thank you @SanfordWhiteman 
for rest/v1/activities.json?nextPageToken=token api, do you know what is this campaignId? it is not matching program id. How can i know this activity belongs to which email program? 

 {
            "id": 79,
            "marketoGUID": "79",
            "leadId": 11,
            "activityDate": "2024-06-14T20:30:22Z",
            "activityTypeId": 6,
            "campaignId": 1036,
            "primaryAttributeValueId": 18,
            "primaryAttributeValue": "Demo June 14.demo june 14",
            "attributes": [
                {
                    "name": "Campaign Run ID",
                    "value": 10
                },
                {
                    "name": "Choice Number",
                    "value": 0
                },
                {
                    "name": "Step ID",
                    "value": 25
                },
                {
                    "name": "Campaign",
                    "value": "Email Batch Program-1009-send-email-campaign"
                }
            ]
        },
 
SanfordWhiteman
Level 10 - Community Moderator

Re: How to get lead activity data for particular email PROGRAM through API ?

That’s the Smart Campaign ID. Every Campaign is inside a Program or a Folder.