improved

2019-10 Upcoming Webhook Changes

Upcoming Webhook Changes

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.

sale.update

  • Removed the embedded register_sale entity 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.
  • Removed outlet_id attribute from the embedded user
    This attribute has been replaced by an array of id's and is currently obsolete.
  • Removed market_id from sale payload
    This was always an internal attribute without any meaning to external applications.

product.update

  • Removed tax_id and tax from price_book_entries
    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 value and tax_id from product webhook could result in assuming the wrong value for some outlets. Instead of using those attributes, the id for the tax for a specific outlet should be taken from the taxes array and the value should be calculated based on the rate specific to that tax.

inventory.update

  • The attributed_cost on 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 [email protected].