Salesforce Web to Lead Integration with Drupal 7

drupal_128Drupal is a CMS and Salesforce is a CRM. Ever thought to integrate these two platforms and explore new things and uncover the benefits which you get doing this?

Salesforce is quite configurable and Drupal has plenty of modules to work upon as you wish.

To make them synchronize to work them similar to web-to-lead form you just have to follow these steps:

  1. Install module in your Drupal 7 Org.:

https://www.drupal.org/project/sfweb2lead_webform

Drupal1

2) Generate web-2-lead form from your Salesforce org. having fields you want to display in your webform.

drupal_2

3) Create a webform or clone the existing one. As you want. For cloning your webform there is a need to install following module:

Node Clone: https://www.drupal.org/project/node_clone

In order to create new form:

Home>>Administration>>Content>>Add Content

drupal_3

4) Add title to your newly created web form.

drupal_4

5) Add components to your webform

drupal_5

6) In order to link it with Salesforce, click the option “Salesforce Web2Lead”.

drupal_6

7) Check the option asking to submit to Salesforce. Also, provide Lead Source for web form.

drupal_78) Now map your form fields with that of the Salesforce fields

Administration>>Configuration>>Web Services>>Salesforce Webform

While mapping fields you will be seeing a mapping table having two columns:

Key: Webform fields

Value: Salesforce fields

note sf1NOTE:

  • Enable debugging mode in it and you can see the logs of the data entered
  • If you are integrating with your Sandbox Environment then provide “test.salesforce.com” instead of “www.salesforce.com

drupal_8

9) To have a look on your Drupal log reports

Administration>>Configuration>>Reports>>Recent log messages

drupal_9

10) Now you can check your leads in Salesforce

drupal_10

stylingSTYLING YOUR WEBFORM

After completion of your webform do you want to style it to make it more attractive? As an example let us show label inline of the form instead of displaying it alongside.

What you have to do is just to install a new module Compact Form , configure it and you are done.

Now go to:

Administration>>Configuration>>User Interface

Provide your webform id there

drupal_11

note sf1NOTE: To know your form id you have to just inspect your form and get form id from there.
drupal_12

Now this is how our web form looks like after styling:

drupal_13

integrationHOW TO INTEGRATE SALESFORCE PICKLIST VALUE WITHIN DRUPAL WEBFORM?

It’s always helpful to know somethings extra. Make your form dynamic. For bringing Salesforce Picklist in Drupal 7 here are few steps to follow:

1 Install the module for it. It requires following:

  • Drupal 7
  • Salesforce Suite 7.x-3.x
  • Webform
  • Behavior weights

2 Configure the module and you are done.

drupal_14

3 Just go to your webform components and add new Component. Choose type as Salesforce Picklist.

drupal_15

4 Choose a picklist present in your Salesforce Object which you want to join with your Webform. Save the component.

drupal_16

5 Map it with API name of field present in Salesforce as mentioned above and you are done.

6 Test it by filling your webform and voila your record is created in Salesforce as a new lead.

drupal_17Now enjoy your integration of Drupal with Salesforce. It has become easy for you to store leads by filling out Drupal form. Cheers 🙂

Author: AJ

Share This Post On

2 Comments

  1. This was a really helpful post!!
    Many thanks for sharing your knowledge.

    Post a Reply
  2. Nice information about the integration with drupal. it will really very useful for the interface development, thank you for sharing the information.

    Post a Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

× How can I help you?