Finding and Processing Duplicates in CRM: Overview of Methods
When working with a large customer database, some CRM elements, such as leads, contacts, or companies, may repeat. The first call from a customer creates a contact with a name and phone number. An email from the same customer creates a new contact with a name and email address — this is a duplicate. Duplicate contacts can be merged.
Quick navigation: all methods and events
User documentation: finding and processing duplicates in Bitrix24
Setting Up Duplicate Search in CRM
In the Bitrix24 interface, duplicate search is available for three CRM objects: leads, contacts, and companies.
When initiating a search, the employee can choose which fields will be used to identify duplicates:
- Leads — Full Name, company name, phone, email
- Contacts — Full Name, phone, email, Tax ID, State Registration Number, and bank account
- Companies — company name, phone, email, Tax ID, State Registration Number, and bank account
Using REST methods, you can extend the duplicate search settings in Bitrix24 by adding additional fields, including custom ones. Additional fields in the search settings will appear in the interface for all employees.
To obtain a list of standard and custom fields that can be used to search for duplicates, execute the method crm.duplicate.volatileType.fields.
To get a list of non-standard fields that are already in use for searching, execute the method crm.duplicate.volatileType.list.
You can add a field to the duplicate search using the method crm.duplicate.volatileType.register, and remove a field from the search using crm.duplicate.volatileType.unregister.
Searching for Duplicates via REST
To search for duplicates through an application or webhook, use the method crm.duplicate.findbycomm. This method allows you to search for duplicates based solely on email address and phone number.
The method crm.duplicate.findbycomm can be used to select a CRM element. For example, you have a CRM activity of type email that came from the email test@bitrix.com. To save this email in CRM without creating a duplicate, you need to check if there is a lead, contact, or company in the customer database with that email. The same email may be recorded for both a contact and the associated company. By executing the crm.duplicate.findbycomm request, you will receive the IDs of both elements along with their types, allowing you to decide whether to attach your email to the contact or the company.
Tutorial on using the method
Merging Duplicates
To merge duplicates, use the method crm.entity.mergeBatch. This method allows you to merge multiple elements of the same type. You can merge two leads, but you cannot merge a lead with a contact.
Full automatic merging is available in several cases:
- The elements are identical to each other
- The elements are not identical, but the differences in field values do not require manual processing. For example, one element has a filled field, while the other has the same field empty — the value from the filled field will be retained.
If automatic merging of the selected elements is not possible due to data conflicts, there may be several reasons:
- The elements have filled fields with different values. You can check the values of all fields using the get method; for example, to check the fields of leads, use the method crm.lead.get.
- The user making the merge request does not have access to one or more fields.
User documentation
Overview of Methods
Scope:
crmWho can execute the method: any user with permission to modify and delete CRM elements
Searching and Merging Duplicates
|
Method |
Description |
|
Returns a list of duplicates |
|
|
Merges duplicates |
Setting Up Duplicate Search
|
Method |
Description |
|
Returns a list of fields that can be used to search for duplicates |
|
|
Returns a list of non-standard fields involved in duplicate search |
|
|
Adds a field to the duplicate search |
|
|
Removes a field from the duplicate search |