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
ReneeLReneeL 

Send information from a web page collecting lead info into Salesforce

Hello,
 
I am struggling with an issue that I hope someone can help me with.  I'm assuming this must have been done before and hope I'm not reinventing the wheel.
 
My company has a webpage that collects lead information from people that want to get a free trial of our software.  We need this info to be entered into Salesforce.com as a lead.  I know that Salesforce.com has a web to lead piece but we need the users to enter the info on the page that already exists as it is doing many other things in the background.  I have been poking around in the help files but I'm not familiar enough with Salesforce.com to determine what is the best way to do this. 
 
Any help would be appreciated!!
 
Thanks!
Renee
werewolfwerewolf
There is functionality built into Salesforce.com to do this.  Have a look at the documentation on "Web To Lead," which generates an HTML page that you can put in your own site which will put the leads directly in Salesforce.com.
werewolfwerewolf
Sorry, I didn't read your whole post until after I replied.  Web to lead is still the functionality you want to use.  You can take the HTML snippet and embed it into one of your own pages, and it will submit the lead to Salesforce.com.
ReneeLReneeL

It would make sense to snag the functionality from Web-to-Lead.  I can't use the form that Web to Lead creates as we are taking lots of info on the page that already exists and doing much with it.  I may actually be able to use some of the functionality that already exists on the form as what we are doing with it is putting it into a database and registering the user as a temporary campus so they can take a free trial of the software.  I just don't know how to address Salesforce to send the info there.  I created a web to lead page and looked at the html - it is calling https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8  in the form post action but aside from that the code is mostly just controls on a form which we already have.  I'm thinking the code I need is in https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8?  How can I view this when I do a view source it is obviously hiding the real work in the background.

Thanks!

Renee

werewolfwerewolf
The WebToLead servlet is server-side code – that's not the kind of code Salesforce.com would give out, nor is it the kind of code that would be useful in a non-Salesforce.com environment.

If you need your page to do other stuff, you can either:
- Post the data to W2L in an iframe, which would leave the rest of the page intact
- Eschew W2L altogether and submit your lead from your own web server using a call to Salesforce.com's web services (which are only available in Enterprise Edition and up incidentally).

For the latter you'll need to write some server side code on your web server to connect to Salesforce.com's web services and send the relevant data along.  It sounds complicated but it's actually quite simple.  There are lots of toolkits available for this; the PHP, Ruby, and Java toolkits are probably the most popular for web app use.  Note that you will not be able to do this on the client side in Javascript, as your page will be served from yourdomain.com, which means that it can't send data by this method to Salesforce.com unless it posts a whole page.

See the web services API toolkits and quick start guides here.