Steps to create Web-to-Lead
- Select
Setup > Feature Settings > Marketing > Web-to-Lead
and clickCreate Web-to-Lead Form
. - Add fields to capture, insert the return URL, and click
Generate
. - Copy the generated HTML form and paste it on the 3rd party website.
Take note of these 3 lines:
<form
action="https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8"
method="POST" />
<input type="hidden" name="oid" value="<OID-VALUE>" />
<input type="hidden" name="retURL" value="<RETURN-URL-VALUE>" />
- Line 1: The data will be sent to the URL when the form is submitted
- Line 2: The
<OID-VALUE>
is the Organization ID or org id. You can get the Organization ID inSetup > Company Settings > Company Information
. - Line 3: The
<RETURN-URL-VALUE>
is where the user will be redirected after they submit the form.
Notes
You can modify the form styling as you need. Just make sure the
name
attribute for all fields is the same as in the Lead object.