Mautic Hubspot Plugin creating Duplicate contacts

Can someone help to confirm a potential bug. I am running Mautic 2.9.2 on my own server.



We sync contact records between our Mautic and Hubspot CRM.



We are finding that when an email address is updated for a contact in Hubspot the Hubspot Plugin is creating a second new contact in Mautic with the new email address rather than updating the existing Mautic contact record. This means that we continue to market to the incorrect/old email address in addition to the new email address within Mautic Campaigns.



This is of course a big problem resulting in certain situations emailing someone who has replied to an email expressing interest (from a new address) for which we make a note of in Hubspot but who we then continue to market to their old address. It will be very hard to unpick where this has already occurred and we need to maintain duplicate contact records in Hubspot from now on as an emergency work around.



I have been running test this morning and it has been consistent. Is this specific to my installation or can someone else replicate it?

Can someone help to confirm a potential bug. I am running Mautic 2.9.2 on my own server.

We sync contact records between our Mautic and Hubspot CRM.

We are finding that when an email address is updated for a contact in Hubspot the Hubspot Plugin is creating a second new contact in Mautic with the new email address rather than updating the existing Mautic contact record. This means that we continue to market to the incorrect/old email address in addition to the new email address within Mautic Campaigns.

This is of course a big problem resulting in certain situations emailing someone who has replied to an email expressing interest (from a new address) for which we make a note of in Hubspot but who we then continue to market to their old address. It will be very hard to unpick where this has already occurred and we need to maintain duplicate contact records in Hubspot from now on as an emergency work around.

I have been running test this morning and it has been consistent. Is this specific to my installation or can someone else replicate it?

how you sync contacts ?

Hi, via the Hubspot CRM Plugin / Hubspot API which is now a standard Mautic Plugin. My best guess is that Mautic (or the plugin) uses the email address as a unique identifier key for the contact record rather than the ID and therefore when it is passed an already existing contact with an updated email address it has no existing key to identify the contact as existing so it creates it as a new contact rather than simply updating the email address.

You just simply integrate the hubspot plugin , in mautic right? Did you set cronjobs after integration ?

Yes all working as it should. It is two way syncing and mostly working great - I do not believe this to be a setup issue. I think it is a limitation of the plugin but want to see if it can be replicated elsewhere to confirm this.

right

Is anyone using the Hubspot Mautic Plugin to confirm this issue? Is this the best place for my question? It is a big issue and will potentially be effecting everyone using this plugin.

@paulomcguinee

why don’t you try simple process that , cancel the Hubspot integration and again do integration and then checks.

@paulomcguinee
You run a debugger on the application. If you do not know what I’m talking about then I recommend that you call some programmer / i could be. It is possible and likely that the problem is occurring when passing request data between Mautic-API or API-Hubspot. it may be a duplicate request in the code as a query in the Mautic database or in the integration as I said above.

I’d like to see first if this behaviour is the same for everyone. I expect it is. And therefore this is a limitation with Mautic/Hubspot API Plugin that I hope can be looked at by the community. I think I need to post elsewhere to find someone also using Hubspot API and see if they have the same issue.

Busy trying to duplicate…

Great let me know if you need any help with the process.

Added a contact to hubspot that already existed in Mautic. No duplicate created in Mautic

OK now go to that contact in Hubspot. change the email address to a new one. Then wait for it to sync to Mautic - my problem is that rather than sync the two records and update Mautic with a new email address you will get a new contact in Mautic and continue to have the same contact with old address too. Therefore duplicating Mautic contacts and creating the potential to market to someone who has replied.

Hopefully that is clear?

Yup - was able to replicate the error. It makes sense in that Mautic uses the email address as the basis to decide whether a record is unique or not. So a new email address would create a new record. I guess thats how the integration was written. Using an ID code would better but that assumes both apps use or can understand the same coding system?

Hi @Robmobius , I am pleased you have replicated the issue. In a working environment this functionality renders the Hubspot --> Mautic sync unusable in many scenarios as you just cant have a situation where their is a potential to email someone who has got back to a previous campaign (via a different email) unless you maintain duplicate records or do not use their preferred email. Both workarounds have their limitations.

I have just checked through the Plugin Mapping and it is not possible to map the Hubspot Record ID to the Mautic Record ID. If this was possible and then the “Identifier Key” could be changed from Email to ID then that might be a solution. Do you know if there is a way to ask the Mautic development community to take a look at this issue/behaviour to see if it can be improved? - I would be willing to pay something towards having this behaviour “fixed”.

I think the best is to add the issue to the Mautic Github. That way the dev team (which I guess is any volunteer) can pick it up run with it if motivated to do so.

I have done as you suggested - so fingers crossed! Thank you for your help.