ContactAssociations
Lists object IDs associated with specific contacts, supporting management of contact associations.
View Specific Information
This is a sample associations table exposed when the ExpandAssociations connection property is set to False (default).
SELECT
A query to this table will return will return the Id-s of all the records and their corresponding object type associated to a specific Contact record.
SELECT * FROM ContactAssociations
Note: You cannot reference custom objects by base name. When querying ContactAssociations, if Type refers to a custom object, the value must now be either the short-hand object type name (p_<object_name>) or the fully qualified object type name.
INSERT
To add a new association between a Contacts record and a Deals one, you need to specify the Id-s of the two records to be associated and the deal object type.
INSERT INTO ContactAssociations (Id, AssociationId, Type) VALUES ('3432', '34654', 'Deal')
To add a new association between a Contacts record and a custom object one, you need to specify the Id-s of the two records to be associated and the custom object FullyQualifiedName as the Type. Note: You can find the Object FullyQualifiedName by querying the CustomObjects view.
INSERT INTO ContactAssociations (Id, AssociationId, Type) VALUES ('3432', '453545', 'p5692228_event')
Columns
| Name | Type | ReadOnly | References | Filterable | Description |
| Id [KEY] | Long | True |
Contacts.Id | False |
Unique identifier for the contact involved in the association. |
| AssociationId [KEY] | Long | False | False |
Unique ID of the HubSpot object (such as a deal, company, or ticket) associated with the contact. | |
| Type [KEY] | String | False | True |
Type of the associated HubSpot object (such as deal, company, or ticket) linked to the contact record. |