Advertising sustains the DA. Ads are hidden for members. Join today

Contributed modules for Drupal 7

Salesforce Suite

Last updated on
27 December 2018

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

This page is a work in progress. Please add your notes, tutorials, guides and knowledge on setting up the module. You can edit this page or add sub-pages.

The Salesforce Suite of modules supports integration with Salesforce by synchronizing Drupal entities (E.g., users, nodes, files) with Salesforce objects (E.g., contacts, organizations, opportunities). It supports pushing Drupal data to Salesforce as well as pulling, or importing, Salesforce data into Drupal. Changes can be made in real time or asynchronously in batches during cron run.

Field mappings are used to synchronize data between both platforms. Typically, you first need to select a Drupal entity (e.g. user) and a Salesforce object (e.g. contact) that you want to synchronize together. Once this is done, you can associate entity fields (Drupal) to object fields (Salesforce). For example, you could create a field mapping that links together a Drupal user E-mail address with a Salesforce contact Email. And so on. You can add as many field mappings as you need.

Currently, only one-to-one mappings are supported. Which is to say that once you have a field mapping that synchronizes Drupal user E-mail address with Salesforce contact Email, you cannot add a second field mapping that would synchronize the E-mail address field to a different Salesforce field.

Because of this limitation, custom solutions may be required if you have more complex export/import needs (either via third-party Drupal modules that build on the core Salesforce API module, or through Apex code, such as triggers).

This suite also includes an API architecture which allows for additional modules to be easily plugged in (e.g. for Webforms, contact form submits, etc).

Modules (7.x-3.x)

  • Salesforce (salesforce): OAUTH2 authorization and wrapper around the Salesforce REST API.
  • Salesforce Mapping (salesforce_mapping): Map Drupal entities to Salesforce fields, including field level mapping.
  • Salesforce Push (salesforce_push): Push Drupal entity updates into Salesforce.
  • Salesforce Pull (salesforce_pull): Pull Salesforce object updates into Drupal on cron run. (Salesforce Outbound Notifications are not supported.)
  • Salesforce Soap (salesforce_soap): Lightweight wrapper around the SOAP API, using the OAUTH access token, to fill in functional gaps missing in the REST API. Requires the Salesforce PHP Toolkit library to exist in sites/all/libraries/salesforce .
  • Salesforce Webforms (salesforce_webforms): this module acts as a bridge to connect the Drupal webforms and Salesforce.

Setup

If you enable the help module, you can find instructions on connecting Drupal to Salesforce at admin/help/salesforce

Bulk Import

You can batch pull data from Salesforce to Drupal by configuring your mappings to either "Sync" or "SF to Drupal" for the given mapping, then running cron. However, Drupal will only pull in items that have been triggered (on the Salesforce side) since the last time those objects were pulled.

If you need to pull all items, due to having changed mappings for example, you need to delete the "salesforce_pull_last_sync" variable. The easiest way is to do this with Drush:

drush vdel salesforce_pull_last_sync_

You'll see a list of variables, one per Salesforce Object.

Enter a number to choose which variable to delete.
 [0]  :  Cancel
 [1]  :  salesforce_pull_last_sync_Account
 [2]  :  salesforce_pull_last_sync_Campaign
 [3]  :  salesforce_pull_last_sync_Contact
 [4]  :  salesforce_pull_last_sync_Membership__c
 [5]  :  salesforce_pull_last_sync_npsp__Address__c

Choose any and all that you wish to re-pull.

A quickstart Guide is available: https://www.drupal.org/docs/8/modules/salesforce-suite/quick-start

Help improve this page

Page status: No known problems

You can: