Please note: This article has recently been updated to reflect the new Forms endpoint. See here for more.
Introduction
You can use the HTTP Integration to integrate to a variety of API Endpoints. An example of where you can do this is with Marketo Forms.
If you are unable to integrate directly into a Marketo instance using the direct Integrate to Marketo or Integrate to Marketo Program jobs, then you may be able to do this using HTTP Integration.
While the two integrations mentioned above are the best ways to submit leads into Marketo securely and provide more transparency on a lead's status when being submitted, you may need to use the HTTP integration for the following reasons:
- Your client is unable to provide you access to the Marketo instance required for direct integration
- Your client has provided you with a Marketo form to submit to, which cannot be achieved with direct integrations
In general, you will be able to tell which integration you need by the data you've been provided:
- Client ID, Client Secret, Identity URL: Direct
- Client ID, Client Secret, Form ID, Munchkin ID: HTTP Integration (This document)
Below we will go through how to set up the HTTP Integration.
Prerequisites
- Client ID
- Client Secret
- Form ID
- Munchkin ID
- REST API Fieldnames
Setup Process
1. Within your HTTP Integration configuration, you need to input your API URL at the very top. For this, you need your Munchkin ID.
For Marketo Forms, the API URL always has the same format:
https://{munchkinId}.mktorest.com/rest/v1/leads/submitForm.json
In this URL, you will need to replace {munchkinId} with the relevant ID, as seen in the configuration window below for Pod ID abc123.
2. This implementation requires a more advanced implementation of the HTTP Integration. To facilitate this, you will need to add send_body as a parameter of the API section, and set this to 1. You will also need to ensure that your method is set to 'post'.
3. In the Headers section, add the Authorization and Bearer ##token##
. This placeholder will populate with the token that is generated by the details in the OAuth section. This will verify the post request that we make in sending the leads to the client.
4. The next area you need to populate is the OAuth section. The first field will need to be populated with the below url, with the Munchkin ID as before:
https://{munchkinId}.mktorest.com/identity/oauth/token
Populate the client_id and client_secret fields accordingly. You will also need to ensure that your method is set to 'get', and that send_as_json is set to 'no'.
5. The next area you need to populate is the mapping section. Marketo forms require their field mappings to be set up as a JSON body. By default, a regular HTTP request will not meet this criteria, so this structure needs to be implemented within the HTTP setup.
Next 'BODYCONTENT' needs to be added with 'formId' and 'input' as below:
Beneath the 'input' section, you will need to add two more fields before the mapping section can be populated. Click Add button to add fields.
You can then populate these fields with '0' and 'leadFormFields', before adding a third field that will allow you to map the client's fields with the form fields.
6. Add the Form ID into the first field under the BodyContent section:
7. Populate the mapping section with the REST API field names from the client's form.
Please note: The clients' field names will always be in the left-hand column, with Convertr form fields on the right.
8. If you wish to notify any individuals of lead delivery, add the email addresses in the Recipients section:
This will complete your HTTP Integration to a Marketo form! Please ensure to test and confirm with your client before beginning delivery through this integration.