Working with HubSpot CRM Associations with Ease Using KingswaySoft

31 January 2024
KingswaySoft Team

Associations are used in HubSpot to define a relationship between objects and activities. There could be records that exist in objects that ideally have a relation between them, such as Contact to Company, Contact to Deal, Company to Deal, etc. It is essential to have these properly defined in order to maintain your data and relationships as intended. In this blog post, we will demonstrate how to use KingswaySoft components to easily create and maintain HubSpot Associations. For this demonstration, we will be using the Deal to Contacts Association. In HubSpot, Deals represent transactions with contacts or companies. The Deals endpoints allow you to create and manage deal records, as well as to sync deal data between HubSpot and other systems. Contacts store information about the individual people who interact with your business. The contacts endpoints allow you to create and manage contact records in your HubSpot account, as well as to sync contact data between HubSpot and other systems.

Below are the components that we will primarily use in this demonstration:

Creating a HubSpot Association

Let's start by having a look at a deal record that we will be working with. As shown below, the deal Fortest_11 does not currently have any Contacts associated with it. Our objective is to create an association record for it.

DealBefore.png

Now, to create an association between two objects, we will be using the HubSpot Destination Component drag-and-drop the component, then configure the connection manager, and in the Destination component, choose the object CRM Association v4. If you wish to know more about different authentication options for Hubspot using our connection manager, please refer to our Online Help Manual link here.

HubspotDestination.png

Once the general page has been configured, navigate to the columns page, where you will need to map all the specified fields to create the association, as shown below.

AssociationFields.png

And so, it would be a good idea to have that information beforehand. You can find the information by reading from the HubSpot Source Component. In this case, we read the Deal endpoint and get the dealid.

HubspotSourceDeal.png

DealId.png

We will also need the ID of the object with which you are trying to create an association. In this case, since we are building a Deal and Contact association, we will need the ID for the Contact object. And this can be done in a similar manner as above, by querying the Contact object using the HubSpot Source Component.

ContactIdHubspot.png

ContactId.png

Once we have the data ready with us, we can map the fields accordingly.

  • ObjectId is the ID of the object we create the association with. In this case, it will be the dealid.
  • ToObjectId is the ID of the object we are linking to the initial object, which will be the contactid.
  • ObjectType and ToObjectType are the Types for the objects we are linking. So it would be deal and contact.
  • AssociationCategory will be mapped whether the association type was created by HubSpot (HUBSPOT_DEFINED) or by a user (USER_DEFINED). In this case it is HUBSPOT_DEFINED.
  • AssociationTypeId is the numeric ID for that association type. This is used to set a label when associating records. You can find which Association Type ID to use in the Hubspot CRM API Documentation (link here)

In this example, we are using a Premium Derived Column to simulate passing in these input values. However, in a real-world scenario, you will be passing these values from a Source Object.AssociationFieldsMapped.png

And once all the fields are mapped we can execute the package. Once it runs successfully, you can see that the associations are created by navigating to the HubSpot UI.

DealAfter.png

Now, let's see how you can read back these associations as a validation.

Retrieving a HubSpot Association

Using the HubSpot Source Component, you can read the CRM Association v4 Object. Then provide the proper filter parameters.

  • ObjectType is the type of the object for which we are providing the ID.
  • ToObjectType is the type for the object that we are looking for.
  • ObjectId is the ID of the object.

HubspotSourceCRMAssociation.png

ReadHubspotAssociationV4.png

Notes: You are able to set a Primary association by adjusting the AssociationTypeId Values. For example, if you are creating an association between Company to Contact, normally the Association Type ID would be 280; however, if the association is a Primary association, you can use 2. By entering 2, it will allow the association to be set as the Primary.TypeIdPrimary.png

Conclusion

By using KingswaySoft, you can easily create associations as required between HubSpot objects in an effective manner to keep your data and relationships in order.

We hope this has helped!

Archive

November 2024 3 October 2024 1 September 2024 1 August 2024 2 July 2024 1 June 2024 1 May 2024 1 April 2024 2 March 2024 2 February 2024 2 January 2024 2 December 2023 1 November 2023 1 October 2023 2 August 2023 1 July 2023 2 June 2023 1 May 2023 2 April 2023 1 March 2023 1 February 2023 1 January 2023 2 December 2022 1 November 2022 2 October 2022 2 September 2022 2 August 2022 2 July 2022 3 June 2022 2 May 2022 2 April 2022 3 March 2022 2 February 2022 1 January 2022 2 December 2021 1 October 2021 1 September 2021 2 August 2021 2 July 2021 2 June 2021 1 May 2021 1 April 2021 2 March 2021 2 February 2021 2 January 2021 2 December 2020 2 November 2020 4 October 2020 1 September 2020 3 August 2020 2 July 2020 1 June 2020 2 May 2020 1 April 2020 1 March 2020 1 February 2020 1 January 2020 1 December 2019 1 November 2019 1 October 2019 1 May 2019 1 February 2019 1 December 2018 2 November 2018 1 October 2018 4 September 2018 1 August 2018 1 July 2018 1 June 2018 3 April 2018 3 March 2018 3 February 2018 3 January 2018 2 December 2017 1 April 2017 1 March 2017 7 December 2016 1 November 2016 2 October 2016 1 September 2016 4 August 2016 1 June 2016 1 May 2016 3 April 2016 1 August 2015 1 April 2015 10 August 2014 1 July 2014 1 June 2014 2 May 2014 2 February 2014 1 January 2014 2 October 2013 1 September 2013 2 August 2013 2 June 2013 5 May 2013 2 March 2013 1 February 2013 1 January 2013 1 December 2012 2 November 2012 2 September 2012 2 July 2012 1 May 2012 3 April 2012 2 March 2012 2 January 2012 1

Tags