Getting Engagements from a Deal


#1

Hi,
We are trying to Get the Engagements from a specific Deal But using this Method: http://developers.hubspot.com/docs/methods/engagements/get_associated_engagements
But it doesn’t return any record! We tried with a sample company and it works, it doesn’t for deals (with tried several Deal IDs). Our goal is to get the dates in which deal status were changed (es. negotiation -> lost)


#3

Hi again, @Aliba.

Can you confirm your Hub ID is 4412483?

Would you share a few of the full request URLs you are using? For example:

https://api.hubapi.com/engagements/v1/engagements/associated/DEAL/123456/paged


#4

Hi Isaac,

Yes our Hub ID is 4412483
This is an example: https://api.hubapi.com/engagements/v1/engagements/associated/deal/385484890/paged?hapikey=xxxx-xxxxx-xxxxx-xxxxx


#5

Thank you, @Aliba,

Deal 385484890 does not have any associated engagements, so that's why this endpoint doesn't return anything:

Per the Engagements API Overview, HubSpot engagements are:

  • Notes
  • Emails
  • Tasks
  • Meetings
  • Calls

All engagements appear on the record timeline, but not all timeline events are engagements.

If you wish to find the dates in which deal status changed, use this endpoint and include the includePropertyVersions=true parameter in your request URL. This will return all historical values of the dealstage property and the timestamp when each changed!


#6

I see the point, thank you for your explanation. Is there any other API call that returns dates for deal status changes? (Eg when a deal is moved from decision to lost)


#7

Hi, @Aliba.

Thanks for your patience while I was out over the Thanksgiving holiday.

There are no dedicated APIs for deal status updates. Besides the includePropertyVersions=true method I describe above, however, you could create a deal.propertyChange webhook subscription for the dealstage property. This would send your system a notification any time any deal's deal stage changes. You could then filter it on your end to only surface when a deal is moved to a specific stage.

Webhook subscriptions require OAuth authentication; unlike your current setup, you cannot use an API key. Learn more about using OAuth with HubSpot here.