Need Help with capturing Custom Object's data in Marketo Webhooks

milanjain2208
Level 2

Need Help with capturing Custom Object's data in Marketo Webhooks

Hi,

We have established a custom object, 'Application,' which is connected to the 'Person' object in a many-to-many fashion. Here is the schema for the 'Application' custom object:

 

{
  "applicationID": "123",
  "status": "Completed",
  // ...other application-related data
}

 

Our objective is to monitor and record all 'Email Delivered' related activities that occur within Marketo and store them in our system's database. Whenever the status of an application changes, an email is sent to the leads associated with that particular application.

To accomplish this, we have configured a webhook in Marketo that triggers whenever an email is delivered.

milanjain2208_0-1702533623486.pngmilanjain2208_1-1702533650591.png

 

This webhook sends a request to one of our endpoints with the following request payload:

 

{
  "leadEmail": {{lead.Email Address}}, // Lead's email
  "triggerName": {{trigger.Trigger Name}}, // Email Delivered
  "Name": {{trigger.Name}}, // Name of the email asset
  "TriggerSubject": {{trigger.Subject}}, // Email's subject
  "sentDateTime": {{system.dateTime:default=edit me}} // Time when the above campaign was executed
}

 

 

Problem=> I would like to include the 'applicationID' of the custom object record in the request payload. This would allow me to save the details based on the 'applicationID' (which serves as the primary key) instead of the lead's email address.

Unfortunately, I haven't been able to retrieve the 'applicationID' in the request payload. Is there a method or workaround to obtain the 'applicationID' of the custom object for which the email was sent?

Thanks in advance.

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Need Help with capturing Custom Object's data in Marketo Webhooks

You can’t access that data in the webhook payload.

 

I recommend keeping a separate copy of CO data if you need to maintain references to it in an external system.

 

Alternately, you can have a webhook-enabled service loop back and use the REST API to read the COs. Of course, depending on how many Email Delivered events you’re processing per day, that could be deeply impractical given API call limits.