As a part of a larger effort around our new inventory system, generation of payloads for a few types of webhooks had to be delegated to a different system and therefore completely rewritten. In this process, we have discovered a few attributes which were either redundant, misleading or plain incorrect. Below is the list of webhook types and attributes that are changing.
- Removed the embedded
register_saleentity from payments
This data was always been present at the top level of the sale object and therefore redundant. We're removing it to reduce the size of the payload and improve the performance of the payload generation.
outlet_idattribute from the embedded user
This attribute has been replaced by an array of id's and is currently obsolete.
market_idfrom sale payload
This was always an internal attribute without any meaning to external applications.
Presence of those attributes was attributes was misleading and could result in incorrect assumptions. In situations where different outlets had different default taxes assigned to them, using the
tax_idfrom product webhook could result in assuming the wrong value for some outlets. Instead of using those attributes, the
idfor the tax for a specific outlet should be taken from the
taxesarray and the value should be calculated based on the rate specific to that tax.
attributed_coston the embedded product object the will always be null
Attributed cost is an outlet specific attribute and should, therefore, be taken from the top-level inventory record instead of the embedded product object.
Those changes will take effect at a different time for different users as we gradually roll them out. The rollout is expected to start at the beginning of September and complete by the end of the month.
If you have any further questions please get in touch with us at firstname.lastname@example.org.