This module extends the Webform module to easily allow Webform submissions to feeds to your Salesforce.com account. Note that these submissions do not act as a "web-to-lead form" in Salesforce. This module relies on Salesforce API for the actual submissions.

This project was created out of need for Webform and Salesforce integration for D7. Neither Salesforce Webform Data Integration nor SF Webform accomplished this for D7 at the time.

The main difference between this module and Salesforce Webform Data Integration is how they handle Salesforce submissions - this module relies on Salesforce API module while Salesforce Webform Data Integration requires downloading and including the Salesforce API toolkit.

View comparison of existing Salesforce-Webform integration modules.

Which version of the module should you use?

  • 7.x-1.x branch - Webform 3.x and Salesforce API 2.x branch
  • 7.x-2.x branch - Webform 4.x and Salesforce API 2.x branch
  • 7.x-3.x branch - Webform 3.x and Salesforce API 3.x branch

So far the module been tested for Contact, Account and Case creation and for custom objects. Custom objects and fields are essentially aliases of existing objects and fields with special processing. For example if you need to create a Case in Salesforce upon Webform submission and trigger assignment and email handling you can create a custom case and override the default Salesforce submission handling.
Custom objects also allow chaining together multiple Salesforce objects such as Account and Contact. For example one can define a custom object Account_Contact and treat it as two different submissions - first as an Account and then Contact using the returned Account ID as a value for reference field between Account and Contact.

Salesforce/Webform Integration ships with the following hooks:
hook_webform_salesforce_objects() - allows defining custom objects
hook_webform_salesforce_fields() - allows defining custom fields
hook_webform_salesforce_submit() - allows custom Salesforce submission handling

Upgrading from D6 to D7

There is no upgrade path for D6. There is however a way to migrate from D6 version of Salesforce Webform Data Integration to D7 version of Webform/Salesforce Integration with some extra processing. In D6 the data is stored in salesforcewebform table with the following fields - vid, active, object type.
Object types are one character long - l(Lead), a(Account), c(Contact), e(Event). In D7 objects are stored with their real names instead of short codes.

In D7 mapping is stored in wfsf_mappings table with the following fields: nid, vid, object, map. Nid, vid can be mapped directly; object needs to be converted from shortcode to full object name; map is a serialized array of form element to Salesforce field name.

The form_key field of the Webform component in D6 is also the Salesforce field name but it's impossible to tell from the web form_component table alone if they are indeed mapped. To get around this issue one can:
a. fetch the supported fields from Salesforce for the object and only migrate mapping for Webform components where the component form_key matches Salesforce field name
b. Map them all and let cleanup functions in D7 handle converting lowercase object labels to their proper case (update7001 does just that, just make sure to run it after you've configured Salesforce API connection).

For example if in D6 the form elements are identified by form_key field as contact_phone, category__c then to get them into D7 store the mapping as a result of serialize(array('contact_phone' => 'contact_phone', 'category__c'=> 'category__c))

Todo:
- On submission edit update submission in Salesforce
- Allow defining which field to use for submissions as the unique external ID in Salesforce

Supporting organizations: 

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • caution Maintenance fixes only
    Considered feature-complete by its maintainers.
  • Module categories: Integrations
  • Created by nonsie on , updated
  • shieldStable releases for this project are covered by the security advisory policy.
    Look for the shield icon below.

Releases