All use-cases

Commerce & Ops

Record a sale, auto-decrement stock

Place an order; line prices lock at sale time, inventory decrements, sale lands in purchase history.

One atomic write covers the order, the price lock, and the stock decrement.

Stock is checked before the order is placed; a gate blocks out-of-stock variants automatically. Every status transition is atomic and audited, and the sale appears in the customer's purchase history with an in-app alert.

Bell = in-app alert Amber diamond = automatic check
Select customer + variant staff initiates order Stock available? yes no Out of stock order blocked Order placed OrderLine qty + unit price captured (minor units) Status transitions StatusMachine — atomic write + writeAudit Inventory decrements for (variant, entity) Sale in purchase history sale-recorded alert
app/commerce/sale
Live demo

recording from the demo site — coming soon

One atomic write covers the order, price lock, and stock decrement. Stock is checked automatically before the order lands; an out-of-stock variant blocks immediately. The price is captured in minor units at sale time, status transitions are audited, and the sale appears in purchase history with an in-app alert.