How did happened? Duplicate contact

Mautic automatically merges contact by unique identifier field(s) when the data are coming from outside (CSV import, API, form submissions) but it will allow you to create a duplicate via UI. It should display a warning that a contact with the same email address exists as you type it in to the new contact form. But it won’t stop you nor merge. I don’t recall why it was designed this way but here we go.

There is a handy command to deduplicate all contacts based on the unique identifier fields. It will merge the field values as well as the history of both contacts.

bin/console mautic:contacts:deduplicate

This command is not very fast. If you have millions of contacts it can take days and even weeks. I created a pull request making it way faster and it’s waiting for one more tester to approve it and merge it:

1 Like