Salesforce
The Salesforce Extension for Zephr facilitates the sharing of user and product information between Zephr and Salesforce, enabling seamless integration and data synchronization.
This page provides information on the Salesforce Extension for Zephr. The plugin allows you to share user and product information between Zephr and Salesforce.
Configuring the Salesforce extension
To enable the Salesforce Extension within Zephr, navigate to Settings > Extensions > Salesforce. If you cannot see the Salesforce option in your list of Extensions, email support@zephr.com.
Once on the configuration screen, you’ll see a number of sections – Salesforce OAuth Details, Identity, Webhook Configuration, Salesforce Integrations, Salesforce/Blaize Mapping and Activate Plugin.
Salesforce OAuth Details
First, click Salesforce OAuth Details. Here, you’ll need to input the following information:
- Username
- Password
- Client ID
- Client Secret
- A token URL
If you do not have OAuth credentials, you will need to create them in Salesforce. Refer to the Salesforce Help Section for details on how to do this.
Once added, click Done.
Identity
In this section, enter the Email Verification Redirect. This is the redirect path that should be used for email verification emails delivered by Salesforce.
Once added, click Done.
Webhook Configuration
Communications from Salesforce back to Zephr are handled by issuing webhooks from Salesforce for which your Zephr tenant will listen. To help secure these webhooks, you will need to provide a secret on each webhook: the secret that Zephr will expect to receive with any webhook from Salesforce is configured here. It is recommended to use a secret that is both URL-safe and hard to guess: a UUID (v4) is ideal.
Once added, click Done.
Salesforce Integrations
On the Salesforce Integrations page, you’ll see a list of checkboxes. These checkboxes provide details on the different data flows that can take place out-of-the-box between Salesforce and Zephr.
A note on Zephr users and Salesforce Contacts/Leads: Zephr does not distinguish between Contacts and Leads in the way Salesforce does. As such, we have provided configuration options so that upon the creation of a Zephr user, the user can be synced to Salesforce as either:
- A Salesforce Contact
- A Salesforce Lead
- Both a Salesforce Contact and a Salesforce Lead
Below are details on each of the options:
Create Contact on Zephr User registration
After a user is created in Zephr, Zephr will:
- Check Salesforce for a Contact with the Zephr User’s email
- If found, save the Salesforce ID to the Zephr User’s Extended Profile
- If not found, create a Salesforce Contact
Push user changes in Zephr to Salesforce contacts
After a user is updated in Zephr, Zephr will:
- Check for a Salesforce ID in the Zephr User’s Extended Profile
- If found, update the Salesforce Contact
- If not found, check Salesforce for the Zephr User’s email address
- If found, update the Salesforce Contact
- If not found, create a Salesforce Contact
Delete Contact on Zephr User “Forget Me”
After a user is deleted in Zephr via the “Forget Me” API, Zephr will:
- Check for a Salesforce ID in the Zephr User’s Extended Profile
- If found, delete the corresponding Salesforce Contact
Sync Purchases to Zephr
This will allow Purchases added in Salesforce to sync to Zephr Products, in turn granting Zephr Users access to content in line with the access rules you put in place. In order for this to work, you will need to add a mapping, which can be done in the Mapping tab of the Salesforce Configuration page within your Admin Console. See ‘Mappings between Zephr and Salesforce’ below for example mappings.
Allow Salesforce to push changes to Zephr Users
This will allow updates made in Salesforce to Contacts to also be made to the corresponding Zephr User. A mapping will be required for this. See ‘Mappings between Zephr and Salesforce’ for an example.
Create Lead on Zephr User Registration
This will create a Lead within Salesforce at the point that a User is created within Zephr. A mapping will be required for sharing information between the User and the Lead. See ‘Mappings between Zephr and Salesforce’ for an example.
Check each option that is relevant to your integration, and click Done.
Salesforce/Blaize Mapping
Here you’ll require a series of JSON mappings between Salesforce and Zephr in order to share information between the two systems. This includes mappings for:
- Zephr Users to Salesforce Contacts
- Zephr Users to Salesforce Leads
- Salesforce Contacts to Zephr Users
- Product ID Mapping
Enter your mappings as required, and click Done.
Example Zephr User to Salesforce Contact Mapping
Within the ‘attributes’ and ‘identifiers’ blocks, the format is
'zephr_key': 'salesforce key'
{
"attributes": {
"first-name": "FirstName",
"last-name": "LastName"
},
"identifiers": {
"email_address": "Email"
},
"email_verified": "CustomSalesforceEmailVerifiedField"
}
Example Zephr User to Salesforce Lead Mapping
The format for this is generally
'zephr_key': 'salesforce_key'
. The exception to this is the ‘always_include’ block which notes static values to apply to Salesforce attributes (these will be applied to each Lead created).
{
"always_include": {
"Blaize_Registered_User__c": true,
"LeadSource": "Website Registration"
},
"attributes": {
"first-name": "FirstName",
"last-name": "LastName"
},
"identifiers": {
"email_address": "Email"
},
"email_verified": "CustomSalesforceEmailVerifiedField",
"tracking_id": "Blaize_Tracking_Id__c",
"user_id": "Blaize_User_Id__c"
}
Salesforce Contacts to Zephr Users
The format within the ‘attributes’ and ‘identifiers’ blocks is
'salesforce_key': 'zephr_key'
.
{
"attributes": {
"FirstName": "first-name",
"LastName": "last-name"
},
"identifiers": {
"Email": "email_address"
}
}
Example Product Mapping
The format is
'zephr_product_id': 'salesforce_product_id'
. Note: the Zephr Product ID is sometimes referred to as the ‘slug”.
{
"product-one": "01234ABC",
"product-two": "56789DEF"
}
Activate Plugin
Once you’ve input the relevant details, confirm which of your Sites the extension should be active on. To do this, use the toggles for each site under the Activate Plugin section, or choose Select All Sites.
Once completed, click Save. Your extension is now enabled and will transfer data between Salesforce and Zephr based upon your integration preferences.