function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Alaa Aljelani 15Alaa Aljelani 15 

Web-to-lead generated from my webiste to salesforce


I'd like to have an automatic creation of a lead record once the lead fills the form in the website.

The unsual here is that I dont want to generate the HTML code from salesforce and add it to my website. As I'dont want to change the existing one on my website. I want it the other way around.

Take the code from my website (so I dont miss with it) and add it to salesforce to have web-to-lead enabled.

Can this be impossible?
Waqar Hussain SFWaqar Hussain SF
There are two options available to create leads from your site.
1- Using web-to-lead functinoality i.e. generating HTML code from salesforce and use it on your site.
2- Using Salesforce SOAP API on your site to create leads within Salesforce from your site.

But If you don't want to update your site then you can use email to lead functionality. 
Alaa Aljelani 15Alaa Aljelani 15
Thanks Waqar for your replay. Can you give more tips and description on option no. 2 
Waqar Hussain SFWaqar Hussain SF
You have to generate the metadata and enterprise WSDL files for your Salesforce organization. Which steps are below

1- Log in to your Salesforce account. You must log in as an administrator or as a user who has the “Modify All Data” permission.
2- From Setup, enter API in the Quick Find box, then select API.
3- Click Generate Metadata WSDL and save the XML WSDL file to your file system.
4- Click Generate Enterprise WSDL and save the XML WSDL file to your file system.

Then import the WSDL file into your development platform

Then you can use Salesforce API to create lead object in Salesforce.