MySales: Calculation of Order Allocation Using the Pick-to-Zero Scheme and Its Advantages over Cross-Dock
Explain how MySales recalculates order allocation using pick-to-zero
In MySales, the recalculation of order allocation under the pick-to-zero scheme is performed according to the following logic:
1. Demand Determination
For each store, demand for the nearest delivery day (D1) is calculated taking into account:
sales forecast (including seasonal and promotional effects),
write-offs due to expiration (D1 and D1–D2),
safety stock and presentation stock,
current on-hand inventory and in-transit stock.
2. Coefficient Initialization
For each store, a coverage ratio is calculated:
ratio = current stock / demand
This indicates how well the current inventory covers the store’s demand.
3. Priority Allocation
The algorithm sorts stores in ascending order of the ratio. Stores with the lowest ratio (i.e., the lowest level of demand coverage) receive priority.
4. Iterative Allocation
The algorithm iterates through the list:
allocates available warehouse stock in batches to stores with the lowest ratio,
recalculates the ratio after each step and continues allocation.
Goal: to bring the ratios of all stores as close as possible, achieving uniform demand coverage.
5. Constraints
Allocation is limited by:
shelf life — a store will not receive more product than it can sell within 70% of the shelf life,
maximum store capacity (if specified).
6. Calendar Synchronization
The store’s order date is automatically adjusted to match the date of goods receipt at the warehouse from the supplier.
This allows orders to be aligned across the entire supply chain.
7. Reallocation on D1
On the delivery day (D1), all orders are recalculated taking into account:
deviations from the forecast,
changes in inventory levels,
updated parameters.
If the delivered quantity is higher or lower than expected, MySales:
reallocates the volume among stores based on turnover,
logs adjustments in the “Delivery Adjustment” field in the store order.
This recalculation enables the most accurate fulfillment of demand and helps avoid overstocking or shortages.
If you want, I can demonstrate this logic with an example or explain it using code from rpm_units.js.
How does pick-to-zero differ from cross-dock?
A comparison of pick-to-zero and cross-dock in MySales highlights fundamental differences in the approach to supply allocation.
🔄 Pick-to-Zero (P2Z)
Key characteristics:
Product allocation occurs on the delivery day (D1).
Priority algorithm based on the ratio: products are allocated to stores in ascending order of demand coverage (
ratio = current stock / demand).The algorithm dynamically reallocates inventory considering:
current stock levels,
updated sales forecasts,
forecast deviations (e.g., actual demand is higher or lower than expected).
The system reallocates inventory on D1 even if forecasts changed after the supplier order was placed.
Enables minimization of write-offs and improves accuracy in meeting actual demand.
Advantages:
High delivery accuracy at the store level.
Minimization of losses and expirations.
Responsiveness to last-minute demand changes.
Optimal utilization of the entire delivered volume.
🚛 Cross-Dock
Key characteristics:
Allocation to stores is fixed in advance at the moment of placing the supplier order (usually on O1).
Allocation does not change even if store demand forecasts change between O1 and D1.
Uses a simpler logic: “what was ordered is what gets delivered.”
Limitations:
If store demand changes (up or down), products are still delivered according to the original order.
This can lead to:
overstock in some stores,
shortages in others,
write-offs, especially for products with short shelf life.
📊 Comparison Table
Characteristic | Pick-to-Zero | Cross-Dock |
|---|---|---|
Order calculation timing | On delivery day (D1) | On supplier order day (O1) |
Uses fresh data | ✅ Yes | ❌ No |
Flexibility | ✅ High | ❌ Low |
Allocation accuracy | ✅ Very high | ⚠️ Depends on forecast stability |
Inventory management | ✅ Dynamic | ❌ Fixed |
Suitable for fresh products | ✅ Excellent | ⚠️ Risk of write-offs |
Conclusion
Pick-to-zero is a modern and optimal strategy, especially for fresh and fast-moving products. It allows last-minute response to demand changes, which cross-dock cannot provide. This is why pick-to-zero is used in MySales as the primary allocation logic for product flows from warehouse to stores.