APIs & Integrations

Suja
Member

How to Track Newly Added or Removed Associations via API

SOLVE

Hello,

I am integrating HubSpot CRM and need guidance on efficiently tracking associations.

  1. When I add a ticket to a contact (or vice versa), I noticed that only the ticket’s lastmodifieddate updates, not the contact’s.

    • Is there a way to have the contact’s lastmodifieddate update on association changes?

  2. I want to incrementally sync only newly added or removed associations without scanning all contacts or tickets.

    • Is there an API endpoint or parameter to return only association changes since a specific timestamp?

  3. Are there any best practices for syncing associations at scale efficiently, including rate limits or batching recommendations?

Essentially, I need to track association changes efficiently for large datasets, ideally without full scans. Any guidance or examples would be appreciated.

Thank you for your support!

0 Upvotes
1 Accepted solution
d-lupo
Solution
Top Contributor

How to Track Newly Added or Removed Associations via API

SOLVE

Hi @Suja,
I’d recommend setting up a Rollup Property to track association changes. You can do this by creating a new Contact property, selecting Rollup as the type, and configuring it as shown in the screenshot below.

dlupo_0-1759953178023.png

Here’s what happens:
Each time a ticket is associated or an association is removed, the rollup property is automatically updated to reflect the current number of associated tickets. If no tickets are associated, the value will be 0.

 

From there, you have several options for further processing, for example:

  • Trigger a workflow based on changes to the rollup property.

  • Send a webhook to a middleware service, which can then handle any further processing related to the association changes.

That’s the approach I’d take to solve this.
Let me know if this works for you! 😊

View solution in original post

0 Upvotes
2 Replies 2
d-lupo
Solution
Top Contributor

How to Track Newly Added or Removed Associations via API

SOLVE

Hi @Suja,
I’d recommend setting up a Rollup Property to track association changes. You can do this by creating a new Contact property, selecting Rollup as the type, and configuring it as shown in the screenshot below.

dlupo_0-1759953178023.png

Here’s what happens:
Each time a ticket is associated or an association is removed, the rollup property is automatically updated to reflect the current number of associated tickets. If no tickets are associated, the value will be 0.

 

From there, you have several options for further processing, for example:

  • Trigger a workflow based on changes to the rollup property.

  • Send a webhook to a middleware service, which can then handle any further processing related to the association changes.

That’s the approach I’d take to solve this.
Let me know if this works for you! 😊

0 Upvotes
Suja
Member

How to Track Newly Added or Removed Associations via API

SOLVE

Hi @d-lupo,
Thank you so much for the suggestion — the Rollup Property approach definitely helps in tracking when associations change.

That said, the Rollup only provides the total count of associated tickets. In scenarios where there are a large number of associations (for example, over one million), it would still require iterating through all associations to determine which specific tickets were newly added or removed, which is not efficient at scale.

Is there any way, through the API or otherwise, to fetch only the newly added or removed associated ticket IDs for a specific contact ID?
That would make the process much more efficient and practical for large datasets.

I appreciate your guidance on this and look forward to your insights. 😊

0 Upvotes