Relevant to: Demand Acceleration Platform
This article shows how you can send data from the Demand Acceleration Platform to create one or more Marketo Custom Objects and/or Custom Activities.
You need to have 1) connected your Marketo account with the Demand Acceleration Platform, and 2) have set up the integration on your Campaign/Source. |
|
Connecting to Marketo | Setting up a Source Integration to Marketo |
After configuring the Campaign/Source mapping, you have the option* to add data to a Marketo Custom Object and/or Custom Activity (in addition to the lead object).
* This feature is available as an optional extra. Speak with your Customer Success Manager if you would like to use this functionality. |
In this article
Writing to Marketo Custom Objects
Adding Custom Objects will result in two API calls to your Marketo instance. This is important to note because these two API calls will contribute to your Marketo limits. |
If you utilize Custom Objects in Marketo and would like to send data there from the Demand Acceleration Platform, you can configure this in a Campaign/Source Integrations tab. You can read more about Marketo's Custom Objects in Understanding Marketo Custom Objects.
Marketo recommends that you use Custom Objects to track the metrics that are specific to your business. An example of this could be to track the third party content publishers that your leads have interacted with over time, instead of overwriting a single Source field value on the lead object.
Note that all Marketo Custom Objects will always have one or more link fields (fields that determine which lead the Custom Object should be associated with). Typically, this will be the email address of the lead, but in some cases, you may prefer to use the Marketo Lead ID as the correlation field.
If you are using the Marketo Lead ID as the correlation field, you can make use of the Marketo Lead ID token in the Demand Acceleration Platform. When a lead is passed to Marketo, the Demand Acceleration Platform captures the Marketo Lead ID, which can then be populated in the appropriate field as a token (more detail on this later).
1. In a Campaign/Source, go to the Integrations tab.
2. Hover of the Marketo tile and click the Settings icon.
3. This will open the integration settings, which should have been configured your Marketo integration in your Campaign/Source.
4. Scroll down and expand the Custom Objects section.
5. Click the Add A New Custom Object… drop-down arrow to select the Custom Object that you want to use.
It may take a few seconds for the list of Custom Objects to become available because the 'Add a New Custom Object...' button uses the Marketo API to retrieve the list. |
6. Once you select from the list of available Custom Objects, all related fields within Marketo will be dynamically displayed in the Output column.
If changes are made to the fields in Marketo, you will need to remove and re-add the Custom Object in the Demand Acceleration Platform. |
7. In the Field column, select the Campaign/Source field name (as defined on the Fields Tab) that corresponds to the Output field (ie. the Marketo Custom Object field name).
If you want to use a token or add a static value, select Custom Field from the list in the Field column.
Common examples of tokens used in set-up of Marketo Custom Objects include:
- Integrate Lead ID: {{lead.Id}}
- Marketo Lead ID: {{append.marketo.id}}
Testing Marketo Custom Objects
Once you have mapped the fields to your Custom Objects, send a test lead to check that the integration is successfully set up. Click the Test Integration button and follow the steps outlined in Testing a Marketo Integration.
The first two sections, Request and Response relate to the lead object.
Scroll down to view two additional sections: Custom Object Request and Custom Object Response.
Custom Object Request
{ "action": "createOrUpdate", "input": [ { "AssetName": "How Dunder Mifflin cut lead costs by 50%", "CorrelationId": "1234567", "EmailLink": "test+9@integrate.com", "MediaBuyDetail": "Test value" } ], "dedupeBy": "dedupeFields" }
Custom Object Response
The Marketo success code is displayed in the reasonCode.
{
"marketoResponse": {
"requestId": "10cf2#17652355c75",
"success": true,
"result": [
{
"id": null,
"status": "updated",
"code": null,
"message": null,
"seq": "0",
"marketoGuid": "5a8d75b7-3e41-4f39-bbc4-b4b372c24f04",
"reasons": [],
"errors": []
}
],
"errors": [],
"reasonCode": {
"reason": "Accepted",
"statusCode": 200
}
},
"errors": [],
"endpoint": "/rest/v1/customobjects/emailLinkObj.json",
"handleTimeout": false,
"failed": false
}
If you see any errors on the Custom Object Response, see Interpreting Marketo Post Out Responses & Common Errors.
The Custom Object integration is now complete. You can add more than one Custom Object to a Campaign/Source - repeat the above steps to add another Custom Object to your integration. |
Writing to Marketo Custom Activity
Adding Custom Activities will result in two API calls to your Marketo instance. This is important to note because these two API calls will contribute to your Marketo limits. |
If you utilize Custom Activity in Marketo and would like to send data there from the Demand Acceleration Platform, you can configure this in a Campaign/Source Integrations tab. You can read more about Marketo's Custom Activities in their documentation, Understanding Marketo Custom Activities.
Custom Activities help you track an activity that isn't related to a Marketo form, email or landing page. A common use for a Marketo Custom Activity is to store leads' attendance at webinars or events.
Writing to Custom Activities will always create a new Activity (rather than update an existing one). See Understanding Marketo Custom Activities for more information. |
1. In a Campaign/Source, go to the Integrations tab.
2. Hover of the Marketo tile and click the Settings icon.
3. This will open the integration settings, which should have been configured your Marketo integration in your Campaign/Source.
4. Scroll down and expand the Custom Activities section.
5. Click the Add A New Custom Activity… drop-down arrow to select the Custom Activity that you want to use.
It may take a few seconds for the list of Custom Activities to become available because the 'Add a New Custom Activity...' button uses the Marketo API to retrieve the list. |
6. Once you select from the list of available Custom Objects, all related fields will be displayed in the Output column.
7. You will need to either map Campaign/Source fields to these, use tokens for dynamic values or add a static value in the Custom column textbox (next to the field).
In the Field column, select the option you want to use.
Testing Marketo Custom Activities
Once you have mapped the fields to your Custom Activity, send a test lead to check that the integration is successfully set up. Click the Test Integration button and follow the steps outlined in Interpreting Marketo Post Out Responses & Common Errors.
The first two sections, Request and Response relate to the lead object.
Scroll down to view two additional sections: Custom Activities Request and Custom Activities Response.
Custom Activities Request
{ "input": [ { "activityDate": "0001-01-01T00:00:00+00:00", "leadId": "1147015", "activityTypeId": "100018", "primaryAttributeValue": "Example Webinar" } ] }
Custom Activities Response
The Marketo success code is displayed in the reasonCode.
{
"marketoResponse": {
"requestId": "100c3#1762984a503",
"success": true,
"result": [
{
"id": 394406,
"status": "added",
"code": null,
"message": null,
"seq": null,
"marketoGuid": "394406",
"reasons": [],
"errors": []
}
],
"errors": [],
"reasonCode": {
"reason": "Accepted",
"statusCode": 200
}
},
"errors": [],
"endpoint": "/rest/v1/activities/external.json",
"handleTimeout": false,
"failed": false
}
If you see any errors on the Custom Activities Response, see Interpreting Marketo Post Outs & Common Errors.
Your Custom Activity integration is now complete. You can add more than one Custom Activity to a Campaign/Source - repeat the above steps to add another Custom Activity to your integration. |
Recommended Reading
- Setting up an Integration to Marketo
- Testing a Marketo Integration
- Interpreting Marketo Post Out Responses & Common Errors
- Understanding Marketo Custom Objects
- Understanding Marketo Custom Activities