ADO.NET Provider for HubSpot

Build 21.0.8137

ContactAssociations

Retrieve the IDs of companies, deals, tickets and other custom objects associated to specific contacts in HubSpot. This table supports both OAuth and APIKey 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

Contact ID

AssociationId [KEY] Long False False

ID of the object that this contact is associated with.

Type [KEY] String False False

Type of the associated object, which can be a company, deal, quote, ticket etc.

Copyright (c) 2022 CData Software, Inc. - All rights reserved.
Build 21.0.8137