Quick Start
This quick start guide applies to both Drupal 10 and 11 versions, and .
- Download Salesforce Suite module and dependencies with composer
- composer install
composer require drupal/salesforce drupal/key drupal/typed_data
- composer install
- Enable the modules from the admin ui or using the following code (Depending on the project needs, chose from enable push, pull, or both.)
- From the UI go to Extedn /admin/modules and select the modules to enable
- Enable with drush from command line
-
drush en salesforce salesforce_jwt salesforce_mapping salesforce_push salesforce_pull salesforce_mapping_ui -y
-
- Remember always Export the configuration and save it on your code repository
- Log in to your Salesforce org or sign up for a Salesforce Developer org if you don't have an existing Salesforce org to login with.
- Create a new connected app in Salesforce
- Set up your JWT OAuth provider in Drupal
- Navigate to Admin > Structure > Salesforce > Mappings ( https://<your hostname>/admin/structure/salesforce/mappings ) and create some mappings to get started.
For Drupal 9, 8 and 7 versions.
- Download Salesforce Suite module to your Drupal site and enable at least salesforce_mapping. Enable salesforce_push to send data from Drupal into Salesforce. Enable salesforce_pull to retrieve data from Salesforce into Drupal.
- composer install (recommended)
composer require drupal/salesforce drupal/salesforce_jwt drupal/salesforce_mapping drupal/salesforce_push drupal/salesforce_pull drupal/salesforce_mapping_ui - drush enable
drush en salesforce salesforce_jwt salesforce_mapping salesforce_push salesforce_pull salesforce_mapping_ui -y
- composer install (recommended)
- Log in to your Salesforce org or sign up for a Salesforce Developer org if you don't have an existing Salesforce org to login with.
- Create a new connected app in Salesforce
- Set up your JWT OAuth provider in Drupal
- Navigate to Admin > Structure > Salesforce > Mappings ( https://<your hostname>/admin/structure/salesforce/mappings ) and create some mappings to get started.
Mapping Data
Mapping data is actually fairly straightforward.
- You will want to set up fields in the content type first. Those fields should match field types (checkboxes, lists, rich text fields, etc)
- Create the mapping type /admin/structure/salesforce/mappings
- Click fields to get to the specific mappings for that object
- In most cases, for mapping a Drupal field to a Salesforce field, you'll select "properties" when adding a field type.
- The salesforce field should be listed as it appears in Salesforce.
- Once you have an initial pull of data, you can test the mapping individually as below.
Pulling and Pushing Data
After you have set up your structure and mapped data, you have a couple of ways of adjusting how often data is pushed and pulled.
Overall Settings
The overall settings are found at /admin/structure/salesforce/mappings/manage/XXX (XXX being the specific object you are pulling/pushing from Salesfroce). This sets up how overall data is pushed and pulled. What actions trigger things, the SOQL Query by which data is pulled, the pull frequency, and the ability to set up a standalone URL to process data. It also gives you control over what date field controls the pull, and gives you control to reset the last pull and last delete date.
Individual Mapped Objects
You can also pull an individual record. Going to your piece of content that is constructed from Salesforce Data, there is a "Salesforce" Tab that should be present. This gives you information about the object mapping. If you click on Edit, this gives you the ability to pull (or push) a specific Salesforce object, which is very useful in troubleshooting, or adding new mappings. These mappings are also listed at /admin/content/salesforce
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion