# How did happened? Duplicate contact

**URL:** <https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575>\
**Category:** Product Support\
**Created:** [June 24, 2022, 2:47am UTC](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575 "2022-06-24T02:47:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [June 24, 2022, 2:47am UTC](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575/1 "2022-06-24T02:47:43Z")

</div>

Photo says it all … email domain are both exactly same but was edited out for privacy

Both are same person and have same email address but different database id

Is email address the primary key in Mautic → I checked and Email is set Yes on Unique Identifier in custom field settings

 ![question](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/e/e036707e0813c3895e00fe95ab28c1ac8e020838.jpeg)

---

<div class="post-metadata">

**Author:** ![crazymonkey](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/crazymonkey/32/6416_2.png) [@crazymonkey](https://forum.mautic.org/u/crazymonkey)\
**Post date:** [June 24, 2022, 7:50am UTC](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575/3 "2022-06-24T07:50:57Z")

</div>

It would help if you’d explain how the contacts were created. I saw the same behavior when editing the contacts manually.

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [June 24, 2022, 1:05pm UTC](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575/4 "2022-06-24T13:05:52Z")

</div>

I look at both contact history. This contact is one of our staff member. He receives a newsletter that we sent out weekly so when we switched from Sendy (former mailer) to Mautic, we imported all contact over to Mautic via CVS file.

I can see both contact have same history and both was created same day 2 month ago until recently I imported a new CVS for a “Staff only” segment and that when it seem to duplicate the contact into two contact but still same name and email address.

Funny thing is history show “Contact updated” instead it duplicate the two. The only difference between two contact is one have a “staff” tag on it.

I did some testing beforehand to make sure that importing would merge the contact instead of creating a new secondary same contact and it did pass the test that it merged which I wanted in the first place.

Here a screenshot of both contact history … in history comm.cvs is the list I imported to add those who are communication staff

There are only 12 staff on communication team and I checked all contacts history. There was only one that was duplicated. The rest of the contacts in staff CVS was merged successfully.

 ![Screen Shot 2022-06-24 at 8.01.00 AM](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/b/bac40b0bc89ddf0100a499f0dee660c5324ffe94.jpeg)

 ![Screen Shot 2022-06-24 at 8.00.33 AM](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/a/a74aaecfeb6508549c7ed415488401e292bb8f8b.jpeg)

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [June 27, 2022, 8:23am UTC](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575/5 "2022-06-27T08:23:34Z")

</div>

Hey Bill!  
2 quick questions:

- Is email your unique identifier?
- Did you create a secondary email field?  
J

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [June 27, 2022, 1:11pm UTC](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575/6 "2022-06-27T13:11:03Z")

</div>

1. Yes, email is set to be unique identifier.

2. No, I do not have a secondary email field or any custom field on it.

 ![Screen Shot 2022-06-27 at 8.09.18 AM](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/f/f2e50e551b94003b74fb431bfb87ac25b7f1a755.jpeg)

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [June 27, 2022, 1:13pm UTC](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575/7 "2022-06-27T13:13:19Z")

</div>

Did you make an import, where the id somehow was pared with mautic id?

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [June 27, 2022, 1:15pm UTC](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575/8 "2022-06-27T13:15:51Z")

</div>

When I made an import, I only use first, last, and email. It was only thing I had in Sendy before I switch over to Mautic.

I did not use ID or any other information from Sendy.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [June 27, 2022, 1:29pm UTC](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575/9 "2022-06-27T13:29:32Z")

</div>

What is the event that identified the contact? You see this among events. Check both.

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [June 27, 2022, 1:34pm UTC](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575/10 "2022-06-27T13:34:01Z")

</div>

Can you explain how to check event? I will be happy to check it

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [June 27, 2022, 1:46pm UTC](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575/11 "2022-06-27T13:46:23Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/1/175c4b2506f763bcb9e716df3b2f305c3066fa17.png)

This is where you see how someone was created. This user was done by a user called API added with api call.

Then you click on the audit log tab for more details:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/f/f50d483b9195b7062ec8274d39e78719d1e50512.png)

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [June 27, 2022, 1:53pm UTC](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575/12 "2022-06-27T13:53:42Z")

</div>

There a screenshot in my post #3 above that shows the history of each contact. The screenshot is taken from each contact.

It just says contact created and identified. There nothing clickable on that line to open up detail about that event.

Hovering mouse over it does not give me toggle detail tooltip or anything so it’s not clickable.

Do you want access to my Mautic? I can PM you a temporary admin access if you want to take a look at it briefly.

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [June 27, 2022, 1:55pm UTC](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575/13 "2022-06-27T13:55:56Z")

</div>

Contact was exported to a CVS file from Sendy then imported into Mautic manually via web browser if that what you were asking about?

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [June 27, 2022, 2:57pm UTC](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575/14 "2022-06-27T14:57:12Z")

</div>

Hi, sorry I need to catch up with things, don’t have time now, but let’s see if someone has a tip.  
If it won’t get solved by the end of the week, I’ll look into it on friday.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [June 27, 2022, 3:00pm UTC](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575/15 "2022-06-27T15:00:46Z")

</div>

But looking at the adit log tab could give you a clue.  
Also: can it be, that someone changed the email of the contact in the system?

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [November 30, 2022, 7:37am UTC](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575/16 "2022-11-30T07:37:53Z")

</div>

Bumping an old issue as I am seeing similar behaviour all of a sudden in Mautic 4.4.1

I have two new contacts created. There lead ID are consecutive: 483 and 484.

For lead id 483 this is the audit log:

 ![Screen Shot 2022-11-30 at 9.21.00](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/4/4293ec2e8d6301fb6bbec4546ea57a1b283ab3a5.png)  
In the history of this user I am not seeing any tracking, however they are getting an email sent and changing into different segments and campaigns.

For lead id 484 this is the audit log:

 ![Screen Shot 2022-11-30 at 9.28.38](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/9/98dd2be7c32e69dadb8afa79b1e9f393af06bfd7.png)  
For this user I am seeing a full history of all pages being tracked as well as emails being send.

The emails being sent are from within a campaign and they are market type “marketing”.

The field for email is publicly updatable and is also a unique identifier.  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/b/b683eae310bfd1cec2f3a692f6e663afe1939515.png)

The user is being created via the Mautic tracking script and/or via forms in both cases.

@joeyk or anyone else looking for some interesting insights here.  
My initial hunch was that a field was being overwritten on a specific user, but I would expect to see the values of email change in the audit log if this was the case, and then the fact that the lead\_ids are consecutive also raises a small alarm.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [November 30, 2022, 5:22pm UTC](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575/17 "2022-11-30T17:22:34Z")

</div>

You can of course create duplicate emails via API without problems.  
When you EDIT the contact, then the API won’t check if the email already exists, since the ID will be used as UNIQUE FIELD.  
You should CREATE the contact every time you want to make change using email as a key.

Maybe it’s done by API? N8N?

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [November 30, 2022, 6:22pm UTC](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575/18 "2022-11-30T18:22:18Z")

</div>

Thanks Joey. No it is not being done via API, a contact is created via a form submission in one scenario, at the same time the tracking script will pass through the email as well.  
The other scenario is that a user registers has registered through the site mechanism (in this case Auth0) and then the tracking script passes through user details.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [November 30, 2022, 6:47pm UTC](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575/19 "2022-11-30T18:47:42Z")

</div>

Ok.  
Is the form a standard mautic embed? Or a post action from a wp plugin?  
Also:  
Do you have a synch with a crm or other system?  
One more:  
Do you have multiple keys besides email?

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [November 30, 2022, 7:18pm UTC](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575/20 "2022-11-30T19:18:55Z")

</div>

Standard Mautic form.  
No other synch with any CRM  
No other unique keys  
☹

I did see that they could have implemented the tracking script incorrectly as I am seeing 4 hits per anonymous user, also the dup records are created within seconds of each other

Appreciate the questions @joeyk

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [December 1, 2022, 5:51am UTC](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575/21 "2022-12-01T05:51:39Z")

</div>

Yeah there must be a tracking issue. Can you plz check if there are ja errors while tracking? Does the page have proper access to Mautic cookie? Maybe cors error?

[Next page](https://forum.mautic.org/t/how-did-happened-duplicate-contact/24575.md?page=2)
