Demand from stores is a method used by many retailers that is designed to take the demand from the retailers stores and use that aggregated demand on a warehouse level to create purchase orders.
This is a much more accurate method of estimating future demand for warehouses then using statistical forecasts for the warehouses based on aggregated sales of the stores that order from the warehouse or the actual transactions out of the warehouse.
An example of how this works: A retailer has 100 stores that order a particular item from a single warehouse, the run_demand procedure runs on a daily basis and based on the lead time and order frequency for that item it creates 100 purchase plans going forward one year into the future for each store. The purchase plan considers each individual store forecast, sales plan, stock level, undelivered and all other parameters used for regular order creation. After those purchase plans have been created, they are all aggregated together and displayed (with the chart element ‘Purchase Plan Calculated’ in the item card) and used on a warehouse level for Purchase order creation from vendors.
Step 1
Set demand_from_stores
column in core.setting
table to true if you want to calculate the Purchase plans data.
update core.setting
set setting_value = 'true'
where setting_key = 'demand_from_stores'
Step 2
Configure what items should use demand from stores
Set demand_setup
column in item_details
table to 1 if you want demand from stores to be used instead of forecast. For a retail setup where you want to use demand from stores for all items the mapping in the view rep.v_items_details
should be following:
case when loc.location_type = 'warehouse' then 1 else 0 end as demand_setup
In whs setup then demand_setup
column is set to 0 for all items.
Step 3
The demand formula needs to be updated to look at this demand_setup
column. See the example below:
Example
If you have customized demand, you should not run the following query blindly. Compare the ‘calculation’ value to the standard and make appropriate adjustments to your setup.
-- Be careful when updating
--UPDATE dbo.data_element_series
SET server_config = JSON_MODIFY(server_config,'$.generated_view.value_column_calculated.calculation','COALESCE([planner_baseline],case when itd.demand_setup = 1 then ISNULL([demand_from_stores],0) else ISNULL([forecast],0) end) +ISNULL([reserved],0)+ISNULL([bom_demand],0)+ISNULL([planner_promotions],0)')
WHERE name = 'demand'
In warehouse setup you will use the statistical forecast as demand (not the demand from stores since there are no stores in the setup), but you would like to run the demand from stores procedure to get the purchase plans available to be able to send to vendors.
The days covered results from the demand from stores calculations are used to populate the days covered MBE columns. In order for those results to be available the DFS will need to calculate at least a single order for every item. By default, multiple orders are calculated for all items except closed ones as can be seen here:
This screenshot is from the dbo.demand_processing_calc_run procedure in prod. If you need to modify for which items DSF is calculated this is the place to do so.
Note that if you limit the item set being calculated you risk having missing or stale days covered numbers in MBE