Hubspot Plugin Error

Your software
Mautic Version: 2.15.1 (self-hosted)
PHP Version: PHP 7.2.18
Database Type: mysql_aurora
Database version: 5.7

Your problem
My problem is:
We are using the hubspot plugin and it is creating company duplicates in the mautic_companies table. For instance, we have ~120M records in this table yet we only have between 750-950 companies listed in hubspot. It looks like it is creating a full set of duplicates every 2.5 minutes. Can you guide me to fix this issue?

Also, once we get the issue fixed, what is the best way to handle de-duping the company list?

These errors are showing in the log: Nothing obvious in the error log

Steps I have tried to fix the problem: Reviewed plugin settings and API key

Hi there!

FYI, there are a lot of releases between 2.15.1 and now, including a release that addressed some very critical security issues.

We have had a few fixes for the Hubspot integration in those releases: Pull requests · mautic/mautic · GitHub.

You may find the fix in those PRs (I could not see anything obvious), but any fixes are most likely going to be based on Mautic 3 code, so you really should be updating to a newer version sooner rather than later.

It sounds like it is trying to create new companies every time it syncs rather than to look for / merge so you may need to look at the integration settings and what you are using as unique identifiers.

Thank you. An upgrade is on our radar, but figured we wanted to address this issue before porting 120M duplicate company records.

I just went into the plug-in config. One thing we didn’t have set was company website as a unique identifier. I fixed that and it gave me a warning that it may de-dupe company records. Based on marking that as a unique identifier, will the system de-duplicate the company records automatically?

Thanks in advance - JP

You would need to run the dedup cron job: mautic:contacts:deduplicate

Hi there - is there a dedup cron job for companies vs. contacts? Is that available in the upgrade?

From my tech guru that’s helping me…

*This process runs for contacts only, I tried running with running this command as *
php /var/www/html/app/console mautic:companies:deduplicate.

*There is no function as companies. Following are the available options. *

*There are no commands defined in the “mautic:companies” namespace. *

  •                                                                  *
  • Did you mean one of these? *

  •  mautic:emails                                                   *
  •  mautic:contacts                                                 *
  •  mautic:campaigns                                                *
  •  mautic                                                          *
  •  mautic:email                                                    *
  •  mautic:social                                                   *
  •  mautic:integration:pipedrive                                    *
  •  mautic:citrix                                                   *
  •  mautic:webhooks                                                 *
  •  mautic:queue                                                    *
  •  mautic:plugins                                                  *
  •  mautic:integration                                              *
  •  mautic:segments                                                 *
  •  mautic:unusedip                                                 *
  •  mautic:messages                                                 *
  •  mautic:iplookup                                                 *
  •  mautic:transifex                                                *
  •  mautic:translation                                              *
  •  mautic:install                                                  *
  •  mautic:assets                                                   *
  •  mautic:migrations                                               *
  •  mautic:theme                                                    *
  •  mautic:maintenance                                              *
  •  mautic:update                                                   *
  •  mautic:broadcasts*

Hey Ruth - appreciate all of the insight. Figured I’d ping you directly to see… is there a dedup cron job for companies? We’re not seeing one that’s native. We did upgrade to 3.2.4 this weekend.