Let's look at using syncing to implement some typical workflows in Sitecore and Salesforce.

What is syncing? It's the replication of data from one system to another and functionality that tries to keep both data sets up-to-date. The alternative is having a single source of truth and accessing the data when you need it in real time. Does that mean syncing creates a double source of lies? There is some truth to that statement!

This discussion considers syncing from a Sitecore perspective, with tools like Sitecore Connect™ for Salesforce CRM versus using real-time tools like S4S. Salesforce oriented syncing tools using products like Lightning Sync are not covered.

You can probably tell already, I'm not a believer in syncing. It introduces many problems not seen when a single source of truth is used. With today's massive bandwidths, reduced propagation delays, and advanced caching, architects should be aiming to transact from a single data source. Using syncing tools can really bite you so let's review the challenges remembering the Last Modified Date is typically used to minimize sync data volumes.

Case 1: Website visitor submits a Sitecore form

Sync Sitecore to Salesforce

The form field data is pushed to a Salesforce lead or contact. The Sitecore analytics are also synced so the Salesforce team gets vital sales intelligence.

Problems

  1. Data is not available (or refeshed) in Salesforce until a scheduled task executes.
  2. Salesforce data is blindly created or overwritten with no respect for business rules.
  3. Sync cannot update multiple fields and objects in Salesforce where the number of Sitecore objects is unknown e.g multiple Sitecore goals appear as one goal in Salesforce.
  4. Blind syncs cannot handle leads that have been converted to a contact.
  5. Salesforce field data changed since the last sync get overwritten.

Solution

Use Salesforce as a single source of truth. Query Salesforce first, then, respecting the create vs. update business rules, push the form data and analytics to Salesforce in real-time. Iterate through Sitecore collections and update Salesforce as required.

Note that the S4S Mapping Wizard lets administrators map Sitecore forms to Salesforce without development effort.

Case 2: Push Sitecore xDB facets to Salesforce fields

Sync Sitecore to Salesforce

Facet field and collection values are pushed to Salesforce so the sales team can see the Sitecore visitor status and attributes. Typically calculated contact facets that store engagement values are needed in Salesforce where they are useful for creating activity reports and campaigns.

Problems

  1. All the issues in Case 1.
  2. The data in Salesforce is in an unknown state (when was it last synced? Will new values in Salesforce be overwritten by the sync?).
  3. When unrelated fields are updated in Sitecore, the Last Modified Date is changed causing the contact to be unnecessarily synced to Salesforce.
  4. No toolset to deal with complex object schemas in Salesforce.
  5. It is challenging to sync only the necessary data. Often trial syncs bloat Salesforce with redundant data.
  6. Large syncs are CPU intensive iterating through xDB.

Solution

Use Salesforce as a single source of truth. Data states are accurate in Salesforce as facets are pushed in real time based on a Sitecore event. Real-time tools like S4S can execute complex granular updates that may include querying Salesforce first to ensure business rules are respected. Iterative updates have far less impact on CPU resources.

Case 3: Set email subscription preferences in xDB

Sync Salesforce to Sitecore

A common need to populate the Sitecore email subscription preferences page with values from Salesforce. The challenge is matching the Sitecore visitor with a Salesforce lead or contact - Sitecore will only know the visitor's email address if it was submitted in a previous session. One solution is using email to create a shared identity in both systems.

  • A Salesforce lead/contact or custom identifier is passed to the marketing automation software (MAS) e.g. Salesforce Marketing Cloud, Pardot or Marketo.
  • An email is created in the MAS that contains a link to the Sitecore website. The Salesforce identifier is added to the URL as a parameter. The emails are dispatched to the recipients.
  • Recipients click on the link in the email and are directed to the Sitecore website.
  • Sitecore sees the identifier in the URL parameter and adds it to the Sitecore contact facet.
  • Sitecore uses the identifier to fetch the email subscription preferences from Salesforce and displays them on a web page.

Problems

Prior to the visitor's arrival, it is not possible to sync the email subscription preferences as there is nothing in xDB to identify the visitor. A real-time "get" is required when the visitor arrives on the website and Sitecore becomes aware of the identifier.

Solution

When the visitor arrives on the website, immediately query Salesforce for the email subscription preferences, store the identifier in the facet, and populate the email subscription preferences page values in real time.

Case 4: Set email subscription preferences in Salesforce

Sync Sitecore to Salesforce

Following on from Case 3, a typical scenario is as follows:

  • A Sitecore visitor changes their preferences on the email subscription preferences page.
  • Preferences are synced to Salesforce and the visitor is added to a chosen campaign(s).
  • The campaign is shared with the MAS and the emails dispatched as per Case 3.

Problems

  1. All the issues in Case 1 and 2. 
  2. In particular, the delayed updating means the true data state in Salesforce is unknown.

Solution

Push subscription updates to Salesforce in real time.

Case 5: Salesforce record status in xDB

Sync Salesforce to Sitecore

To improve sales calls, it is useful to personalize the website in real time and for future visits. Syncing can partially achieve the latter to a limited degree.

Problems

  1. Syncing is not "on demand" so real-time personalization is not possible.
  2. The sync cannot be initiated in Salesforce as no such functionality exists.
  3. It is challenging to filter the quantity of data to only what is needed. Often trial syncs inundate Sitecore with redundant data.

Solution

Driving Sitecore personalization and functionality in real-time requires Salesforce callouts or outbound messages to initiate a transaction of data. This is not within the scope of sync tools that do not implement functionality within Salesforce.

A more comprehensive integration like S4S is required.

Case 6: Create Sitecore EXM email lists

Sync Salesforce to Sitecore

Companies that use Sitecore EXM to mass email prospects, partners, and customers need to populate Sitecore lists with Salesforce reports and campaigns.

Problems

  1. Syncing cannot dynamically execute a Salesforce report so this is not possible.
  2. Sitecore lists should remain static and not synced while emails are being dispatched (lists are inaccessible when being indexed after a change). 
  3. Ideally, syncs should be able to join multiple Salesforce campaigns into a single Sitecore list.
  4. Syncs cannot easily import the attributes of related entities like leads and contacts.

Solution

Scheduled syncs will not work as the Sitecore list must remain unchanged while Sitecore emails are dispatched. A more comprehensive solution is to use S4S List Builder to overcomes the issues associated with syncing.

Conclusion

Syncing can work in simple use cases but inevitably your requirements will require you to work around the constraints of syncing - business is complex in that way. Sitecore and Salesforce have significantly different data schemas which means that one-to-one mapping is hardly ever possible. With blind syncing introducing data quality, granularity, performance and availability issues, companies should think twice about all their requirements before going down this path.

Real-time tools, like S4S, lets you engineer precise syncing, or even better, enabling a real-time single source of data to be used, and provides a host of out-of-the-box features. If you need help or need to learn more about how to add value to your business in this way please contact us for more information.