1. Feature Overview
There are measures you can take to avoid creating duplicate leads in your LeadSquared account. If you’ve already created duplicate leads, you can merge them, sanitize the existing data and avoid creating them in future.
Fields you mark as unique will not accept duplicate values. You have the option of marking up to 3 fields as unique, including custom fields (see How to Mark Custom Fields as Unique). It is good practice to mark the phone/mobile fields unique to avoid creating duplicate leads with the same phone number through different channels (landing pages, forms, etc.).
Note: Accounts created before 13th November 2017 have only the email address field marked as unique by default. This article is only relevant for these users. Accounts created after this date have the email, phone and mobile fields marked as unique by default.
2. Example Use Case
If the phone and mobile fields are not marked as unique in your account and an existing lead re-inquiries through a different channel, this may create a duplicate lead.
3. Best Practices
These settings will help you prevent duplicate lead creation –
- Setting the phone and mobile fields to ‘Phone Control’
Helps you avoid creating duplicates due to phone format mismatches - Marking the phone and mobile fields as unique.
Prevents new duplicates from being created.
3.1 Phone Control Settings
When you set the phone/mobile number field to display as ‘Phone Control’, it standardizes the mobile number format across all your lead add forms and landing pages. It makes the country code mandatory and lets users only enter a defined number of digits. Here’s what it looks like on the ‘Add New Lead‘ form –
- Navigate to My Account>Settings>Leads>Lead Fields, search for the ‘Phone/Mobile Number’ field.
- Hover your cursor over the settingswheel alongside the phone/mobile field and click Edit.
- Under the Input Data Properties section, set the Show As option to Phone Control.
- You can set a restriction on the phone number length and enter the minimum and maximum number of digits.
- Click Save.
For more information, refer to Control Phone Number Format While Capturing Leads.
3.2 Marking Uniqueness
First, check if the phone and mobile number fields are marked unique –
- Navigate to My Account>Settings>Leads>Lead Fields, search for the ‘Phone/Mobile Number’ field.
- Under the Meta Info column on the grid, check the key icon.
- If the key icon is green, it implies that the field has been marked unique.
- If the key icon is grey, the field has not been marked unique.
If the phone and mobile fields have not been marked as unique, follow this process for both fields.
- Hover your cursor over the settingswheel and click Mark Unique.
- On the Mark Unique pop-up,
- Click the Mark Unique button to proceed to step 2 of 2.
- Select the minimum and maximum mobile number length.
- Ensure the Country Code Is Mandatory checkbox is ticked. If you’ve enabled phone control as instructed (first step of best practices), this checkbox will be ticked by default. Otherwise, you can tick the checkbox and the phone control setting will automatically get enabled.
- The If Not Provided drop-down lets you choose between throwing an error or proceeding with a default country code if a user doesn’t provide a country code.
- Click Save.
4. Troubleshooting Errors
If you already have duplicate values for the mobile number field when you attempt to mark it as unique, you’ll see the following error –
In this case, LeadSquared can’t mark the field as unique because there are already duplicate values for the field in your account. Here’s how you can address the issue –
4.1 Merge leads
There are 3 ways you can merge duplicate leads –
A) The Duplicate Leads Report
The duplicate leads report lets you filter duplicate leads based on the company, email, phone number or mobile phone fields. It also lets you merge duplicate leads by selecting the values you want to keep versus the ones you don’t.
- On the main menu, navigate to Reports>Reports Home and search for the List of Duplicate Leads report.
- Filter by the Phone/Mobile Phone field and click Show Duplicates.
- Beside each duplicate record, click the Merge link.
- Select the values you want to retain for each column and click Merge.
- Once the lead is merged you can choose to go to the merged lead’s details page or to the Manage Leads page.
B) The Lead Merge API (Optional)
You can also merge leads programmatically using the Lead Merge API.
C) Automation
You can also use the If Lead Exists automation condition and follow it up with a Merge Leads action.
4.2 Sanitize existing data through export and re-import.
To ensure that you can mark the phone/mobile number fields unique, you must first ensure that there are no duplicate values in these fields. This requires you to export all your leads to a CSV file and then re-import that data.
1. Export Lead Data
Export your lead data from the Manage Leads page. Choose the Export Leads option under the Action column. You can choose to export all fields or selected fields. For more information, see How to Export Leads.
We recommend that you export the ‘Created On’ and ‘Modified On’ fields so you can track which lead was last created. This will help you identify leads you wish to delete (if any).
2. Identify Duplicates
Identify duplicate values in the phone/mobile fields in your CSV file. Microsoft Excel has some options that allow you to do this (for more information, see Find and Remove Duplicates in Excel). After identifying the duplicates, you could choose to remove them or you could enter different values for the duplicate mobile numbers, for example –
First Name | Phone Number |
John | 9812345678 |
John | 9812345678.dup1 |
John | 9812345678.dup2 |
3. Standardize the format across all phone records
We recommend that you remove the country code and leave just the phone number digits. The ‘phone control’ setting will capture the country codes going forward so you won’t have to worry about format mismatches.
4. Import the data back into LeadSquared
Use the Import Leads button on the Manage Leads page to import the data back into LeadSquared (for more information, see How to Import Leads). While importing the file –
- Ensure that the email address is the Search Key during import (step 2 of import).
- Select the Overwrite duplicates option during import (Step 3).
Now that all duplicates are dealt with, you’ll be able to mark the ‘Phone/Mobile Number’ fields as unique (see step 2 of Best Practices section above). You’ll now see the following success message –
Any Questions?
Leave us a comment below if you have any questions.