I am trying to pull all the registrations on the landing pages. I pull all the activities for form filled using activity ID 2 and it does not have a program or camapaign ID. Is it possible to know the program name for a given activity?
Hi Naresh,
It should have the program name but not the ID.
-Greg
Hi Greg,
Thank you for your response. I am not getting program name in my response for activities.json and as per the endpoint reference documentation they are saying campaign id is optional and they do not list program name. Please let me know if I missing something.
Thanks,
Naresh
This question belongs to the "products" section. The "community" one is for question about the community itself.
-Greg
Thank you, I have changed to Products.
More people will see it there, and you will be more likely to get some other answers.
-Greg
Currently Program is indeed not returned via the API. Most customers are extracting "Change Status in Progression" (= Program Status changes), activity ID 104. Generally, a Form submission will result in a Program Status change, and this will return the Program Name/ID.
If you really need to tie the Form submission to a Program, use "List Folders" API to download all folders to a local database. Lookup the Form Folder ID and traverse the folder tree until you hit a folder of type "Marketing Program". That is your Program.
I have filed an enhancement request to return Program Name as part of the Form activity API, but I don't know if/when that would be implemented.
Is this still the best approach, or have there been any changes to the API to make this easier?
Filled Out Form activities have the same response payload as of this writing.
But if you're using Program-specific forms on Marketo-hosted LPs (which you probably are, in order for the folder-traversal workaround to even be considered) you can add the built-in {{Program.Id}} variable as a hidden field to the form! Just give the field any name, like currentProgramId:
MktoForms2.whenReady(function(form){
form.addHiddenFields({
currentProgramId : +"{{Program.Id}}"
});
});
And it will show up in the API results in the Form Fields complex value.