Enhancing Duplicate Detection

How to tailor your duplicate detection across multiple fields.

While this example focuses on Email Addresses on Contacts, the logic applies for all fields on any object that Salesforce can duplicate match.

Ever have a scenario where you have an email address and you want to duplicate check for it across multiple fields but only want to save it to a single email field? Well, there is a way to achieve this.

When MoveData calls Salesforce to execute a Duplicate Detection, MoveData first runs the Mapping flows. This is to ensure that the record used to detect a duplicate has all relevant values set. Using an extension flow, it is possible to extend the Mapping phase to set values that are exclusively used by the Salesforce Duplicate Detection process.

When the Mapping flows are executed, a system variable called DuplicateCheck is passed. When this value is true, the mapping rules are being run for the purpose of a duplicate check.

Example

This organisation stores email addresses across both Email and HomeEmail depending on email type. However, they want MoveData to only save the email address in the Email field.

The organisation has authored a matching rule that will check both the Email and HomeEmail fields.

Using MoveData's NPSP flows, the contact's Email field is being properly set. However, it is not matching on contacts with a matching email address in the HomeEmail field. This is because the HomeEmail fields is never set and Salesforce doesn't have any logic to check across multiple email fields for the same value.

To ensure this scenario is address, we have created an extension flow that will check to see if a duplicate check is executing (DuplicateCheck = true) and if so, will also set the HomeEmail field with the provided email address.

MoveData will now match the provided email address against multiple email fields but will only ever save the Email field to the contact record.

In the above example, a contact named James Kent had a matching email address in the HomeEmail field and was successfully matched.

Last updated