Retrieving the program details for lead activities

AshimaB2
Level 1

Retrieving the program details for lead activities

Hi,

 

I want to know the details of the program for which a lead has performed an activity say Email Opened, Delivered etc. While doing bulk extract for the activities, I see a campaign Id field as part of the dump. Is it same as program Id? I did try to match for some and while it does match for the ones I checked but I am not sure. Or does it vary based on the type of the program?

 

Thanks! 

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: Retrieving the program details for lead activities

Let’s rewind for a moment. It doesn’t sound like you have a full grasp on what a Program is vs. a (Smart) Campaign in Marketo.

 

An activity like Opened or Delivered need not have any relationship to a Marketo Program at all.

 

Yes, if the email was sent because of the default batch send of an Email (mailbox) type of Program, we can visualize those activities using a canned report, which you may want to try to duplicate in a separate tool.

 

But that’s far from the only way someone can receive an email. They can get it as part of a Smart Campaign that has no parent Program at all. Or they may get it as part of a Smart Campaign that’s within a Program, but there can be unlimited other Smart Campaigns within the same Program. There may be a trigger Campaign in one global Program that responds to activities in all other Programs.

 

So to avoid an XY Problem, why don’t you start by explaining in detail what you’re trying to surface outside of Marketo, using the Marketo terms for each activity/attribute?

Darshil_Shah1
Level 10 - Community Advisor

Re: Retrieving the program details for lead activities

Campaign and programs are very different things in Marketo - and assuming to search a program in Marketo with the campaign id returned by the Activity endpoint is not gonna work in most cases. The Program ID is not something that is returned in an Activity Call specifically. If retrieval of program id is your ultimate goal - you can use the Get Campaign API Call with the Campaign ID you obtained in the Activity extract to get the Program ID (look for the value of "parentProgramId" attribute in the JSON response). Also, As Sandy mentioned, there is possibility that the campaign returned by the Activity extract API may not be created under a program - XY problem.

 

Hope this helps. 🙂