Lead Generation via the Salesforce.com API vs. Web-to-Lead
What we mean by the term “lead generation via the API” is not the same concept as the term ‘Web-to-Lead’ that you may have heard. Creating leads via the API allows you to attach Salesforce functionality to your existing lead-generating forms, whereas Web-to-Lead is a tool provided by Salesforce that allows you auto-generate registration forms that send a POST request to Salesforce. It should be noted that this discussion is based on using Salesforce’s auto-generated forms, but the lead creation can actually be done on the server side as well, as demonstrated here, with a great example in PHP. A few advantages that the API method holds over the client-side Web-to-Lead implementation include:
- Privacy. No need to send your users’ passwords to Salesforce.
- Stability. No need to change your existing field names to match Salesforce.
- Security. The Web-to-Lead tool can be used to create spam leads. See here.
- Flexibility. Easily avoid creating duplicate leads by de-duping on email address.
There are two main advantages that the Web-to-Lead method holds, both in terms of simplicity:
- All of the form creation and handling is done for you.
- In case of an outage, queuing of the new leads is handled for you.
That Web-to-Lead queues your new leads during outages is not an inconsiderable point, and ‘queuing strategies and the API’ is a topic we’re going to discuss in the very near future. If you’re interested, you can learn more about Web-to-Lead here.

Interesting post. I’m confused, though: How does Web-to-Lead require sending passwords to Salesforce?
Also, regarding W2L and spam, check out Arrowpointe’s post about using Akismet with Web2Lead: http://sfdc.arrowpointe.com/2007/05/24/fight-web-to-lead-spam-w-akismet/
Check out Visualforce and Apex, which can replace PHP forms completely, and which run more smoothly because they eliminate the need to host your own web pages and forms.
Replacing the existing PHP forms may take some time, but in the long run, PHP-Salesforce integrations will be replaced by completely native Force.com setups.
David,
I mentioned that I was specifically referring to what I call ‘client-side Web-to-Lead’, which involves the client (browser) sending an HTTP POST request to Salesforce with all of the form data (including, in the case of a registration form, the user’s password). I also said in an earlier post that we’re generally not going to get into form handling. That said, I wanted to cover at a high level the differences between out-of-the-box Web-to-Lead and an API-based integration, as many people mistakenly refer to both as ‘Web-to-Lead’. Aside from that, there is much more to a Salesforce integration besides forms, including looking up support entitlement, tracking user download activity, etc. You seem to be focused on PHP as a way to handle forms dynamically, whereas we’re referring to PHP as a language in which our web application happens to be written.
-p
Can I put in WordPress CMS a Form code to be used for lead generation in salesforces.com?
Thanks
Hi Marius,
I’ve never looked at using WordPress as a CMS, but since it’s open-source, the short answer is yes. You should have a look at the comparison above to determine which method works best for you.
-p
Nice and clear blog, useful for us.
Thank you
Mattia
Hello there,
I would like to know if is possible to create a survey with Saleforces.
Can be possible with Forces.com?
Many thanks for the answer.
M.
….I means “Forces.com Sites”
Thanks in advances
M.