Get attached product data when edited in a deal

We have a webhook set up for when deals are edited. We do receive a webhook notification whenever a deal is edited. We also receive a notification when attached products are modified in the deal (added/removed/etc), however this notification fails to provide the information that attached products have been edited (the “attached product” objects are just not there, only the deal object).

There is no possibility to set up a webhook for “attached products” as far as the documentation is concerned, so how can we tell that attached products have been modified in a deal other than every time there is a change in a deal, we actively fetch all the attached products and perform the diff to even find out if anything is different?

After discussing this with the support, the conclusion is that there is no convenient way how to obtain this information in the webhook.

There are two fields in the deal object that yield some information:

  • product_count
  • value

However, when an attached product gets replaced with a product of the same value, these two fields will not yield any useful outcome.

Therefore, if the scenario of swapping two products of the same value in a deal is relevant, the recommended approach is to always fetch attached products when you receive an update to a deal to be 100% sure that you have the most up-to-date information.