UPDATE: Please read if you are using this integration.
Salesforce is about to deprecate the old web-to-lead URL around June 2017. Please make sure to update your POST URL from:
“https://www.salesforce.com/servlet/servlet.WebToLead”
TO:
“https://webto.salesforce.com/servlet/servlet.WebToLead”
For more information see salesforces documentation here:
Original post:
Hey everyone,
As some of you may know, our current Unbounce to Salesforce integration is unable map your leads to specific campaigns. This is due to a limitation of the Salesforce API. Salesforce does provide an alternative which is embedding a Salesforce ‘web-to-lead’ form. However for some this may not be ideal as your data will no longer be captured on our end and the form cannot be styled using the page builder tools.
Using a method similar to Salesforce’s Web-to-lead forms you can use and retain your Unbounce forms features while sending those leads to specific campaigns.
I do need to caution this requires some knowledge of HTML or CSS. Please proceed with caution and only if you have the skillset to do so.
Steps:
Finding your Salesforce field IDs
Create a Web-to-lead form on salesforce with your required fields. We won’t be using this code but we will be using this for reference.
http://help.salesforce.com/apex/HTVie…
Be sure to include the “Campaign” field if you wish to assign the leads to a specific campaign. After you generate the code the field ID’s should be visible in the HTML.
Add the following hidden fields on your Unbounce form: retURL, oid, Campaign_ID
Give these hidden fields the same default values as in the salesforce code (set retURL to your thank you page URL)
Set your forms confirmation to ‘POST form data to URL’ and set it to the URL below:
https://webto.salesforce.com/servlet/servlet.WebToLead
Mapping your Unbounce fields to Salesforce
Salesforce is case sensitive and very particular about the field IDs. If there is even the slightest mismatch, Salesforce will ignore that field data.
You can find your salesforce field IDs in the web-to-lead code:
and on unbounce the form field IDs can be seen in the form builder. It’s the text box labelled Field Name and ID.
Uncheck the box Auto-generate from Field Label and set the value to what Salesforce requires
Now after a visitor submits your form they will be taken to your ‘thank you page’ and the lead data will be sent into Salesforce and into the proper campaign.
Hope you find this helpful! Feel free to comment below or reach out to us directly at support@unbounce.com