StockoutPlaybook
Sovereign Physical Distribution Platform · Cluster Node
Standard operating procedure for managing simultaneous order placement when physical inventory is exhausted in real time.
During promotional campaigns or seasonal spikes, dozens of retailers may attempt to order the remaining pallet of goods within the same second. This playbook outlines how Pegasus handles serializable reservation conflicts, instant credit releases, and transparent retailer messaging.
Architecture & Performance Highlights
Atomic Row Locking
Database transactions use SELECT FOR UPDATE NOWAIT to prevent concurrent overselling.
Instant Credit Refund
Pre-authorized digital funds are released immediately back to the retailer balance with zero delay.
Automated Backorder Offer
The retailer app offers to automatically fulfill the item from tomorrow morning factory line-haul.
Standard Operating Procedure
Detect Reservation Conflict
If requested quantity exceeds unreserved inventory, the database transaction returns an ErrInsufficientStock error code.
Execute Immediate Compensating Action
The mutating handler rolls back the order line, marks status as REJECTED_STOCKOUT, and reverses the credit reservation in the ledger.
Notify Retailer and Propose Substitution
Send an instant push notification to the Telegram Mini-App offering similar alternative SKUs or tomorrow delivery.
Avoid Partial Quantity Confusion
Always allow retailers to configure their preference: Partial Fulfillment Allowed vs All-or-Nothing to prevent surprise shipping fees.
Keep Exploring Pegasus Architecture & Operations
Based on the invariants, physical actors, and data flows of this module, explore these recommended companion guides and operational playbooks.
Supplier Control Plane
Suppliers monitor real-time stock burn rates and configure emergency restock alerts in the control plane.
Double-Entry Ledger Audit
Review the reversing journal entries triggered when an order is cancelled due to a stockout.
