Webhook track changes

This might be a weird one… but here goes,…

currently have a Webhook set up to watch for changes to the deals deals_updated

we can see the status updating with the updated_fields and we can see the target stageid.

example:

{
  "deal": {
  "stageid": "2",
  "updated_fields": {
    "0": "stage"
  }
}

but what we would like to know what what was the stageid updated from.
is there a transaction api call I could get to find out what the stageid: was?

the reasoning for this is that we want to trigger an integration only when a Deal is qualified and ignore if this has not happened yet. basically want to know when the condition
stageid: 1 => stageid: 2

Told you this was a weird one :wink:

would be nice to have the webhook tell us what was changed

something like

{
  "deal": {
  "stageid": "2",
  "updated_fields": {
    "0": "stage"
  },
  "orginal_values": {
    "stageid":  "1"
  }
}

this way we will know what the value was so we do not have to do extra api calls to figure out the history was

so further to this
for me to figure out what has changed I need to hit the api
deals/{id}/dealActivities?filters[dataType]=d_stageid

issue here is there is no Ordering available of the dealActivities which means it will return a huge amount of data.
would be nice to be get the last activity doing this
deals/{id}/dealActivities?filters[dataType]=d_stageid&orders[id]=DESC&limit=1

since ordering doesn’t work. we have to slam the api for needless data. then look at the last element in the array of activities :frowning:

so as you can see the fastest and least expensive on resources for AC would be to actually send the changes down with the webhook…