SOLVED

API questions: Engagement Programs Activity

Go to solution
Highlighted

API questions: Engagement Programs Activity

I am trying to build a report outside of Marketo similar to an Email performance report, after extracting to a data warehouse activity types 6,7,8 and more through Bulk API.

Everything was going well until I realized that Engagement Programs, if they are found in activity 6 under a Campaign ID, don't seem to be tied to a Program ID, and therefore I can't get an Email Name. Actually, the Campaign ID for those engagement programs is a SmartList, found under the SmartList asset endpoint, without Program attribute, whereas the regular email programs are found as attributes of the Campaign in the Campaign endpoint as any one would expect...

How can I find the Program Name associated to a Engagement Program Activity entry?

Sanford Whiteman‌ wrote:

There's no exposed Activity Type ID for the cast as separate from the send. 

 You would have to triangulate this (roughly) by aggregating their last stream ID change (which is a separate event) with the send.

I am not sure if that could be a clue, as I cannot make sense of that explanation: where would I find that Cast transaction entry to match with the send?

Cheers,

Frederic

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: API questions: Engagement Programs Activity

Yes, it is confusing. It all starts with the fact that there is no direct relationship between an Email and a Program, or a Smart Campaign and a Program. You have to infer based on the location in the folder structure. Email returns the folderValue (ID) and folderType ("Folder" or "Program"). If this type is Program, you have found your Program, but if the Email is inside a nested folder within the Program, you have to use the "Get Folder" API to find the parent folder and see if that is a Program, and so forth. 

Some customers use Programs inside Engagement Programs, with the Email being located in the nested Program: in that case you need to make sure you pick the correct Program when moving up the folder structure. 

If the 'deprecated' API call does what you need, I would definitely keep using it. It will not go away anytime soon. 

View solution in original post

7 REPLIES 7

Re: API questions: Engagement Programs Activity

For activity type 6, the primaryAttributeValueId should contain the ID of the Email. I assume that Email lives inside the Engagement Program, so that way you can look it up. 

Since the Smart Campaign in an Engagement Program is embedded (= Hidden), that is probably not a good way to get to the Program. I assume for regular emails you are looking at the Campaign Name and then determining the Program name by looking at everything before the period?

Highlighted

Re: API questions: Engagement Programs Activity

Your assumption is right, in type 6, I find the Campaign ID, and in the Campaign table I find the Program ID and Program Name, which is what I need to report on performance by Program. Works great for regular emails, but not for Engagement Programs which don't seem to be tied to a Campaign..

Following your logic by Email ID, if I use the /rest/asset/v1/emails.json endpoint, I am getting those fields:
pastedImage_1.png

How can I find which engagement program the email belongs to?

I am quite confused, because the /rest/v1/campaigns.json endpoint, shows me this:

pastedImage_4.png

and that is great because I have the Program in there, but Engagement Programs are not listed in that table...

I find Engagement Programs under the Smart Campaigns endpoint /rest/asset/v1/smartCampaigns.json :
pastedImage_5.png

But then, no Program available here!

And to make it even more confusing, Marketo states not to use /rest/v1/campaigns.json, as it is deprecated:

pastedImage_7.png

What's the missing link between SmartCampaigns and Programs for Engagement Programs?

Highlighted

Re: API questions: Engagement Programs Activity

Yes, it is confusing. It all starts with the fact that there is no direct relationship between an Email and a Program, or a Smart Campaign and a Program. You have to infer based on the location in the folder structure. Email returns the folderValue (ID) and folderType ("Folder" or "Program"). If this type is Program, you have found your Program, but if the Email is inside a nested folder within the Program, you have to use the "Get Folder" API to find the parent folder and see if that is a Program, and so forth. 

Some customers use Programs inside Engagement Programs, with the Email being located in the nested Program: in that case you need to make sure you pick the correct Program when moving up the folder structure. 

If the 'deprecated' API call does what you need, I would definitely keep using it. It will not go away anytime soon. 

View solution in original post

Highlighted

Re: API questions: Engagement Programs Activity

Wow, impressive...  Thanks a lot for the guidance, this seems to work, but it's gonna be a real pain to iterate through the folder levels...

This begs the question: how do Marketo display seamless email performance reports with all type of email programs:

pastedImage_1.png

Is it just that they can use internal joints not available through API?

Highlighted

Re: API questions: Engagement Programs Activity

Yeah, the UI works directly on the database. It doesn't use the REST API

Highlighted

Re: API questions: Engagement Programs Activity

Hi Jep,

 

Hoping you can shed some light on the Email Programs: can I also navigate the folders as you described to find them?

Highlighted

Re: API questions: Engagement Programs Activity

Jep,

Will this logic of using folders also work for Email Programs?

Cheers,

Frederic