flowchart LR accTitle: From five units on the shelf to six available to promise accDescr: A waterfall of units. The warehouse has five units on hand. Four are already allocated and one is safety stock, so zero units are available today. Six inbound units arrive in two days, inside a delivery promise of five days. Available to promise is therefore six. The content system supplies the item and its terms, the warehouse system supplies stock and commitments, and the order system holds the reservation. %% ref-commerce-atp (en) %% https://www.thebsq.com/work/global-commerce-platform/ %% n_onhand — The warehouse balance counts five units. It is the largest figure and the least useful one for a promise. n_onhand["On hand: 5"] %% n_allocated — Four units belong to orders that the warehouse has not shipped yet. The warehouse system knows these commitments. n_allocated["Already allocated: 4"] %% n_safety — One unit stays back for a counting error, a damaged item or another channel. n_safety["Safety stock: 1"] %% n_today — Five minus four minus one is zero. A storefront that shows the balance of five sells a unit it cannot ship today. n_today["Available today: 0"] %% n_inbound — Six units arrive in two days. They count because the delivery promise is five days. n_inbound["Inbound in 2 days: 6"] %% n_atp — The storefront shows this figure with the delivery promise that belongs to it. n_atp["Available to promise: 6"] %% n_reserve — The order system holds one unit for one purchase and releases the hold when the order fails or expires. n_reserve["Reservation"] n_onhand -->|"subtract the commitments"| n_allocated n_allocated -->|"subtract the reserve"| n_safety n_safety -->|"gives the figure for today"| n_today n_today -->|"add the inbound units before the promised date"| n_inbound n_inbound -->|"gives the figure to show"| n_atp n_atp -->|"an order reserves against it"| n_reserve n_reserve -->|"becomes a commitment"| n_allocated %% Calculate the promise — n_onhand → n_allocated → n_safety → n_today → n_inbound → n_atp %% Follow a reservation — n_atp → n_reserve → n_allocated → n_safety