This article explains how to configure Salesforce Matching Rules and Duplicate Rules to identify and manage duplicate Leads and Contacts. It also covers testing duplicate detection, displaying potential duplicates on record pages, and using Screen Flows to enhance duplicate management and improve data quality.
To be able to identify Lead duplicates, Salesforce leverage Matching and Duplicates Rules:
Concerning the Matching Rule
These conditions are all the ones applying in standard, to identify matching records, when trying to insert or update a Lead record :
Remark: You will find here the Salesforce article mentioning the Standard Lead Matching Rule, that is already present in Salesforce instances.
Option 1: Configure Standard Matching and Duplicate Rules for Lead Management
Step 1: Configure and activate Matching Rules
Concerning the Duplication Rule
Remark: you will find here the Salesforce article mentioning the Standard Lead Matching Rule, that is already present in Salesforce instances
Step 2: Configure and activate Duplication Rules
a. Record-Level Security: This part will define if the rule should apply only on records on which the concerned user has access by enforce Sharing Rules or on all records regardless of the concerned user’s access by bypass Sharing Rules
b. Actions: This section of the Screen allows you to define if you decide to block or allow the creation of the Lead. It is possible either to block a Lead creation or update, or to allow the creation / update of the duplicate record with an Alert
c. Check or update the Contact and Lead field mappings based on Email, Company, Domain, and other relevant fields. This section allows you to define the Matching Rules used to compare the newly created Lead with existing Lead and Contact records
d. Save and Activate: Once saved, make sure that the Standard Duplicate Rule or the custom one you have set up is Active. Otherwise click on Activate
Step 3: Add the Potential Duplicate component in the Lead contact layout
a. Navigate to the Lead record detail page
b. Click on Gear icon, then Edit Page
c. Drag the Potential Duplicates component, from the Component pane, to drop it within the Lead record page
d. Click on Save and Activate
Step 4: Test the Matching / Duplication Rules
a. Navigate to Leads tab > Click on + New Lead
b. Then create a Lead with the same fields values as an existing Contact, here for example: Ms. Stella Pavlova
c. A few seconds after, a toast message appears on the Contact record page to mention that there may be a duplicate
d. If you click on View Duplicates from the toast message, you will get a dedicated screen with both duplicate Lead and Contact information
Remark:
Option 2: Creation of a Screen Flow to make it easier to handle duplicates from Leads
Step 1: Create a simple Lead related Screen Flow to ease the creation of Leads
a. Go to Setup > Click on Flows > Click on New Flow
b. Select Screen Flow from the Frequently Used section. You may also find it through the View All Automations link
a. The concerned Lead record creation
b. But also, for the Leads and Contacts duplicates identification
Step 2: Drag and drop a Create Records element below the Screen element
a. Make sure to map all fields mandatory to create a Lead record. Map the values from the field's inputs of the Screen Component
b. Toggle on the Check for Matching Records option, to be able to update a related duplicate Lead
Remark: There are two things to consider if you use this feature.
Step 3: Add a custom component to display duplicates on Lead record page
a. Go to Setup > Click on Flows > Click on New Flow
b. Select Screen Flow
a. Click Toggle Toolbox > click on New Resource
b. Select Variable
c. Make sure the Variable you create is named recordId and check the Available for input checkbox
Step 4: In your Screen Flow, create the following elements
a. The matching condition is based on Last Name and First Name, but the logic can be enhanced to rely on other fields
b. Make sure to add a filtering condition on Lead Id, to retrieve all duplicates but not the one whose Id was passed in input
c. Make sure to collect all matching records in a collection, All records
a. The matching condition is based on Last Name and First Name, like in the previous element, but the logic can also be enhanced. As the queried record type is not a Lead in this element, there will not be any interference with input Lead record. That is why there is no condition on Id value in the Filter section
b. Make sure to collect all matching records in a collection, All records
c. One Screen element to display the result of the collections from the previous Get Records outputs
d. Select a Medium Preview Size
Step 5: Add a Display Text component. Write Duplicate Leads in the properties panel
a. Select Leads from Get Duplicate Leads as a Source Collection
b. Configure the Row Selection Mode as Single, and check Require user to make a selection
c. In the Configure Columns section, click +Add column to add Lead Id, First Name, Last Name, Email and Company fields. Confirm each field by clicking on Done button
a. Select Contacts from Get Duplicate Contacts as a Source Collection
b. Configure the Row Selection Mode as Single, and check Require user to make a selection
c. In the Configure Columns section, click +Add column to add Contact Id, First Name, Last Name, Email and Business Phone fields. Confirm each field by clicking on Done button
Step 6: Add the Screen Flow on the Lead record page
Remark: The Screen flow can also be adapted to provide a better display, for example by hiding empty tables and applying more accurate filtering conditions. Besides, you can also leverage Task records creation or Send Email actions and also trigger merge actions based on records selected in the different Data Table components.
References:
_______________________________________________________________
Written by: Eric BURTÉ | Forum Ambassador
Based in France, Eric Burté is Head of Salesforce and AI, within DEVOTEAM Group. As a Salesforce Expert Director, Salesforce Application and System Architect, 19 x Salesforce certified, and 2025-2026 Agentblazer Legend, Eric works with Salesforce project teams, to support them on the design, architecture, build and delivery of their Salesforce projects, and works with his clients in assessment project context, Salesforce ‘Center of Excellence’ teams management, or Design Authority approach implementation.
Answers Leader in Trailblazer Community, Eric has been designated as a Trailblazer Community Forum Ambassador in 2024 & 2025.
Submissions reflect only the opinions of the user who made available the Submission and not the opinions of Salesforce, regardless of whether the user is affiliated with Salesforce, and may contain or constitute products, services, information, data, content and other materials made available by or on behalf of third parties ("Third Party Materials). Salesforce neither controls nor endorses, nor is Salesforce responsible for, any Third Party Materials, including their accuracy, validity, timeliness, completeness, reliability, integrity, quality, legality, usefulness or safety, or any applicable intellectual property rights. Any Submissions made available through any message board or forum in response to posted questions, or that otherwise purports to answer any questions, including any questions about Salesforce or Programs, are made available for your general knowledge only and should never be relied upon as answers to your specific questions (even if an answer is marked as a “best” answer or with any similar qualifications). You should always contact Salesforce support for answers to your specific questions. Salesforce has no control over Submissions, and is not responsible for any use or misuse (including any distribution) by any third party of Submissions.
If you have questions, tap into the wisdom of our entire Trailblazer Community here: https://trailhead.salesforce.com/trailblazer-community/feed
005386514

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.