Property Groups and namespaces of properties


#1

In the Hubspot Contact API, it is possible to define custom properties, which belong to property groups. This is documented here: https://developers.hubspot.com/docs/methods/contacts/v2/get_contact_property_group

My question, is it possible for the property group to act as a namespace?
In other words, can you have the same property name under a different group, and the group makes the namespace.
For example:
group1.property_X
group2.property_X
Would be the same property name under 2 different groups?

If this is possible my next (and real) question is:
How do you specify the group when creating / updating a contact?

The Contacts API as documented here: https://developers.hubspot.com/docs/methods/contacts/create_contact
... only allows for simple name:value pairs of properties.

Where do you specify the property group?


#2

Hi @stewart,

Property groups cannot be used as namespaces in this way. A property's internal name is its unique identifier, so the same internal name cannot be shared between two properties in the same portal, even in different property groups.

Attempting to create a new contact property with the same name will result in a 409 Conflict error and the response:

{
     "status": "error",
     "message": "The Property named 'same_internal_name' already exists."
}

That said, it is certainly possible to add the property group to a custom contact property's internal name to distinguish it from similarly-named properties (e.g. group_1_property_X and group_2_property_X).


#3

Hello @Isaac_Takushi,

Thank you for answering this.

It does raise the question: What is a Property Group for? If there's no namespace, then what is the point of having it? How does it help you?


#4

Hi @stewart,

Property groups allow you to more easily manage and organize properties in the UI and make it easier for users to locate and view related information on contact records.


#5

OK, so it's all about the UI.

Thank you @Isaac_Takushi


#7