Hello,
We have an integration with HubSpot that sends Contacts from HubSpot to our system.
The way to validate if something has been sent across to our system is based on Record ID.
However, if somebody merges two duplicate contacts together, this causes issues with creation and we’re trying to overcome this hurdle.
Is there a way via the API to check if a Contact has been merged and then feed back the new HubSpot Record ID of the merged Contact?
Thank you.
Hi @JackWhite24,
Yes, info about merges is stored in this contact property:
Merged Contact IDs: the Record IDs of contacts that were merged into the contact record. This is automatically set by HubSpot once a contact merge is completed.
Best regards!
Hi @JackWhite24 , this bites many integrations. The clean way is to rely on HubSpot’s “Merged Contact IDs” property (API name hs_merged_object_ids) that lives on the surviving contact.
When two contacts are merged, HubSpot writes the losing IDs into that list on the winner. You can fetch it via the Contacts API and map old > new on your side (HubSpot's default contact properties )
If you only have an old ID in hand, you can search for the winner by querying contacts where hs_merged_object_ids contains that old ID, then use the found record’s current hs_object_id as the canonical ID going forward. Also useful: HubSpot explicitly allows updating a merged record using any of its previous IDs via the basic update endpoint; the platform resolves the old ID to the active record (see “Using Object APIs,” note about hs_merged_object_ids: (Using Object APIs - HubSpot docs )
Do you control a private app so you can run a CRM Search filter on hs_merged_object_ids? If yes, that’s the most robust path. Hope this helps.