---
title: Avoid Duplicate Leads
description: "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. Note: You have the option of ..."
url: "https://supportb.kinsta.cloud/docs/avoid-duplicate-leads/"
updated: "2020-07-13"
category: Leads Settings
---

# Avoid Duplicate Leads

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.

**Note:** You have the option of marking up to 3 fields as unique, including custom fields (see [How to Mark Custom Fields as Unique](https://help.leadsquared.com/how-to-make-a-custom-field-unique-in-your-leadsquared-application/)). 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.).

 

## 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.

 

## Best Practices

These settings will help you prevent duplicate lead creation -

1. **Setting the phone and mobile fields to 'Phone Control'**
   Helps you avoid creating duplicates due to phone format mismatches
2. **Marking the phone and mobile fields as unique.**Prevents new duplicates from being created.

 

### 1. Phone Control Settings

When you set the 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 -

![phone control on add new lead form](http://help.leadsquared.com/wp-content/uploads/2018/05/phone-control.png)

1. Navigate to [My Account>Settings>Customization>Lead Fields](https://in21.leadsquared.com/Settings/CustomFields), search for the 'Phone/Mobile Number' field.
2. Hover your cursor over the settings![Settings icon](http://help.leadsquared.com/wp-content/uploads/2018/03/settings-1.png)wheel alongside the mobile field and click **Edit**.
3. Under the**Input Data Properties** section, set the **Show As** option to **Phone Control**.
4. You can set a restriction on the mobile number length and enter the minimum and maximum number of digits.
5. Click **Save**.

![control phone format](http://help.leadsquared.com/wp-content/uploads/2018/05/Phone-Control.gif)

 

### 2. Marking Uniqueness

First, check if the phone and mobile number fields are marked unique -

1. Navigate to [My Account>Settings>Customization>Lead Fields](https://in21.leadsquared.com/Settings/CustomFields), search for the 'Phone/Mobile Number' field.
2. Under the **Meta Info** column on the grid, check the key ![unique key](http://help.leadsquared.com/wp-content/uploads/2018/05/unique.png) icon.
   - If the key icon is green![unique green](http://help.leadsquared.com/wp-content/uploads/2018/05/marked-unique.png), it implies that the field has been marked unique.
   - If the key icon is grey![unique key](http://help.leadsquared.com/wp-content/uploads/2018/05/unique.png), the field has not been marked unique.

If the fields haven't been marked as unique -

1. Hover your cursor over the settings![Settings icon](http://help.leadsquared.com/wp-content/uploads/2018/03/settings-1.png)wheel and click **Mark** **Unique**.
2. On the **Mark Unique** pop-up,
   1. Click the **Mark Unique** button to proceed to step 2 of 2.
   2. Select the minimum and maximum mobile number length.
   3. 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.
   4. 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.
   5. Click **Save**.

![marking mobile as unique](http://help.leadsquared.com/wp-content/uploads/2018/05/Mark-Mobile-Phone-Number-Unique.gif)

 

## 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 -

![error with unique field](http://help.leadsquared.com/wp-content/uploads/2018/05/unique-field-error.png)

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 -

 

### 1. Merge leads

There are 2 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.

1. On the main menu, navigate to [Reports>Reports Home](https://in21.leadsquared.com/Reports/Viewer?id=800&type=1&categoryName=Administrative%20Reports) and search for the **List of Duplicate Leads** report.
2. Filter by the **Phone/Mobile Phone** field and click **Show Duplicates**.
3. Beside each duplicate record, click the **Merge** link.
4. Select the values you want to retain for each column and click **Merge**.
5. Once the lead is merged you can choose to go to the merged lead's details page or to the **Manage Leads** page.

![Duplicate Leads Report](http://help.leadsquared.com/wp-content/uploads/2018/05/Merging-Leads.gif)

**B) The Lead Merge API (Optional)**You can also merge leads programmatically using the [Lead Merge API](https://apidocs.leadsquared.com/merge-leads/).

 

### 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 the mobile number field. 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](https://in21.leadsquared.com/LeadManagement) 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](https://help.leadsquared.com/how-can-i-export-leads-or-backup-my-existing-lead-details/).
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 which lead details to retain.

**2. Identify Duplicates**Identify duplicate values in the mobile phone 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](https://support.office.com/en-us/article/find-and-remove-duplicates-00e35bea-b46a-4d5d-b28e-66a552dc138d)). 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](https://in21.leadsquared.com/LeadManagement) page to import the data back into LeadSquared (for more information, see [How to Import Leads](https://help.leadsquared.com/how-to-import-leads/)). While importing the file, ensure -

1. Ensure that the email address is the **Search Key** during import (step 2 of import).
2. Select the **Overwrite** **duplicates** option during import (Step 3).

![troubleshooting duplicates](http://help.leadsquared.com/wp-content/uploads/2018/05/Upload-duplicates-file.gif)

**4. Mark the 'Mobile Phone' field as unique.**
Now that all duplicates are dealt with, you'll be able to mark the 'Phone/Mobile Number' field as unique (see step 2 of Best Practices section above).
