Salesforce provides a Lead Capture interface that can be called from any HTML page. In the application, we provide sample HTML that can be used as a starting point.
Alternatively, any server side programs that can do HTTP post operations can use this same interface. Examples of server side programs include, but are not limited to:
- Java Server Pages
- Active Server Pages
- Cold Fusion
Note: This allows you to set up your web sites post first to your server programs, and then have your server programs post to our Lead Capture Interface, giving your more flexibility to do more sophisticated operations.
The data flow of a server-to-server post in this case will be:
1. A HTML form present to end user with:
Note: The browser will send information entered by end user back to your CGI Server program.
2. The CGI Server program then can do the following optional things:
a. Validate user data to make sure required fields are filled, phone/email address are in valid format, etc. If not valid, ask the user to correct the problem.
b. Log the data for future use.
3. The CGI Server program can then post all the data to salesforce.com's Lead Capture Interface. The URL is the same as in our generated sample HTML. All data must be in the format defined by the sample HTML page.
4. Salesforce's Lead Capture Interface will accept the request and create a new lead. If an error occurs and the debug flag is not set, the Lead Capture Interface will send an error email to admin users.
5. When using this method, we recommend you set the debug flag to ON. In Debug mode, salesforce.com's Lead Capture Interface will return the status of the lead create request. The CGI Server program can receive this result page, and see if a new lead has been successfully created. The program can also catch error situations, such as when bad IDs are being used.
Below are some common functions you may wish to refer to if implementing this method of using the Lead Capture Interface.
PHP - fopen("http://xxx");
Perl - LWP module http://search.cpan.org/search?module=LWP
MS ASP - WinInet
Java - java.net.HttpURLConnection class in JDK