Use a form handler with an existing Salesforce Web-to-Lead form to track campaigns and sources in the micro-level web analytics available in Account Engagement. The integration posts form data to both Salesforce and Account Engagement almost simultaneously.
Required Editions
| Available in: All Account Engagement Editions |
| User Permissions Needed | |
|---|---|
| To create a form handler: | Account Engagement Administrator or Marketing role |
We don’t recommend using this method if you use completion actions to assign prospects. Duplicate records are created when both the completion action and Web-to-Lead form create prospects.
-
Open the Form Handlers page.
- In Account Engagement, select Marketing | Forms | Form Handlers.
- In the Lightning app, select Content and then select Form Handlers.
- Click + Add Form Handler.
- Name the form handler.
- Select a folder.
- Select a campaign.
- Mark Enable data forwarding to the success location. When Account Engagement receives the post, the same data post is transferred to the success location.
-
From the Success Location dropdown, select Specific URL and enter
the Salesforce post address URL from your Web-to-Lead form code.
- Forwarding to Salesforce production—Typically, the success location in this scenario looks something like https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8.
- Forwarding to a Salesforce sandbox—Typically, the success location in this scenario looks something like https://MyDomainName--SandboxName.sandbox.my.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8.
- From the Error Location dropdown, select Specific URL, and enter the URL for the form. Visitors are redirected here upon a submission error.
-
Add and map form fields. Repeat these steps for each field on your form.
- Click +Add New Field.
- Enter External Field Name. The name is specified by the ‘name=’ attribute of the input tag in the HTML of your external form. External field name is case-sensitive.
- Select the appropriate prospect field.
- Save your changes.
- Click Create Form Handler.
- In the Summary section, copy the endpoint URL.
In your Web-to-Lead form source code, change the post URL to the form handler’s endpoint URL, and change the return URL to your confirmation page.