Shops that use Omnichannel seem to have incorrect stock levels in variant update webhook payload

Jeroen - Inventory AlarmJeroen - Inventory Alarm Member, Partner Posts: 8 partner
edited October 27 in Development

After investigating an issue that a client experienced, I found the following.


The clients webshop uses omnichannel. In API terms: https://api.webshopapp.com/nl/shop.json returns "isRetail":true


When the client updates the stock in the POS, say from 0 to 3, an eCom variant update webhook is sent to our platform as expected, containing a payload with the variant's data.


We would expect the json payload to have data: "stockLevel":3 . This is the default behaviour when stock changes in eCom without Omnichannel: stockLevel in payload contains the new stocklevel after the update.


Instead, the json payload has data: "stockLevel":0 . In addition, when you check https://api.webshopapp.com/nl/variants/movements?variant=<<variantid>> , it contains


"createdAt":"2020-10-26T13:30:50+01:00","channel":"api","stockLevelChange":3


So to summarize:

- client changes stock in POS from 0 to 3

- due to POS - eCom sync, eCom variant update webhook to our application is triggered, mentions stocklevel 0

- expected was: stocklevel 3

- inspecting movement api mentions stocklevelchange 3


Since we use the variant update webhook payload and dont want to make any extra API calls to movement, it would be desirable to have the stocklevel 3 in the payload, since that is the stocklevel after the change via POS.


I can provide more details about the client data in a DM.

Inventory Alarm - Extra omzet met terug-op-voorraad e-mails

https://www.lightspeedhq.nl/ecommerce/store/apps/inventory-alarm/

1 comment

Sign In or Register to comment.