Marketo Webhooks allow you to integrate external applications with your Smart Campaigns in Marketo. To do this, you must configure the webhook with the proper settings.
| Webhook Name | A name of your choosing. |
| Description | A description of your choosing. |
| URL | The URL to your Banjo webhook, in the form https://yourstore.banjoplatform.com/marketo/webhook/. |
| Request Type | Always set to POST. |
| Template | A JSON template. See example below. |
| Request Token Encoding | Set this to JSON so that Marketo properly escapes quotes inside of tokens. Note: do not wrap your tokens in double quotes if you set this to JSON. |
| Response type | Always set to JSON. |
Example Template:
The JSON object below is an example template for a Marketo Webhook. The contents of the
data object will vary, depending on the nature of your product. {
"leadId": {{lead.Id}},
"sku": {{my.SKU}},
"qty": 1,
"address": {
"name": {{lead.Full Name}},
"street": {{lead.Address}},
"city": {{lead.City}},
"state": {{lead.State}},
"postcode": {{lead.Postal Code}}
},
"data": {
"name": {{lead.Full Name}},
"contact_name": {{lead.Sales Rep}},
"contact_number": {{lead.Sales Phone}},
"promo": {{my.Promo Code}}
}
}
Authorization and Content-Type Headers
In order to successfully access the Platform, Marketo must send a custom header with the proper API credentials. Click "Webhooks Actions > Set Custom Header" and then provide an "Authorization" header. Replace the X's with your API token for Banjo.
To retrieve your Banjo API token, follow these steps:
- Log in to your instance of Banjo.
- Navigate to My Account > My API Tokens.
- Copy one of the API tokens or click the Add New Token button to create a new token.
You must also set the "Content-Type" header to "application/json" otherwise the API will be unable to handle your request.
Example Webhook Integration in a Marketo Campaign
Here, we created a Webhook called "Send Banjo Postcard" to trigger a postcard sent through the Banjo platform. Then, as pictured, inside the "01-Send Invitation" smart campaign, the Webhook is being called. Immediately following the Webhook, the Program Status is updated. This demonstrates how to send a postcard invitation for an event and then track the status in Marketo.
