You need to sign in to do that
Don't have an account?
Web to Lead Creation Via Java API
Hi folks,
Our organization is seeking a way to create leads in salesforce from an existing webpage form that customers are filling out.
We're seeking some documentation with java API will allow us to accomplish this. We've tried contact Salesforce.com Tech Support and they don't seem to understand what we are trying to accomplish.
In summary, we have several existing web forms that are populated by customers. We are seeking a java API to assist us in saving those records as leads in salesforce while also committing them to our application database.
Thanks,
Michael
You can use SFDC partner WSDL api to build a java application that will access the already created records from your existing system and using WSDL API java application will create the Web to Lead.
Is there any sample code or supporting documentation?
You have a multitude of options.
1. look at Web 2 Lead, no java code required, just do HTML form post to a specific URL. (in the online help, search for web to lead)
2. Use the enterprise or partner APIs, these are SOAP/WSDL based APIs, that can create leads (and many other types of objects), You'd probably want to start with the enterprise API, as that's easy of the 2 to get going with. There are java samples and getting started guides in the API docs.
3. You can use the REST API, do a simple HTTP POST with an xml or json payload to the rest api to create a lead, there's more info in the REST API docs
option (1) doesn't require any authentication, (2) and (3) require a sessionId to work. (the docs cover how to get one of those)
I would start with (1) and then look at (3) if (1) doesn't provide the features you want.
Hi Simon,
Thanks for the reply. At this point, we don't think option #1 is realistic because our HTML forms are already in existence.
For example. http://archives.nbclearn.com/portal/site/k-12/freetrial
Thank you,
Michael
I don't think altering the form params etc to work with W2L would be a big job, but if you've ruled it out, then i would recommend you look at the rest API, you can create leads by POSTing a payload like this to /services/data/v21.0/sobjects/lead
{
"firstName" : "Simon",
"lastName" : "Fell",
"company" : "Superfell Inc."
}