This code snippet is illustrative of a common pattern in CRM - getting associated records. This is particularly useful for deals and line items where line items are inherently tied to a specific deal.
This particularly code snippet shows this in context of the following use case: A customer is looking to more easily quantify how many high value items are included on a deal. For every Closed Won deal, they would like to set a property value of the number of line items greater than $1,000 (Note: You can build a similar report like this in the custom report builder...but assume the customer wants to include the value as a deal property)
Hi
Do you know why the following error would return:
ERROR Invoke Error {"errorType":"TypeError","errorMessage":"hubspotClient.crm.companies.associationsApi.getAll(...).then(...) is not a function","stack"
I have tweaked the code to point to companies in order to get a count of associated contacts which i would assume would work the same way by replacing deals with companies and line items with contacts
Appreciate any help