0

Salesforce generates HTML for web to lead setup. Which eventually creates lead directly in our org. What I want to know is that how actually it works, I assume it uses rest services to create lead, if so how it do authentication and all other handling. I couldn't find any documentation for the same.

Thanks

closed as too broad by battery.cord, David Reed, glls, Pranay Jaiswal, Santanu Boral Jul 24 '18 at 18:40

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

1

If you take a look on the HTML form generated using Web-to-Lead, you will notice as below:

<form action="https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">

This signifies that its a POST request made to a servlet hosted on Salesforce servers which does not need any authentication (in this case). So from the Web, you just post the request to this servlet. There is no REST or SOAP API call that is made here.

The incoming request is then captured and translated to a Lead record in Salesforce, where the record owner is pre-defined when you first enabled the Web-to-Lead in Salesforce. So irrespective of from where the web form was submitted, the leads created will always have the owner as defined in your settings.

enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.