Gathering Leads Automatically from Webpage to Salesforce

09 Sep, 2020 | 3 minutes read

Attracting prospects is a crucial part of the sales and marketing teams in a company. As such, having a website that will be attractive enough for your potential customers is yet another crucial part. When thinking about customers, the customer journey starts when the customer visits the website. The important thing here worth mentioning is not to let the customer leave the website without getting an impression to revisit it again or buy something. Many companies add contact forms where potential customers can add their basic information and after that use that information to get in touch with their potential customers. How can we use Salesforce and ease the entire process of storing potential customers as Leads in Salesforce?

Leads can be entered in Salesforce manually or imported through Data Loader or Data Import Wizard. But, we can also capture leads directly from the web page and automatically store them in a Salesforce platform like Leads. This can be done by hosting a web form (Simple HTML) on the website and whenever the form is filled, records will be automatically created in Salesforce.

To do this, you have to have the Web-to-Lead option enabled in your Salesforce platform. You can do that by going to Setup -> Customize -> Leads -> Web-to-Lead

web to lead setting

Unless this box is checked you will not receive a Web-to-Lead submission. Once you enable the Web-to-Lead, you can create the form. The following screen will appear when you access the Web-to-Lead.

Default Lead Creator is the User in the Salesforce platform that will be listed in the “Created by” field on the Lead record. In most cases, this will be the Lead Record Owner (if it is not configured with Lead Auto-Assignment rules).

To create the form, click on the “Create Web-to-Lead Form” button.

web to lead setup

After you click on the button, the above wizard will be open.

Here we can decide which fields should be present in the form and their sequence. The fields can be standard and custom fields from the Lead object. By using the Add/Remove buttons, you can add or remove fields, and you can also reorder them, using the Up/Down buttons.

The best practice is to keep the number of fields to a minimum. The more data you request from your website visitors, the fewer submissions you can expect.

Once you decide which fields should be selected, you should fill out the Return URL. In the Return URL, you should specify the page on your website that the visitors will be taken after submitting the Web-to-Lead form.

This can be a “Thank-you” page on the website that can only be shown after submitting the form (not in the navigation on your website). This gives confirmation to the visitor submitting the form that the submission was processed successfully. At least, you can redirect them to the home page of your website.

You can decide if you want to include reCAPTCHA, you can enter the key pair, and you’ll need to go to Google’s website to generate one.

In case you don’t want to use it, just uncheck the checkbox – “include reCAPTCHA in HTML”.

The final step is to Generate the Web-to-Lead form. After clicking on the Generate button, the following HTML code is automatically generated.

This section of the form says that the form submits to Salesforce.com and directs the record to this instance (OID – Organization ID) of Salesforce (which is different for every Salesforce Organization) and retURL is the URL that we defined previously.

The rest of the HTML presented are the tags describing the Lead fields that are available on the Web-to-Lead form.

Copy and Paste the above HTML code on your website. In the generated code, if you want you can edit the CSS so that it corresponds to the theme of the website.

The picture below is an example of edited CSS submission.

After the submission, you should be redirected to the home page of the InterWorks website.

When this is done, you just visit the Salesforce platform and the new lead will be automatically created.

After automatically creating leads from Webpage to Salesforce, the sales team will be able to easily track their leads, work on them… and focus on converting them to an opportunity.

If you want to check how the solution works or discuss it, you can contact us.