What is Web-to-Lead?
Web-to-lead generates a contact form that can be integrated within an existing website. Each form submission creates a lead record in Salesforce.
When is it appropriate to use Web-to-Lead?
Essentially, any time your organization wants to capture leads from a website, web-to-lead is the easiest way to do so. For example, use web-to-lead to add a “Contact Us for Pricing” form on your existing website that creates a lead record in Salesforce for every form submission.
There are some limitations (below) that may make web-to-lead inappropriate for some scenarios.
How to implement Web-to-Lead:
Step 1. Configure the default response template, and auto-response rules.
See Lead Auto-Response Rules for detailed instructions. This step will determine what email template the form submitter receives in reply (e.g. “Thank you for your interest. Our team will be in touch shortly.”).
Step 2. Configure Web-to-Lead Settings.
Navigate to Setup –> Customize –> Leads –> Web-to-Lead.
The default lead creator will be shown as the lead creator for web-to-lead submissions. Keep this in mind for reporting purposes.
Open Example
Navigate to Setup –> Customize –> Leads –> Web-to-Lead. Click “Create Web-to-Lead Form”.
Step 4. Customize your web-to-lead HTML code.
The HTML code generated from Salesforce does not contain any validation or styling. Therefore it must be customized to include CSS, styling elements, form validation (see below), hidden fields (see below), and so on. This customized code is ultimately what is deployed on your organization’s website. The web-to-lead code generated by Salesforce is simply a starting point.
In many organizations, this step is performed by the web development team.
Limitations and other considerations for Web-to-Lead:
Relationships:
You cannot capture lookup relationship fields with web-to-lead, with the exception of the Campaign field. When the campaign field is included with a web-to-lead submission, the lead will be automatically joined to the specified campaign.
You may want to hard code the campaign ID into your web-to-lead form (this way the submitter of the web-to-lead form does not see the campaign field). In that case, use the following code (replace “701E00000000xE0″ with the appopriate campaign ID in your org):
<input type=”hidden” id=”Campaign_ID” name=”Campaign_ID” value=”701E00000000xE0″ />
Validation:
The web-to-lead form generated by Salesforce does not restrict data entered into the form. Any validation (such as requiring fields, or a valid email address) must be added to the generated HTML code; this validation cannot be configured within Salesforce.
Daily Limits:
By default, you can capture up to 500 web-to-lead submissions per day. If your organization wants to capture more than 500/day, you can contact Salesforce to have the limit increased. Or, use another method to capture leads.
Regarding “You cannot capture lookup relationship fields with web-to-lead”, can HTML code do something like below to keep the lookup relationship?
Product
Service
ProductID and ServiceID are hard-code based on Type table(parent table) ID value, inspired by your hard-code campaignID.
You could capture an id in a hidden text field and then convert to a lookup using process builder
You are so cool!
I build a process with below parameters for update record:
Field: opportunityType Type:ID Value: a096A000000JQxR
In this case I can update AccountID/OwnerID etc., whatever shows up under field.
Nicely done! 🙂
After I pass the exam, I am going to hunting a job as Salesforce admin. Wish me have another nicely done!
Hi John,
Few syntax issues with your Hidden Campaign code, this one worked for me:
Hello, I am excited to put this in use for an organization. However, I’m getting stuck with the Enable spam filtering (recommended), reCAPTCHA API Key Pair. I have a screen shot, but can’t seem to upload an image in this comment. Could you add instructions to this lesson about how to deal with the reCAPTCHA API Key Pair?
The way to proceed as of now for learning purpose is to Disable spam filtering (I saw it somewhere on the internet).
Correct
Hi John,
Sorry to ask a very basic question…
I created a new web-to-lead form in my Salesforce org. Now how to I start/access/see the form ?
please help..
You have to save the form as HTML and open it in your browser (the idea being that you would later deploy this to your website)
Hi John..can you please explain the below
A company has leads that come from different languages and the VP of sales want to respond to them in there own language.
how as a Admin would you do that?
1. create multiple email templates and use a auto response rule to filter the critera to do that.
2. create multiple email templates and use a workflow action
3.create multiple email templates and use a vailation rule
4. make 1 template and use the translation workbench to translate it into there language.
I assume the answer to be 4.but this question is discussed previously in this discussion board and option is 1 suggested by you..
Can you please explain why we can not use option 4
Yep – translation workbench can translate pick list values and field labels, etc but not email templates
So confused. When this question was first posed I thought the answer was 4 but you said it was 1. Now you say it is 4… This was on my exam too and now I don’t know which one is right.
Nevermind. I read that wrong. That was an explanation for why 4 was wrong. I understand now. Sorry!
John I tried the web to lead form from another computer. I was able to generate the lead record as expected. I ran across the following youtube video on how to hack the api running from the browser which helped in the debug. https://www.youtube.com/watch?v=w6o1JxhTJr8.
Great to hear, and thanks for sharing!
Hi John,
Is the limit “500 web-to-lead submissions per day” valid for Spring’15? (Are there no 3000 submissions web-to-lead per day possible?)
Correct: https://help.salesforce.com/apex/HTViewHelpDoc?id=faq_leads_how_many_leads.htm
If you need to capture more than 500 you can either contact salesforce to increase the limit or you can use another method to do (e.g. a Visualforce page, marketing automation, etc.)
Minor (“each” is singular):
Each form submission create a lead record
…should read
Each form submission creates a lead record
Thanks Kevin – updated
I have just failed the ADM 201 a 3rd time and wanted to ask about a lead based question, which was roughly:
A company has leads that come from different languages and the VP of sales want to respond to them in there own language.
how as a Admin would you do that?
1. create multiple email templates and use a auto response rule to filter the critera to do that.
2. create multiple email templates and use a workflow action
3.create multiple email templates and use a vailation rule
4. make 1 template and use the translation workbench to translate it into there language.
I choose 1 (there not in the same order and the question was worded similarly)
which was the right one and why?
I choice 1
1 sounds correct to me as well.
Do you know where else you may have fallen short on the exam? Would love to steer you in the right direction if I can.
I think so, Visual flows, activity object and the dashboard componants as well as the connections between the standard objects, I am also struggling with case management. also when cross object formulars are needed. Thats all I can remember and I am going for it next Thursday (the 18th). if you can help I would appecate it.
(replied offline)
Hi Alex, when you took the exam again on the 18th was it the same? Or different questions? I failed my first exam too and contemplating about taking it soon or study more.
Hello John,
How can it be the first option here, does auto response rules not have a limitation of having only one active rule at any given point of time? So only one template (considering it corresponds to one language template) can be linked to an auto response.
Correct me if I am wrong.
Regards,
Gautam.
One rule can have multiple rule entries, thus specifying differing templates.
Hi there and thanks for a great website…
I have a general question :
what are the boundaries of lead management in Salesforce VS. targeted online marketing tools, like exact target or Marketo?
How both can be combined? can Salesforce replace Marketo ? how both can work together?
Thanks !
They work together – Salesforce has the “Marketing Cloud” as well, which competes with Marketo (they bought and integrated Pardot some time ago).
Generally speaking, web to lead is a simple tool that would be replaced with a full scale marketing automation tool such as Marketo. They can work together, but typically do not.
We use B2B and B2C sales processes and associated record types with W2L as one channel. In the master picklist for Lead Status in the lead object, the default is “Open”. However, I’ve defined a default lead status for each record type that is different from the default in the master list (in fact, I’ve removed the master list default from the lists for each record type). When I create leads manually this process works as expected. But when I capture leads via W2L, the created lead always has it’s status set to the default in the master list, not the default status I’ve defined for the record type (which is hard coded and hidden in the W-2-L form, depending on the page visited). How do I force the default lead status for a W2L record?
Thanks!
Hey Chuck,
Either set the status within a hidden value on the w2l form, or use a workflow rule to automatically change the status based on the record type. Cheers,
John
FWIW, according to SFDC tech support (and my experience), W2L only uses the lead status default value from the master picklist for the lead object, even if you try to define it with a lead status recordID (hidden or not) at the time of the W2L submission. So it appears the only solution for this is workflow rule. Thanks, Chuck
Thanks Chuck, that’s good to know. I haven’t run into that specific scenario before!
Do validation rules on Lead object run while creating a lead through Web-to-Lead form?
Yep – https://help.salesforce.com/HTViewHelpDoc?id=fields_validation_considerations.htm&language=en_US
Salesforce runs validation rules before creating records submitted via Web-to-Lead and Web-to-Case, and only creates records that have valid values.
You will generally want to structure your web to lead forms to avoid validation rules.
Considering the following scenario:
1) a web-page visitor submits and empty Web-to-Lead form
2) there are some Validation Rules in place that prevent storing an empty Lead in Salesforce
3) hence, no Lead is stored
Is the web-page visitor notified at all? I presume, he’s not.
Meaning that I should supply HTML/JS validations for the form on the web page that double the checks done by the Validation Rules.
Thank you
Petr
The salesforce admin gets an email with the details filled out in the form, so the information can be captured manually. As no lead is created in the system, the lead would not get an email (unless entered manually by the admin and then sent).
John, Can you explain the difference between this and your explanation above about Validation: “Any validation (such as requiring fields, or a valid email address) must be added to the generated HTML code; this validation cannot be configured within Salesforce.”
Are you saying the person completing the form won’t be restricted in any way by validation rules, but the data won’t be entered into a record?
When SalesForce generates an HTML form, the data entered into that form is not validated. However, once the form is submitted validations rules are still evaluated – if the form entry is invalidated then the lead is not created and the admin is emailed with the form details. Therefore it is important to add any validation to the HTML to ensure that your HTML validation matches any validation rules.
Web development team who is going to validate and enhance Web Form can ensure that Required Field in Lead Object does not come empty from Web From.
Exactly -using HTML
What happens if a field is required on the Lead object but comes empty from the web form? Is the Lead still created?
I’m not %100 sure – I believe if the field is required (at the field-level, not page layout), then the lead is rejected. The admin will get an email notification with the data within the web form when this happens (a failed apex trigger will cause this, for instance).
Did a quick test, Looks like the lead record will be created even if the required field is not populated on the web to lead form, however salesforce generates an error if a user tries to edit and then save the lead record without the required field populated.
Correct- if the field is required on the page layout.
If it were required at the field level, then I think it would reject. Some fields get auto-populated as well (for example if you leave company name blank, I think it adds a value for it). The logic on web-to-lead is not as straightforward as you might think…
This is a problem with the CSS in the template that you are using in WordPress. It is currently defined as:
-webkit-hyphenate-character: “2010”;
If you would like to fix this, I would most likely override the theme by using the custom.css option and define the following as the default theme does not include the beginning backslash:
p
{
-webkit-hyphenate-character: “\2010”;
}
Thanks – I recently updated a plugin that should have fixed this. Do you still see the problem?
John,
The problem is still visible. I’m running Safari on OS X 10.10, if that helps.
Cheers.
the lead will automatically be joined to the specified campaign. – something is going on with the formatting on the page, I’ve looked on my mac and my work PC. the word automatically has a 2010 right in the middle of it like this “auto2010matically.” It’s very odd. Just a FYI.
Thanks Chris – seems to be a Safari/Apple issue from my experience. Working on tracking it down. Chrome should work as an alternative.