Skip to content

Demand projection

Scope: the Projection mode of the Create / Edit Purchase Order screen.

The formula

For each product in scope:

Suggested Qty = ceil( SV × DIDs − available stock )

  • SV — sales velocity in units/day, from the forecasting engine.
  • DIDs — Desired Inventory Days (the cover you want to order to).
  • available stock — on-hand units, summed across the projected warehouses.

A product is kept only when its suggested quantity is strictly greater than the Min Suggested Qty control. With Exclude zero-sale on, products with SV ≤ 0 are dropped first. Kept rows are sorted by suggested quantity, highest first.

Where SV comes from

SV is the sv_xyz_merged value from the shared generate_demand_forecast RPC — the same engine and number used by the Demand Forecast feature. It is an XYZ-weighted velocity over fixed 7 / 30 / 90-day windows (the RPC’s default settings). The projection calls the engine treating the selected warehouses as standalone (Case 1) — i.e. each warehouse’s own velocity — which is the right SV when procuring to those warehouses.

Because SV uses fixed forecasting windows, the projection has no “sales date range” control — the windows are the sales basis.

Scope (stores & warehouses)

  • Project across stores and …and/or warehouses are both multi-selects.
  • The effective warehouse set = warehouses of the selected stores ∪ individually-selected warehouses. If both are empty, the PO’s own warehouse is used.
  • Both SV and available stock are summed across every warehouse in that set.

Controls

ControlEffect
Project across stores / warehousesThe scope SV + stock are combined over.
Desired Inventory Days (DIDs)The cover target in the formula.
Min Suggested QtyHide rows not strictly greater than this.
Exclude zero-saleDrop products with no sales velocity (SV ≤ 0).

Behaviour

  • Projection scopes products to the selected supplier (and optional brand filter).
  • Calculate Projection computes the rows and applies the suggested quantities to the order’s line items; Show Details reveals the SV table (SV /day, DIDs, Available, Coverage, Suggested Qty).
  • A product already covered for the DIDs target suggests 0 and is filtered out.