ContactAssociations
Retrieve the IDs of all the objects associated to specific Contacts objects in HubSpot. This table supports both OAuth and PrivateAppToken authentications.
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
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 | False |
Contacts.Id | False |
Contacts ID |
AssociationId [KEY] | Long | False | False |
ID of the object that this Contacts object is associated with. | |
Type [KEY] | String | False | False |
Type of the associated object_ which can be a contact_ deal etc. |