Cmdlets for HubSpot

Build 24.0.9032

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')

DELETE

To delete an existing association between a Contacts record and a Deals one, you need to specify the Id-s of the two associated records and the associated deal object Type. Note for custom objects, you will need to specify the FullyQualifiedName as the Type.

DELETE [ContactAssociations] WHERE Id = '3432' AND AssociationId = '34654' AND Type = 'Deal'

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.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9032