Every day, we save an export of all our Hubspot contacts (using the API method GET /contacts/v1/lists/all/contacts/all). We use these exports to synchronise the contacts between different CRMs.
We thought that, in Hubspot, two contacts cannot have the same email. We built our system with this hypothesis.
However, between 2016-07-03 and 2016-08-11, we had several cases with 2 contacts having the same email.
It was sometimes a bit more weird: the contacts were actually merged, having the same “canonical-vid”, different “vid”, and all were still returned by the API distinctly.
Here are my questions:
Do two distinct contacts can have the same email?
When contacts are merged, are they all returned (all the “vid” values) by the API or is only one returned (the “canonical-vid” one)?
Did you have an issue between 2016-07-03 and 2016-08-11?
Did you merged contacts (with the same email) on your side automatically (between 2016-07-03 and 2016-08-11)?
There aren’t actually two different records, just two different pointers to the same record. Normally any duplicate pointers(vids) get removed so you only see the canonical vid when pulling those records, but there was an issue with the job that cleans up those pointers. We’ve fixed the issue with that job and also cleaned up any duplicate pointers it missed.
I’m seeing the same thing in that portal looking at it now. I would not expect to see that same record show up twice like that, so I’m sending this along to our Contacts team to take a look at.
Sorry @jereze, thought I previously replied to this.
The GET /contacts/v1/lists/all/contacts/all endpoint should only return records where the vid is equal to the canonical-vid. I didn’t see any recent reports that indicated that this happened, but are you seeing that with a portal now?
Can you send me your Hub ID so I can take a look at those two vids? I’d need to see the full context of the records.
Thanks @jereze. We have have an issue on July 3 that resulted in cases where duplicate contacts could be created with the same email address. After that was fixed, we ran a cleanup job to merge those records with duplicate emails, and that cleanup job was completed on July 6, so it would have been possible to see duplicates on July 5.
I’m glad that you confirm that email addresses are unique in Hubspot.
I do understand that merged contacts share a common canonical-vid, but still have their original vid.
I have two remaining questions. They are important for us, because, as I said, we have a full synchronisation system based on the results provided by Hubspot API. We had in the last weeks several issues that we try to deeply understand.
In a normal behaviour, does the API method GET /contacts/v1/lists/all/contacts/all return contacts that point to another contact (ie., they have: vid != canonical-vid)?
Also, beginning of July, can you confirm that there was an unusual situation, or a bug? For example, on July 5th, I had the two following contacts with the same email (I cleared most of the json for anonymity, but I can send you by email the full jsons) given by the API method GET /contacts/v1/lists/all/contacts/all:
Email addresses in HubSpot are unique, so you won’t have two different records with the same email. In the cases where you have two vids with the same email and same canonical-vid, those separate vids just act as pointers to the same record. In those cases, the canonical-vid is the main vid for the record that you’ll get from the API (such as when pulling all contacts or recent contacts), but both vids still point to the record, so getting the record by id with either vid will still get the record.