This article will walk you through how to set up a Marketo Webhook, so that it can call an Openprise API Factory job or bot. This process assumes you have already enabled API Factory in Openprise, and created your job(s) and or bot. You can learn more about how to configure API Factory here.
In your Marketo system, the Webhook will be triggered by a Smart Campaign.
Configuring the Webhook
In Marketo, go to the Webhook page and create a new webhook. (Admin Integration Webhooks)
-
URL - copy the URL from the API Factory enabled BOT or Job you had previously configured.
- Click on the "View API Docs" icon.
-
- The URL can be found in "Sample Request/Response" popup in Openprise.
-
Payload Template - The content of the payload template are the fields in Marketo you want to send to the Openprise API Factory bot or job to be used in processing. These are in the form of a key/value pair. The first part, or key, is the Openprise attribute name used in the job. The second part, or value, is the Marketo field name. In the following example, the Openprise attribute name is 0P Email, and the Marketo field name is lead.Email Address. When creating or editing the payload template, take care to preserve all brackets and braces as this "punctuation" is essential.
- Sample payload [ { "0P Email": {{lead.Email Address:default=edit me}} } ]
- Request Token Encoding - Set this value to JSON.
- Request Type - Set this value to POST.
- Response Format - Set this value to JSON.
- Used by: this value is supplied by Marketo.
The Response mapping section is used if the Openprise API Factory job is returning data to Marketo via the Webhook. This section does not need to be configured if you are not expecting data to be returned.
- Response Attribute: Please use the sample format shown in the image below for the Response Attribute. Note that the "data[0]." portion is required and is followed by the Openprise attribute name.
- Marketo Field: Use the picklist to select the corresponding Marketo Field to receive the returned data value.
Set the Webhook Custom Header
You will need to set up the API Key and Pod name in a custom header under Webhook Actions inside Marketo.
- API Key - the API key can be found in the "Sample Request/Response" popup under "Request Header".
- Content-type: must be selected as "application/json"
- podName: Please check with your Customer Success Manager for the appropriate podName
Call the Webhook in Your Smart Campaign
Please refer to Marketo documentation for instructions on calling a webhook. Below is a screenshot of a sample webhook call for your reference.
Testing
When testing your webhook, you need to trigger a person record to be added to your Smart Campaign. Then, to see if everything was set up correctly, look in the following locations to verify proper setup:
- Check the Smart Campaign Results log to verify the webhook was called.
- Check the person record's activity log for validation that the webhook was called.
- Check the outputs of the Openprise API Factory job to see if a record was received. Each record received and processed have the following attributes added:
- OP Request ID: this is a unique ID assigned to each record received by Openprise API Factory.
- OP Request Received Time: This is the time the record was received by Openprise and is in UTC time.