Questions on Retrieving and Generating Marketo Activities Data

Level 1

Questions on Retrieving and Generating Marketo Activities Data

Hi. I am a developer and I want to build a system to retrieve Marketo activities like Email Delivered, Click Email, Unsubscribe Email via Activity Bulk Export API to compute campaign performance (Open Rate, Unsubscribe Rate, Unsubscribe Click Rate etc.).  The result should be similar with what is computed in smart campaign email tab.

Screen Shot 2020-11-03 at 1.50.39 PM.png


1. About retrieving data and campaign run id field

The campaign could be sent to some leads in one day and some other leads in the other day. I want to get performance separately for each sending. For example if a campaign send 1000 emails on 11/01 with 500 opened and 1000 leads on 11/02 with 300 opened, the computation result should be:


Date Open Rate ...
11/01 50% (500/1000)  
11/02 30% (300/1000)  
Overall 40% (800/2000)  

However it would be hard if I log all leads that are sent for each day and filter following open/click activities by lead.

Based on the response of the activity, I think the campaign run id could work for my use case.


    "attributes": [
            "name": "Campaign Run ID",
            "value": 1234567


 It seems that for all emails that are sent in the same batch run has the same campaignRunId for Email Send, Email Delivered, Open Email, Click Email activities even if they happen at different time.


I did not find documentation about campaign run id, so I want to confirm if it will work as my expectation. Also,

1.1 what is the definition of campaignRunId,

1.2 how does it increase, can I assume campaign run id in a later date is always larger than the previous date

1.3 is campaignRunId unique across different campaigns in Marketo instance



2. About testing in sandbox


There are one sandbox instance and one prod instance. Emails are only sent in prod instance and there is no Email Activities in the sandbox. However, I want to test the system in pre-prod which uses the sandbox. Based on this post, it is not allowed to create activity data in marketo. I wonder if we have other workaround now? I have following activities that will be used for computing campaign performance.


  • Email Delivered
  • Click Email
  • Send Email
  • Unsubscribe Email
  • Email Bounced
  • Email Bounced Soft

If I have to trigger the activities via real action, as 1) some activities expires for 3 months, 2) I want to reduce all risks that test campaign in sandbox sending email to real customer, I wonder if there is any automatable way to trigger Marketo activity via some static URL instead of simulating the whole process of sending email and click link in the email?


I am new to Marketo and not very familiar with Marketo UI of setting up campaign and sending an email. Sorry if some questions are already discussed before. Thank you in advance.