How Wix Orders Become Ingredient Inventory Deductions
Direct answer: DishStock reads an eligible Wix restaurant order, identifies the exact item configuration, finds its recipe connection, multiplies recipe quantities by order quantity, and records one idempotent theoretical stock movement.
1. The order becomes eligible
Wix eCommerce order events identify created and updated orders. DishStock uses the order lifecycle state required by its accounting rules rather than deducting every cart or payment event.
Wix notes that webhook delivery may be delayed, duplicated, or out of order. The order event is therefore a signal to reconcile durable order state, not an instruction to blindly subtract.
2. The exact configuration is identified
The menu item, variant, and selected modifiers form the configuration. The same display item can map to different recipes when portion or add-ons change.
If the configuration has no active connection, stock does not change. The unresolved work remains visible so a merchant can connect it safely.
3. The recipe becomes quantities
For each recipe component, per-serving quantity is multiplied by the order line quantity. Two servings of a recipe containing 180 g beef produce a 360 g theoretical beef deduction.
The movement and an order snapshot are recorded together so retries can detect the state already accounted.
4. Edits and cancellations use differences
An edit applies only the difference between the new normalized consumption and the last accounted consumption. A stale update cannot roll a newer order state backward.
Cancellation restoration is conservative and waits for review where the correct physical outcome is uncertain. Refunds alone do not imply that ingredients returned to stock.