Managing duplicate leads in Lightning

Duplicates in any Salesforce org can significantly reduce productivity of the Sales team. This can also lead to poor adoption of the Salesforce org and can ultimately lead to low ROI for the Salesforce investment.

There are a large number of apps available on AppExchange. However, there are many inbuilt features in Salesforce that allow users to manage duplicate leads. In this article we talk about three such features in Lightning that can prevent duplicate.

  1. Matching Rules

    Matching rules defines the criteria to identify duplicate records. It compares fields of different records to identify the duplicate records. Matching can be done within a single object’s records or it can be done across two objects records. Salesforce provides standard matching rules for business accounts, person accounts and one standard rule for contacts and leads. Custom Matching rule creation is also available for these objects and custom objects.

    Fuzzy and Exact matching methods are available for standard fields in custom matching rules.

    Let’s see an example of a matching rule. George Jopelin, the sales manager for Cloud Computing Inc. requires a matching rule to detect duplicate leads. Also,he wants to compare leads to contacts. So, we create two matching rules for him. One rule for leads and one rule for contacts. The matching criteria is based on the following fields :- First Name,Last Name and Phone.

    Managing-Duplicate-Leads

    The Steps taken to make the matching rules are as such:-

    • Click on Setup wheel on the top right hand side.
    • In Quick Find Bar, search matching rules.
    • Click the New Rule button to create a custom Matching Rule.
    • Specify the Object for the Matching Rule. Here it is going to lead.
    • Click Next, and on the new menu, Give a name to the Matching Rule.
    • Select the fields on which the matching criteria is going to be based. In our case, They are First Name, Last Name and Phone. We will use an exact matching method with them.
    • Click Save. The same process will be used for creating the contact matching rule except selecting Contact in Select Object menu.
    • Activate both the rules from the Matching Rules menu.
    Managing-Duplicate-Leads

  2. Duplicate Rules

    A duplicate rule defines what happens when a user views a record with duplicates or starts creating a duplicate record. Salesforce provides standard duplicate rules for business accounts, person accounts, contacts and leads. These standard rules are available from Spring ‘15 edition onwards. Standard duplicate rules can be customized and new custom duplicate rules can also be created for objects.

    Once the matching rule identifies the duplicate record, the duplicate rule comes into play.

      The following actions are available in duplicate rule when saving a duplicate record.
    • Blocking or Allowing the creation of a duplicate record.
    • On Edit, Block or Allow saving of a duplicate record.
    • Sending an Alert to the users on editing a record or creation of a duplicate record.
    • Creating a Report when a duplicate record is created or edited. Custom report type is needed to be set up before reporting on the duplicates can be done.

    All Records can be searched regardless of ownership to find duplicates, When Bypass sharing rules are selected in the Duplicate Rules. A condition can also be defined to state when the duplicate rule runs.

    Let’s see an example for Duplicate Rule. Earlier, we made two matching rules for George. Now, We need to assign them to duplicate rules so that we can decide what happens to duplicates when they are identified. George wants to manually decide what happens when a sales rep from his team creates a duplicate lead. He also wants an alert, when a duplicate lead is created. George wants a report to be generated when duplicates are created to fine tune his matching and duplicate rule. If a contact record already exists with the same name and phone number, he wishes to block the creation of a new lead record.

    To fulfil these requirements . We will make two duplicate rules. One that decides what happens to duplicates of lead records and another one which decides what happens when sales reps try to create leads that are duplicates of contact records.

    Managing-Duplicate-Leads

    The Steps taken to make the duplicate rule for the Lead duplicate of the Leads records:-

    • Click on Setup wheel on the top right hand side.
    • In Quick Find Bar, search duplicate rules.
    • Click the New Rule button to create a custom duplicate rule.
    • Select Leadfrom the drop down menu.
    • In the next menu, give a name to the rule.
    • In the Action section,Select Allow on Action On Create. This will let sales reps create duplicate records.
    • In the Action section,Select Block on Action On Edit.
    • Tick Alert and Report in Actions section so that the sales manager can receive alerts and reporting can be done on duplicate records.
    • In the Matching Rules section, Compare Leads with Leads and select the custom lead rule created earlier.As we wish to run the rule every time a lead is created or edited. We will not make any changes to the Conditions section.
    • Click Save and in the next menu, click Activate.
    Managing-Duplicate-Leads

      The Steps taken to make the duplicate rule for the Lead duplicate of the Contact records:-
    • Click on the Setup Wheel on the top right hand side.
    • In the Quick Find bar,search for duplicate rules.
    • Click the New Rule button to create a custom duplicate rule.
    • Select Lead from the drop down menu.
    • In the next menu, give a name to the rule.
    • In the Action section,Select Block on Action On Create. This will prevent sales reps from creating duplicate records.
    • In the Action section,Select Block on Action On Edit.
    • In the Matching Rules section, Compare Leads with Contacts and select the custom contact rule created earlier.As we wish to run the rule every time a lead is created or edited. We will not make any changes to the Conditionssection.
    • Click Save and in the next menu, click Activate.
    Managing-Duplicate-Leads
      Now,to get a report on duplicates.We need to setup a custom report type.We take the following steps to create the custom report type:-
    • Click on the Setup Wheel on the top right hand side.
    • In Quick Find bar,search Report Types.
    • Click on New Custom Report Type.
    • Select Leads as the Primary Object.
    • Create a Report Type Label. Here the name would be Lead Duplicates Report.
    • Store in Category will be Leads here.
    • Select Deployed in Deployment section.
    • Click Next, and select Duplicate Record Items as relate another object.
    • Click Save.
    The lead duplicates report can now be created from the Reports tab.We create a report named New Lead Duplicates Report for George.Whenever,new leads duplicates will be created.they will be shown here.

    Managing-Duplicate-Leads
    • Potential Duplicates Component

      Potential Duplicates is a component available in Lightning App Builder. This component is available for Accounts, Contacts and Leads.

      Managing-Duplicate-Leads

      The component shows an alert in the form of a card or a toast on the record home page when a duplicate record is detected.Duplicate records can also be accessed from this alert and up to three duplicate records can be merged by the users. This feature helps in merging multiple duplicates with an option to manually select the data that is to be retained in the conflicting fields.

      All Salesforce orgs should have these features enabled and setup to ensure high quality of leads. Good data quality increases the confidence of the Sales Team and clients in the Salesforce platform. It also saves time for the users, and increases productivity..

      For any query on Managing Duplicate Leads, contact support@astreait.com