In this article, we’ll explore the “Check for Duplicates Before Creating Records” in a flow feature, a new addition in the Summer ’24 release. Duplicate records in Salesforce can be created due to various reasons. Here are some common causes:
- Manual Entry Errors: Users might accidentally create duplicate records when entering data manually, especially if there is no proper validation or checks in place.
- Integration Issues: When integrating Salesforce with other systems (like ERP or marketing automation tools), duplicates can be created if any mapping errors.
- Importing Data: Bulk imports of data, especially from spreadsheets or other databases, can sometimes result in duplicates if the import process doesn’t include proper deduplication rules.
Managing and Preventing Duplicate Records
Let’s learn about how to Check for Duplicates Before Creating Records in a Flow. To manage and prevent duplicate records in Salesforce, consider implementing these best practices:
- Duplicate Rules/Matching Rules: Set up duplicate/matching rules in Salesforce to identify potential duplicates based on specific criteria (like email address, phone, or unique Ids.) before records are created.
- Automation: Use automations like triggers to automatically merge duplicate records or notify users when potential duplicates are detected.
In the Summer ’24 release, Salesforce has introduced a new feature that enables you to prevent duplicate records within flows by incorporating a duplicate check before record creation. Where you can find: In Flow Builder, create a flow that includes a Create Records element. In the Create Records panel, we can find the option called Check for Matching Records. We have to enable this option.
We have to specify criteria for matching duplicate records, such as email address, phone, name, etc; any existing records with the same email will be considered as duplicates.
If we observe, there is an option to update or skip the matching records.
- If you choose to update matching records, the flow modifies the records with the values that you provide.
Let’s assume I’m trying to create a new contact with First name “Satyam”, Last name “Parasa” and Email “[email protected]”, But here Email already exists for another contact as below.
The system will look for matching records with the same email address. In this case, only one record was found. Since we selected the option to update the matching record, the existing contact’s first name and last name will be updated.
Similarly, if the system finds multiple records with the same email address, it will update only the most recently updated matching record. Here, two contacts were found with the same email address.
The first contact( Stella Pavlova) is a recently updated contact, so it will be updated.
2. If you choose to skip matching records, the flow doesn’t create or modify any records.
Since we selected “skip matching records,” the system won’t update anything if matching records are found; it will leave them unchanged.
This is about the new feature “Check for Matching Records in a Flow”. Please add comments if you have any questions, and feel free to share this information with your Salesforce admins if you find it useful. Thanks!
Thank you for this very helpful guide about this new flow feature!