Drupal 7 Webforms To Salesforce

When you are using your website to support sales (or conversions otherwise) on a daily basis, Salesforce is one of the better CRM options available.

With it’s extensive support for custom integrations and connectors (Wufoo, CampaignMonitor,…), it’s relatively easy to build solutions right into your existing online marketing ecosystem.

We had in our case, using Drupal 7 as the basis for our website, a wide range of modules available that (claim to) provide integration out of the box.

This is how we got the right solution for our setup:

Summary:

Salesforce suite

Salesforce Suite provides a robust integration with the Salesforce API, at least after patching it. It uses the Sforce.com PHP toolkit to connect to the Enterprise version of the API.

It then provides mapping between Drupal objects (nodes, users) and Salesforce objects. You could setup a Drupal event content type, map this to Salesforce Campaigns, setup a user as lead or contactperson and create a form that maps registrations to the event to campaignmembers in Salesforce. Read more in this presentation from slide 86 onward


If you are attracting a significant amount of prospects and they don’t engage on a regular basis, then you don’t want to create user accounts for every person that converts. Drupal Webforms are better suited for that.

Salesforce webform

Submitting the values of a Webform to Salesforce is a prblem many tried to solve. The salesforce webform module is a decent solution for Drupal 6, but for Drupal 7 it is in alpha and still lacking. I couldn’t get it to work without patching it.

The unofficial Drupal module Salesforce Webform integration worked like a charm on our Drupal 7.14 setup. It depends on the module mentioned above: Salesforce Suite, to integrate the API and provides the tools to map Webform 7.x-3.18 fields to your Salesforce objects.

We decided to extend this module until it fully met our needs by adding the following functionality:

  • enables the module on all webforms, not only webform nodes
  • lets you choose a field to “upsert” on, typically the email adres (the upsert field behaves as if it were a unique key)
  • lets you choose a campaign per webform to subscribe to, and create a Salesforce CampaignMember accordingly when submitting the form (campaigns need to be created in the Salesforce interface)
  • lets you set the status of the CampaignMember per webform

This updated version of the module is available here.

I’d love to here your feedback on Twitter!