This page has been archived. For the latest news on FormAssembly, go to: http://www3.formassembly.com/blog

How to Create a Salesforce Web-to-Lead Form

This information applies to Salesforce SFA users with a Form Assembly Professional plan.

Create your Web Form

For the purpose of this tutorial, we are going to use a template from the Form Library.

Make sure you are logged on and have subscribed to the Form Assembly Professional plan *.

If you are familiar with the Form Builder, you can customize the form now, otherwise simply move on to step 2.

Salesforce Web-To-Lead example

Step 2. Hit the Save Form button (the red button) and press Ok to go to the ‘Display and Processing Properties’ page.

On this page, you can review the different setup options or keep the defaults for now. You can always change them later.

Step 3. Head to section 3, Connector Setup. Click the edit settings link next to the Salesforce SFA option.

Salesforce Web-To-Lead setup

Salesforce Connector Setup

You first need to select which type of access you will want us to use to insert leads in your Salesforce application.

Step 4. If your Salesforce edition allows API access, select API, otherwise select ‘Web-To-Lead’.

API setup

This applies if you have selected the ‘API’ connector type.

Step 5. Enter a valid Salesforce username and password.

You can use one of your existing Salesforce account, but it is preferable that you create a specific ‘API’ account and restrict its access rights to the lead object only (for instructions on how to do that, please refer to the Salesforce documentation).

Step 6. Press the ‘continue’ button. If the connection is successful you will be presented with the field mapping section.

Web-To-Lead setup

This applies if you have selected the ‘web-to-lead’ connector type.

Step 5a. Go to your Salesforce account and generate the default web-to-lead form.
Step 5b. Copy the HTML and simply paste it in the box provided.
Step 6. Press ‘continue’.

You do not need to do anything else with this HTML. The Form Assembly will automatically extract the information needed.

Field Mapping

Now your form is ready and the connection with Salesforce is working. You need to specify which field of your form corresponds to which field in Salesforce.

Step 7. Go over each form field and choose in the drop-down menu the equivalent in Salesforce. If there is no equivalent, or if you do not want to export a specific field, leave the menu to the ‘not exported’ option.

Salesforce field mapping

Step 8. You are done. Press ‘Check and Save’, then ‘Back’. On the Form Properties page, follow the link to the live form. Fill it out and head to your Salesforce application to make sure the lead is correctly inserted. If you are using the ‘Web-To-Lead’ connector type, the requests are queued by Salesforce, so it may take a minute or two before the lead appears.

Here is more information on how to map your form fields.

How to Handle Picklists

Some Salesforce fields have a predefined list of values, or picklist. For instance, the picklist for Salutation contains ‘Mr.’, ‘Ms.’, ‘Mrs.’, ‘Dr.’, etc… If you match a multiple-choice question with a picklist, you can specify what choice corresponds to what item in the picklist. Most of the time, the labels will be identical, but that is not necessary.

How to Merge Fields

You can merge several of your form fields in one Salesforce field. For instance, if you had three fields for the phone number (US format (555) 555-5555), you would map all of them to the ‘phone’ field in Salesforce.

How to Use Conditional Sections

The form used in this tutorial contains a ‘other / please specify’ combo (in the product interest question). This allows the respondent to provide a free text answer when none of the predefined choices is relevant.

To map those fields correctly, first map the multiple-choice question to the Salesforce picklist (here product interest). Map each available choice, except the ‘other’, which remains ‘not exported’. Then move on to the next question - ‘please specify’ - and map it to the same Salesforce field (’product interest’).

Salesforce Web-To-Lead setup

That’s it! Feel free to post your comments below.

Salesforce, Web-to-Lead, Web Forms

9 Responses to “How to Create a Salesforce Web-to-Lead Form”

  1. Lockergnome's Web Developers Says:

    Web Form Tools and Links

    No matter if you are creating the next big Web 2.0 application or you are just setting up a personal Web site, putting in a form or two could never hurt. These make contacting you (for one reason or another)…

  2. Perspectives on Salesforce.com » The Form Assembly Says:

    […] For more details on setting up a Salesforce connected form, see their blog post on the subject. […]

  3. Anton S. Says:

    I have a problem of adding a custom page after the form has been filled out, it is going to a ugly white page with some settings from salesforce, can i have it go to a custom page? If yes please let me know how.

  4. cedsav Says:

    Anton, if you still have this problem, can you email support at formassembly dot com, with the link to your form?

    To redirect to a custom page, you only need to set the “redirect to: ” field in the form “display & processing properties” page.

    Thank you.

  5. Pat Says:

    What if you want to check salesforce to see if the person filling out the form already exists?

    - Pat

  6. Mark Says:

    Pat,
    SalesForce has datacleansing apps like Ring Lead and Active Prime that prevent duplicates by matching and updating existing Contacts or Leads from online contact forms or lists imported. These items are available in the AppExchange.

  7. Batya Says:

    Will this also work with the Salesforce Enterprise Edition (nonprofit version)?

    Thank you!

    Batya
    batyashevinsky at bircas dot org

  8. cedsav Says:

    Hi Batya,

    Yes it does work with the enterprise edition.

  9. nine Says:

    Hi, this might sounds stupid… sorry im new to SF… how can i create a lead form that only shows leads from website?