Loading
Upcoming Mandatory Changes to Public Key Infrastructure (PKI)Read More
Salesforce Enforces New Security Requirements in Summer 2026Read More

Manage Duplicate Leads and Contacts in Salesforce

Publish Date: Jun 23, 2026
Description

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.

Resolution

To be able to identify Lead duplicates, Salesforce leverage Matching and Duplicates Rules:

  • Matching Rules allow defining rules to identify duplicates among records in a Salesforce instance
  • Duplicate rules define what Salesforce does when identifying these matching records

Concerning the Matching Rule

  • You can naturally choose to create a specific custom Matching Rule if you want to adapt the standard behavior. The following article uses the Standard Matching and Duplication Rules 

These conditions are all the ones applying in standard, to identify matching records, when trying to insert or update a Lead record :

  • OR (First Name AND Last Name AND Title AND Company)
  • OR (First Name AND Last Name AND Email)
  • OR (First Name AND Last Name AND Phone AND Company)
  • OR (First Name AND Last Name AND Mailing Street AND (City OR ZIP OR Phone))
  • OR (First Name AND Last Name AND Mailing Street AND Title)
  • OR (First Name AND Last Name AND Title AND Email)
  • OR (First Name AND Last Name AND Phone)

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

  • Go to Setup > Click on Data > Click on Duplicate Management > Select Matching Rules
  • Click to open the Standard Lead Matching Rule
  • Make sure that the Standard Matching Rule, or the custom one you have set up is Active. Otherwise click on Activate

 

Concerning the Duplication Rule

  • Once the Matching Rule is defined or identified, the user has to define and Activate the Duplication Rule that is based on this Matching 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

  • Go to Setup > Click on Data  > Click on Duplicate Management > Select Duplicates Rules

 

  • Click on Standard Lead Duplicate Rule link

  • Edit the Duplication Rule to tweak the way this Duplication Rule is applying

         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

  • On the default record page, the Potential Duplicate component should be present to display duplicates
  • If the component is not present, follow the following instructions:

         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

  • Once the Matching and Duplication Rules are activated, and the Lead record page is updated, try to create a duplicate record to validate that the behavior of your configuration is compliant with the configuration you have set up on your Salesforce instance

         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:

  • As the kind of data is different, the Lead and Contact records cannot be merged. Otherwise, for two similar Leads or two similar Contacts, you would be able to merge both of them. In this case, the simplest way is to open both records, complete your Contact, log the new activity or all discussions that are relevant, and delete the Lead record, or update it to the proper status
  • For information, Duplicate information is not properly shown on the Lead record page, but it is well present on the Contact record page as in the previous screenshots. To make it properly visible on the Lead record, with the right information, we need to switch in Classic mode and click on the Find Duplicates button on the concerned Lead record as shown in the below

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

  • You can create a specific Screen Flow that will take care of checking the existence of equivalent Contacts with the same information. The difference is that you will not be able to leverage your Matching Rules within it, but would need to define them again in this Flow
  • To do so, create a Screen Flow

         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

  • Once the Flow is created, click the + sign within the Flow, and add a Screen Component
  • Click in the Screen Component, and add the input fields components for the fields that will be used for:

         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.

  • The matching is made against the same kind of object as the one you are trying to create match with Leads records in this case
  • The Check for Matching Records conditions are only AND and OR. As for now, there is no custom formula possible in this section

Step 3: Add a custom component to display duplicates on Lead record page

  • You can naturally adapt the previous Screen Flow to query both Leads and Contacts by using one Get Records element for each type of record and then display both results in a Screen, or into the page in which the Screen Flow is embedded, using two data tables one with the list of potential duplicates Leads records, and one with the list of potential duplicates Contact records
  • As this more elaborate Flow is planned to be displayed on Lead record page, the Lead record Id should be set up as input variable to the Flow

         a. Go to Setup > Click on Flows > Click on New Flow

         b. Select Screen Flow 

  • Create an input variable to pass the Record Id of the Lead record, whose page will display this Screen Flow component

         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

  • One Get Records element to get the Lead record, based on the input recordId variable
  • The Filter section should include a test that the queried Lead Id is the same value as the one passed in input. As this test is testing the Id value, and the technical Id is unique, this Get Record element could only store one record as an output

 

  • One Get Records element to get the Matching Duplicate Lead records

         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

  • One Get Records element to get the Matching Duplicate Contacts 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

  • Below adds a Data Table component to display duplicate Leads of the input Lead record

         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

  • Below adds a Display Text component. Write Duplicate Contacts: in the properties panel
  • Finally add a Data Table component to display duplicate Contacts of the input Lead record

         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

  • Save and Activate the Screen Flow as Display Duplicates

Step 6: Add the Screen Flow on the Lead record page

  • Display a Lead record detail page
  • On the Lead Record page, click on Gear icon > Click on Edit page
  • Drag the Flow component from the left Components panel, and drag it into the Lead record page
  • Click on the Flow component to display the Flow properties panel
  • Select the Display Duplicates Flow that has just been created
  • Click on the Pass record ID into this variable, the recordId value will be filled in with {!Record.Id} and grayed out

  • Save and Activate the Lead record page

  • The Lead record page now displays its Leads and Contacts duplicates on the right part of the screen

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

 

 

 

 

Knowledge Article Number

005386514

 
Loading
Salesforce Help | Article