We’re using the CRM Extensions API to invoke an app… straightforward. But the app needs the context of the contact GUID for the contact record that the app is invoked from. We know how to use the contacts API to get contact info but don’t see a way to make those calls in the context of the open contact record in the CRM. Is there a way to pass the contact GUID for the open contact record along with the call to our app?
HubSpot will pass the contact’s
vid (or the id if it’s a company/deal) in the Data Fetch request that is made when the contact record is loaded. The response to this data fetch request should contain information to display to the user at that time; there’s no way to pull this information after the sales objects have been loaded.
@Derek_Gervais, thank you for the response. Not sure the suggestions you make are going to help me. Let me ask the question in a different way. If my CRM extension that exists in the sidebar needs to have the context and information about a contact or deal at the time the CRM user is looking at the sidebar, is there a way to reliably pass that information to the extension application? If not now, is that a feature that is in the works? (seems somewhat fundamental… for instance I am not sure how the example given in the CRM extensions API, for a support ticket application, can provide useful information if the support ticket application doesn’t have access to the context of the other information that the user is looking at in HS CRM)
The CRM Extension in the sidebar gets that context included with the data fetch request made when the contact record is loaded. When HubSpot requests a sales object, it includes the ID of the relevant contact, company, or deal record. The response to this data fetch request should contain information to display; if the data fetch request included the vid for a contact, for example, the response should include that contact’s support tickets.
The flow looks like this:
In this example, the data fetch request (top right arrow) includes the company’s id. The Sales object(s) returned (bottom right arrow) should be specific to testcompany.com.
@Derek_Gervais Thank you for the additional detail. Discussing with my team. Will post any follow-up.