Find Duplicate Contacts searches through your existing contacts to identify 'suspected' duplicate records - using the Duplicate Contact Rules which you've configured for your site.
Click Use Rule next to the type of contact for which you want to look for duplicates. You will get a list of contacts which are suspected duplicates. You can then select a contact and compare it to the suspected duplicate by viewing the differences in the field values.
If you determine that the contacts are actually duplicates, you can merge the duplicate contact information INTO the "main contact". All activities and related information can be merged if you so choose.
The duplicate contact will be automatically deleted after it's information has been merged.
|title||Dedupe by Group to Avoid Timeout Errors|
If you have a large number of contacts and/or your server's PHP maximum execution time is set too low - you may get the following error when during this process:
|Bloc de code|
Fatal error: Maximum execution time of 30 seconds exceeded
One work-around is to tell CiviCRM to dedupe your contacts "one group at a time". To do this, add a group ID (&gid=) to the end of the URL.
EXAMPLE: To find duplicate contacts in group 3:
|Bloc de code|
NOTE: This will only work with Standard Groups - i.e. it will not work with Smart Groups.
|title||Use custom data to exclude known non-duplicates|
During deduplication you may find a pair of contacts who match the rule but aren't duplicates (for instance, two John Smith's). Here's a way to mark them to prevent CiviCRM thinking they are potential duplicates. (The example given here assumes the dedupe rule applies to Individuals and matches both First Name and Last Name.)
- Add a custom group called "Deduplication" which attaches to Individuals (or to whatever contact type your rule applies)
- Add a custom field called "Name shared" (or a name that matches the name of your dedupe rule)
- Set the field to be optional and to take on a value that is called "Another contact shares the same first name and last name" but is stored as something shorter! (say "x")
- Copy the dedupe rule (as you might still need the original) and call it "First name + Last Name but excluding known non-duplicates"
- Set up this dedupe rule to have the same criteria as the original, except adding in the "Name shared" field with a negative weight. Set the threshold so the rule will not match if the contacts match on "Name shared"
- When using the dedupe rule, and upon finding two contacts who share the same name but are not the same person, set "Name shared" to "Another contact shares the same first name and last name". The contacts will not be listed the next time the rule is used.
- This technique works for multiple contacts sharing a name. If three people share the same name, but only two have been marked as sharing the name, the dedupe report will list this third person against each of the other two. If all three have been marked as sharing the same name, none will appear in the dedupe report.
- If you use multiple rules, you can add a custom field for each one.
- The drawback of this approach if the need to visit each contact and update their record.
- This technique works because the default case is that the custom field contains NULL, and nothing matches (equals) NULL in SQL.