We had two contacts get merged together that should be separate. We can’t figure out any way to get the contacts back to how they were.
Here’s what happened:
When a user logs into our app, we send their email address to Mautic via the Mautic tracker. This allows mautic to identify them and starts our email campaigns.
We just ran into an issue where a person has logged into our app with a second user account (one of their co-worker’s). We’ve built in systems to check for this scenario and throw out their mautic cookies so that they get new ones (stopping the merge). However something must have messed up because in one instance, the contacts were merged.
This seems to be a real mess because it appears that during a merge, Mautic deletes the contact record and all history. We haven’t been able to figure out a way to resurrect the contact. We have database backups but it seems that we would need to resurrect data from a large number of tables with a lot of potential for error.
If we were to create the contact again from scratch, it seems that it would cause issues based on Mautic thinking that they were truly new. It appears that Mautic uses their contact id (lead id) to log their history, so the newly created contact would start getting all of the emails that they were already sent over again.
Is there anyway to un-merge contacts? Or a way to resurrect a contact and their history from a backup? Any other ideas for what to do when a merge happens in error?
We had two contacts get merged together that should be separate. We can’t figure out any way to get the contacts back to how they were.
Here’s what happened:
When a user logs into our app, we send their email address to Mautic via the Mautic tracker. This allows mautic to identify them and starts our email campaigns.
We just ran into an issue where a person has logged into our app with a second user account (one of their co-worker’s). We’ve built in systems to check for this scenario and throw out their mautic cookies so that they get new ones (stopping the merge). However something must have messed up because in one instance, the contacts were merged.
This seems to be a real mess because it appears that during a merge, Mautic deletes the contact record and all history. We haven’t been able to figure out a way to resurrect the contact. We have database backups but it seems that we would need to resurrect data from a large number of tables with a lot of potential for error.
If we were to create the contact again from scratch, it seems that it would cause issues based on Mautic thinking that they were truly new. It appears that Mautic uses their contact id (lead id) to log their history, so the newly created contact would start getting all of the emails that they were already sent over again.
Is there anyway to un-merge contacts? Or a way to resurrect a contact and their history from a backup? Any other ideas for what to do when a merge happens in error?
I have question, anyone has anyway? Thanks!
I had somewhat of a perhiperial issue like this. Our campaign actually triggered incorrectly in mautic 2.14 (before we upgraded to fix it :P) and it ended up breaking the history for several users.
You could go into the backups that you have and pull out just the history for that contact, export to SQL, then create a new user within your current Mautic instance, and then edit the SQL to use the new contact ID and see if that’ll work.
A few things to watch out for:
- Make sure that you are using the new contact ID in the logs table
- Make sure that your event ID’s are current (you’d be surprised how often they change)
This is probably the best suggestion I’d have. To note, on our end, I was able to cancel all scheduled events for given event ID’s in the database, and then re-schedule those events for a given contact with a single SQL command. It’s quite useful if you use the log table. The concern I have for you is if it uses the ID anywhere else. But, if you let mautic create the new ID, it should be completely fresh, and you can just use that in your sql for the logs table.
how did you achieve this?