# Reusing Mautic contact ids

**URL:** <https://forum.mautic.org/t/reusing-mautic-contact-ids/18247>\
**Category:** Product Support\
**Tags:** development\
**Created:** [February 22, 2021, 1:50pm UTC](https://forum.mautic.org/t/reusing-mautic-contact-ids/18247 "2021-02-22T13:50:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/bas/32/547_2.png) [@bas](https://forum.mautic.org/u/bas)\
**Post date:** [February 22, 2021, 1:50pm UTC](https://forum.mautic.org/t/reusing-mautic-contact-ids/18247/1 "2021-02-22T13:50:30Z")

</div>

**Issue**  
I created a new Mautic instance, added a few contacts using the UI. Then I started merging some of those contacts, just to see how it was registered and handled. Afterwards I connected an almost empty SalesForce DE org to start syncing some contacts (used for the `contact_id ` field. After connecting and syncing those, I created and merged some more contacts using SF and the Mautic UI. When I started looking into what happened with the deleted (because they were merged) Mautic contact ids, I noticed that one was reused a couple of times.

I don’t think that this is the biggest issue, but I was wondering if this could interfere with the cookie and/or fingerprint tracking. I am also wondering if anyone else ever had this issue or if it could have been a hiccup on my system? (Which would be weird, since the MySQL table has `auto_increment` enabled on this column)

**Background**  
A client wanted a plugin where we could de-duplicate users on a set of given contactfields. This would become a new plugin we would write, so I was doing some research on how the merging within Mautic works.

 ![reusingids](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/3/3e72710a7090a658394c765f043d102dfc36ad4a.png)

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [February 24, 2021, 2:02pm UTC](https://forum.mautic.org/t/reusing-mautic-contact-ids/18247/2 "2021-02-24T14:02:48Z")

</div>

> [@bas](#):
>
> A client wanted a plugin where we could de-duplicate users on a set of given contactfields. This would become a new plugin we would write, so I was doing some research on how the merging within Mautic works.

In the works: [Allow plugin create own deduplicate logic by kuzmany · Pull Request #7502 · mautic/mautic · GitHub](https://github.com/mautic/mautic/pull/7502)

---

<div class="post-metadata">

**Author:** ![bas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/bas/32/547_2.png) [@bas](https://forum.mautic.org/u/bas)\
**Post date:** [February 24, 2021, 3:36pm UTC](https://forum.mautic.org/t/reusing-mautic-contact-ids/18247/3 "2021-02-24T15:36:45Z")

</div>

Yeah, I know I found this thread as well. But unfortunately the client wanted it ASAP ☹…

Also, this was only the reason my issue came to light, any idea why this is happening?
