Batch update does not create a new account if a contact was ever in the history of another contact

Highlighted
New Contributor

I am creating a script that updates HubSpot. Our DB is the source of truth. I'm encountering a problem where HS will update an account even when I update by email on an email that is no longer associated with an account, but exists somewhere in the history of it. 

 

As an example, we may have a client that has an account on HubSpot and they have a primary email on the account. Then, the person who owns that email leaves their company and a new email is listed associated with the account. In that case, the primary email is set to the new contact.

 

When I search contacts the old email will give zero results. It also allows me to use the GUI to create a new account under the old email.  However, when my script does a batch create/update with the old email, it still updates the account they no longer belong to. When I make a get request for the VID, HubSpot sends the VID of the old account and now when my script runs it will ping pong between updating the properties from the old account to the new one because they both have the same VID. So on one run it sets the email value to the old email and on the next it sets the email value to the correct one and every 5 - 10 minutes the primary email on the account will switch.

 

After discovering this issue, I turned off updating the email property for an account if we already have the VID, but it only helps with that one property.

 

For every account that has ever been associated in the history of the email property of a contact, they are still getting the VID of the previous contact and updating it. So, unfortunately, it causes a lot of problems on our end because we can't trust HubSpot's API to only give us the VID of a contact if the email is the PRIMARY email on the account and to create new contacts if an email exists in the history of a previous contact. 

 

Does HS have any plans to fix this bug or has anyone found an efficient work-around to deal with this? It's creating a log of issues for us. 

 

I hope I've explained the issue clearly. Please let me know if I can elaborate. 

Reply
0 Upvotes
3 Replies 3
New Contributor

An update: This doesn't happen on all accounts. I can update via an email that only exists in the history of some contacts, but not others. Again, this is an email that I can't even find if I search for it in the GUI, but it returns a VID for another account when I use a get request and I can update all the properties of the other account through the email. I will follow up with more details if I can find any. 

Reply
0 Upvotes
New Contributor

Update: Still searching for a workable solution. In some cases I could see clearly on HS that there is more than one email on the account, but in other cases it is only in the history yet will update the contact. The only solution I've found so far requires adding the email into the contact's present history and then deleting it again which seems to reset it, but it's not a time-effective solution. 

Reply
0 Upvotes
Community Manager

Hey @justanna ,

 

I'm working with the Support specialist who grabbed the ticket you filed. I think it'll be most efficient to continue working through support instead of working in two places, so stay tuned in your support inbox for more information here shortly!

Reply
0 Upvotes