Hola! ¡Tenemos nuestra Comunidad en Español!

Company properties: uniqueness, duplicate company records, property details during imports

New Member

A couple questions about properties:

  1. Are the details relative to how properties are handled during imports documented? For example, I recently did an import into an existing portal, and was under the impression there was a sort of merging of properties - i.e. the original portal's properties were retained, and the import data's properties added. Is that the case? Is there any attempt to resolve duplicates? If so, what determines property uniqueness? Display name or the programmatic name?

  2. There doesn't seem to be a notion of value uniqueness for properties, e.g. when I create a property, nothing asks if I want it to be considered a "primary key". Or is there and I'm simply not aware of how to do that? The reason I ask is I've been tasked with a variety of goals with respect to Hubspot portal "data wellness" and such, and the first thing I learned was that most of the companies in the data have not just one, but often many duplicates. It's not at all clear to me what is causing that, but it's rather troubling because those who need to leverage the data might converse with someone that leads them to want to update company data, and they're probably going to update the first company record they find (users were actually surprised to hear there were duplicates to begin with..), which might not necessarily be the "most golden" version of the company. (If I'm making any sense...) Which leads to the question of since records with duplicate "Name" properties are allowed, and name uniqueness isn't enforced (or can it be?), is there an API way to merge companies? Or at least a way to accomplish that in Hubspot itself?

1 Reply
Community Manager

Hi @bubbly,

What import process are you referring to specifically? Are you referring to the in-app process of importing a CSV of company records? In that case, the columns in the CSV are mapped to existing company properties; the import process does not auto-create any properties from the CSV.

If instead you're referring to creating company properties via the API (i.e. this method) then you'll find that properties are unique by internal name. If you attempt to create a property with an internal name that already exists, you'll get a 409 Conflict error.

Regarding your second question: A 'primary key' property for company records doesn't currently exist. For contact records, email address is unique for all contact records. This doesn't exactly exist for company records; for imports and/or new contact record associations, the 'Company Domain' property is used to deduplicate records. However it is possible to create duplicate company records manually, since HubSpot doesn't strongly enforce this deduplication.

It's not currently possible to merge company records programmatically, but you can merge company records in-app by following the steps outlined in this Knowledge Base article:

How do I merge companies?

Learn how to merge two existing companies in HubSpot.