JDBC Driver for HubSpot

Build 22.0.8462

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.

TypeId [KEY] String False

AssociationsTypes.Id

False

The numeric ID for the association type. This column is empty for more general associations queries.

TypeName [KEY] String True

AssociationsTypes.Type

False

The name of the association type for the specified object pair. This column is empty for more specific associations queries.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462