Get Started
Configure your Org
Manage Content Workspaces
Search for Content
Create and Manage Emails
Create and Manage Email Templates
Publish Content Items
Integrate Form Submissions
Security
Form handlers provide a method for using externally hosted forms to gather information and bring that information into Salesforce.
For security and scalability, we recommend that you use server-side processes to integrate form handlers directly with the API. In this type of integration, handling a form submission involves these steps:
form_id attribute as a hidden field or URL parameter.form_id and constructs the request body based on the fields and values in the form.When a form submission triggers a flow, the flow can use the information in the form to send emails, update records, and perform other actions.
Before you configure your site to integrate with the Connect API, set up My Domain to create a subdomain that’s specific to your organization. When you use the API to handle form submissions, your API calls must use domains that use the format https://YOUR_SUBDOMAIN.my.salesforce.com.
Using other URLs results in a 403 Forbidden error. When you use a My Domain URL and a valid authentication method (usually an Authorization: Bearer header that includes an OAuth token) to make API calls, you’re granted full access to the Connect API.
The Content Key is also referred to as the API Name. Find the Content Key on the details page for the form handler in Marketing Cloud Next or by using the Connect API to retrieve channel contents.
Tip
Create a process hosted on your server that receives data from the form, processes it, and sends it to Salesforce via the Connect API.
The implementation steps vary depending on your site’s technology stack, your organization’s code and security policies, and the structure and content of the information you capture in your forms.
If your Form Handler requires reCAPTCHA, your server-side process can’t generate the validation token. Capture the token in the client browser during the initial form submission and pass it to your server-side process to include in the API payload.
Note
The process must send a POST request to your subdomain. The request endpoint includes the Content Key for the form handler, as shown in this example.
1https://YOUR_SUBDOMAIN.my.salesforce.com/services/data/VERSION/connect/form-handler/YOUR_FORM_HANDLER_CONTENT_KEY/submitThe body of the POST request contains a formData object that includes the field names to update. The keys in the formData object must exactly match the external field names you configured in the Form Handler settings.
1{
2 "formData": {
3 "firstName": "D’Angelo",
4 "lastName": "Cunningham",
5 "emailAddress": "dcunningham@example.com",
6 "favoriteFruit": "Apples"
7 },
8 "uniqueId": "ce96199f-cd6e-431a-b4cf-20ccc9259999",
9 "token": "03AFcWeA6nYqPzZcT1w9x8h4JkM2bXyFZr5u7C3A1BvLQmN0pEoR9s8DEXAMPLE"
10}