Duplicate Records and SFDC Sync

Issue with Duplicate Records

If duplicate records are founds on either the Salesforce side of the sync or the Pendo side of the sync our integration will have to decide which of the duplicate records should be updated and which should be skipped. While the sync will still run, even with duplicate records identified, it will cause some records to be updated and others to be skipped. The confusion that can be caused by having some records update and others not can only be remedied by ensuring that there is a true 1-to-1 match between records in Pendo and Salesforce. 

Examples of 1-to-1 Match

When you first set up your integration you are given the option to choose which field in Pendo you would like to match with a corresponding field in Salesforce. 

sfdc-integration-mapping.png

In the example above I am attempting to match between a Visitor ID in Pendo and the value that is in the real visitor id field on the Contact Object in Salesforce. In this example if my Visitor ID from Pendo is 1234 there will need to be one record in a Salesforce contact with 1234 as the value in the real visitor id field.

Example of Duplicate Match

In the example below we are trying to match a Pendo visitor email address with a Salesforce contact email address. In Pendo the email field is not required to be unique, this means that it is possible that more than one visitor in Pendo could have the same email address associated with it. The same is true on the Salesforce side. 

SFDC-email-mapping.png

Duplicate Records Error Message

You may get a notification when setting up the integration that states that duplicate records were found. This means that there is more than one record on the Pendo side, the Salesforce side or both sides that have the same value in the field you have selected to use for your mapping. Having duplicate records does not cause a sync to fail entirely, but it will result in some records being skipped by the sync. 

What Records Get Skipped

When running a sync Pendo creates two tables of duplicate records. One table contains duplicates found in Pendo and one table contains duplicates found in Salesforce. The sync will compare the duplicates and select the lowest numbered record (if the field is an integer) to update. It will skip the other duplicates. If the field is not an integer it will use a programming technique called `string comparison` to identify which record is 'lower'. If the IDs it is comparing are non-numeric the results of which were updated and which were skipped may appear to be random. 

How do I Fix It?

The best thing that you can do to fix an issue with duplicate values is to work to ensure that duplicates are minimized in both systems. You can do this by selecting to sync on fields that enforce uniqueness. On the Pendo side, both the Account ID and the Visitor ID fields enforce uniqueness - meaning it is impossible to create duplicates. You may be able to select fields in Salesforce that are also enforcing uniqueness. You can also work with your Pendo and Salesforce administrators to identify and clean up any duplicates that are found.