How MySales Generates a Warehouse Order from a Supplier: Process, Algorithms, and Accounting for Product Washout

How MySales Generates a Warehouse Order from a Supplier: Process, Algorithms, and Accounting for Product Washout

MySales creates an order to the supplier based not only on the current warehouse stock.

The system takes into account future store needs, the sales forecast, write-offs, Safety Stock, Presentation Stock, goods in transit, shelf life, the delivery schedule, and logistical constraints.

As a result, the warehouse receives not just a quantity for replenishment, but the calculated need of the network that it must fulfil.

How the process works

Order creation consists of three main stages:

  1. Calculating store needs
    MySales forecasts demand and determines the future need of each store.

  2. Forming the warehouse need
    The needs of stores served through the warehouse are combined into the total warehouse need.

  3. Creating an order to the supplier
    The system takes into account the RPM diagram, stock, goods in transit, and logistical constraints, and creates the final order.

1. Calculating the store need

For each store, MySales takes into account:

  • Forecast D1 — the sales forecast for the delivery date;

  • Forecast D1D2 — the forecast for the period between the next deliveries;

  • Write-offs D1 / D1D2 — forecast write-offs;

  • Safety Stock — safety stock;

  • Presentation Stock — the minimum stock for display;

  • forecast stock;

  • goods in transit;

  • shelf-life constraints.

Forecast stock on D1

Stock D1 = max(0, Stock O1 − Forecast O1D1 − Write-offs O1D1 + In-transit O1D1)

This means that the system determines how much stock is actually expected at the time of the next delivery after forecast sales, write-offs, and already planned incoming deliveries.

Store need

The main logic for calculating the need:

Forecast D1D2 + Write-offs D1D2 + Safety Stock + Presentation Stock − Stock D1

The calculated quantity is then rounded according to packaging rules and checked against shelf-life constraints.

This means:

  • Forecast determines future demand;

  • Write-offs account for future losses;

  • Safety Stock protects against deviations in demand;

  • Presentation Stock maintains the required display;

  • Stock D1 accounts for goods that will already be available;

  • Shelf-Life Limit helps control the allowable stock.

For products with low demand, minimum order quantity rules may also apply according to the packaging.

2. Forming the warehouse need

The future needs of stores that must be supplied through a specific warehouse are summed.

In simplified terms:

Warehouse Need = sum of store needs

MySales also takes into account:

  • current warehouse stock;

  • goods in transit;

  • orders already created;

  • packaging and order multiples;

  • minimum order quantity;

  • minimum order amount;

  • shelf-life constraints.

The D1 need is particularly important: on the day the goods arrive, the system may update store needs again before the actual allocation.

3. RPM diagram

The order to the supplier is created according to the configured RPM diagram.

It determines:

  • order and delivery days;

  • the delivery interval;

  • the list of SKUs;

  • the receiving warehouse;

  • the delivery type, for example, direct delivery or Cross-Dock.

Based on these parameters, MySales determines which future store needs must be included in a specific order to the supplier.

4. Creating an order to the supplier

Before creating an order, the system checks which SKUs can be included in it.

The product must:

  • be included in the supplier’s contract;

  • be available for the relevant warehouse;

  • match the configured delivery type.

The final calculation also takes into account:

  • warehouse stock;

  • goods in transit;

  • minimum order quantity;

  • minimum order amount;

  • package size;

  • Shelf-Life Limit;

  • warehouse categories and groups;

  • confirmation mode — Manual or Auto.

If Auto-confirm is enabled, the order may be confirmed automatically. Otherwise, an action by the manager is required.

What happens when there is a shortage at the warehouse

If there are insufficient goods at the warehouse, actual store sales may fall below real demand simply because the goods are unavailable.

Therefore, it is important to distinguish:

  • low demand
    from

  • low sales due to OOS.

MySales can take stock-out periods into account when forecasting so that the absence of goods is not automatically interpreted as a decline in demand.

A stock-out situation may be identified, for example, when:

  • sales are zero or drop sharply;

  • stock falls to zero;

  • sales are limited by the actual availability of goods.

Such periods may be excluded or adjusted in the forecast.

Result: a shortage or underdelivery should not artificially reduce future need.

How OOS affects orders

If a store received less stock than required:

  • Stock D1 may fall to 0;

  • actual sales may be lower than real demand;

  • Forecast should not automatically decrease solely because of OOS;

  • the store continues to generate its need based on the forecast.

The warehouse sees the total need of the stores, rather than only actual sales that may have been limited by the absence of goods.

In simplified terms:

Warehouse Need = SUM(Store Orders)

Therefore, even when warehouse stock is zero, the need of the entire network should not automatically decrease.

Pick-to-Zero: allocating goods during a shortage

If the quantity of goods at the warehouse is lower than the total need of the stores, Pick-to-Zero may be applied.

On D1, the system updates the need of each store and uses the ratio:

Stock / Need

Stores with the lowest stock-to-need ratio receive priority.

This helps:

  • redistribute the shortage among stores;

  • take the current stock situation into account;

  • update the need on the delivery day;

  • take D1 write-offs into account;

  • supply stores in a more balanced way when stock is limited.

What happens during prolonged OOS

When goods are unavailable for a prolonged period, forecast behaviour may depend on the MySales configuration.

In the basic scenario, stock-out periods should not automatically reduce Forecast solely because of zero sales.

For certain configurations, a long-OOS fallback may be applied — a fallback forecasting approach so that the system does not use an outdated demand level indefinitely.

Alternative data may be used for this calculation, for example:

  • demand from similar stores or clusters;

  • category data;

  • another fallback demand level.

Thus, prolonged OOS does not necessarily mean an automatic decline in the forecast — the specific behaviour depends on the system settings.

Full process logic

Store Forecast
↓
Store Need
↓
Sum of Store Needs
↓
Warehouse Need
↓
Warehouse Stock + Goods in Transit + Logistical Constraints
↓
RPM Diagram
↓
Order to the Supplier
↓
D1: Updating the Need and Pick-to-Zero During a Shortage

During OOS, the system additionally takes into account that limited sales do not always mean a real decline in demand.

Result

MySales creates an order to the supplier based on the future need of the network, rather than only current warehouse stock or actual sales.

The system helps:

  • forecast the need of each store;

  • combine it into the total warehouse need;

  • take Write-offs, Safety Stock, and Presentation Stock into account;

  • take goods in transit into account;

  • apply RPM schedules;

  • control packaging, the minimum order quantity, and the minimum order amount;

  • take shelf life into account;

  • confirm orders automatically or manually;

  • avoid reducing the need solely because of OOS;

  • redistribute shortages through Pick-to-Zero.

As a result, the warehouse answers not just the question:

“How much stock is left?”

but a more important one:

“How much stock needs to be ordered from the supplier to fulfil the future need of the network, taking into account stock, deliveries, logistical constraints, and a possible shortage?”