APIs & Integrations

sam2themax
Participant

Why no company merge via API?

Does anyone know why there's no ability to merge companies via API?  I've found this idea: https://community.hubspot.com/t5/HubSpot-Ideas/Provide-API-endpoint-to-merge-companies/idi-p/269952

And this discussion: https://community.hubspot.com/t5/APIs-Integrations/Api-endpoint-to-merge-companies/td-p/236104

 

...but nothing really useful or informative about why this wouldn't exist.  It doesn't really make sense that this would exist for the Contacts API but not Companies.

 

We've ended up writing our own "merge" that is basically a "copy fields that we care about from the secondary company to the primary company and then delete the secondary company," but that has a host of problems.  For example, when our sales team adds new fields to Hubspot, we have to update our code to merge them properly.

 

It just feels like such a hack, and it's not be able to take advantage of any smarts or improvements to the merge algorithm that is native to the UI.

1 Reply 1
WendyGoh
HubSpot Employee
HubSpot Employee

Why no company merge via API?

Hi @sam2themax,

 

I hope all is well with you 😄

 

As Derek mentioned here, the merging of company records is slightly more complex than merging contact records. This is because of the interactions that company records has with other object types such as contacts, deals. 

 

Moving forward, to avoid duplication (same company domain) of companies records, you could use this endpoint - Search for companies by domain to check if there's any existing company records with that particular domain before creating a new company record. 

 

With all that said, if you haven't done so, I'd suggest for you to give an upvote and comment on this idea page that you shared. Hopefully this will gather more interest and make an impact on our product development.