Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Order Cancellation Fulfillment Adjustment

Order Cancellation Fulfillment Adjustment

koleary
Visitor
2 0 2

Hi,

 

I am maintaining an inventory management dashboard for my store and have successfully utilized the orders/edit webhook to adjust inventory. However, I am having trouble determining the correct way to adjust inventory during an orders/cancel webhook, since the orders/edit webhook is not sent when an order is cancelled and there is no there is no delta for line item quantities on the orders/cancel request body.

 

I am noticing there are refund_line_items that are present on the order's refunds object, and the latest one has the quantities that need to be added back to inventory, but my hunch is that doing something like just grabbing the latest refund_line_item is not reliable nor recommended.

 

Any help would be much appreciated!

 

 

Replies 0 (0)