Supply Plan Daily Calculations Routine
The Supply Plan Daily Calculations routine is run to update records and perform calculations that are used in calculating the supply plan.
How to Run the Routine
Manually
Navigate to the Administration tab then select Supply Plan Daily Calculations from the menu.
Automatically
It is recommended to schedule this routine to run daily in order to ensure that the calculations used for the Supply Plan are up-to-date.
To schedule the function, go to Setup → Apex Class → Schedule Apex.
The Job name should be SupplyPlanBatchDailyCalculations.
The apex class name should be SupplyPlanCalculateSKU.
Set the Schedule with a Weekly frequency and select for it to occur every day of the week at 8 PM (or another time that is more appropriate for your org.)
When SupplyPlanCalculateSKU is finished, apex class SupplyPlanCalculateItemUsage will run, then SupplyPlanCalculatePlanning. You can go to Apex Jobs to monitor the status.
To run SupplyPlanCalculateSKU now, go to Administration tab. Run Planning\Supply Plan Daily Calculations\Submit SupplyPlanCalculateSKU Job.
Results of Running the Routine
The following calculations and updates are performed when running the routine:
Create Stockkeeping Units (SKU)
This routine will automatically create SKUs to ensure that all SKU records are created.
GoldFinch will search for Warehouse and Item combinations where the Item is not Blocked, the Item Type is Inventory, and the Warehouse has been configured with Enable Demand Forecasting. New SKU records will be created by copying the Planning parameters from each Item for any Item-Warehouse combination that has not yet been defined in GoldFinch.
Update Item Usage
Item Usage entries track inventory transaction quantities by Inventory Period Type. Item Usage entries are used for forecasting and other reporting purposes. This routine will create Item Usage entries for any newly created Item Ledger Entries for warehouses where the Enable Demand Planning field is checked.
To learn more about the Item Usage entries and how to maintain the records, refer to the Item Usage page.
Update First Stock Date
This routine will update the First Stock Date field on a SKU with the Posting Date of the first Item Ledger Entry of a positive quantity.
Insert Previous Period Item Usage
Previous Period Item Usage records are used to store the Best Fit Model for the SKU. This is required to calculate forecasts.
Find the Best Fit Model
This routine will calculate the Best Fit Model and enter that information on the SKUs.
Read Configure Forecast Model and how to calculate forecasts using Forecast Models.
To illustrate the selection process, let us assume the following setup on the Demand Planning Setup table.
Read Update Demand Planning Setup for more information.
Field Label | Sample Setup |
Forecast Accuracy Calculation Method | MAPE |
Inventory Period Type | By Month |
Periods to Forecast | 12 |
Periods to Re-Forecast | 4 |
Today is 3/25/20.
Calculate the current inventory period date = 3/1/20.
Retrieve all prior period's Item Usage with the Starting Date = 2/1/20.
For each of the prior periods' Item Usage, retrieve 4 periods to Re-Forecast. These are the Re-Forecast periods for each of the prior periods:
2/1/20
1/1/19
12/1/19
11/1/19
Assuming there are 3 active forecast models:
3-Month Moving Average
Seasonal Index
6-Month Moving Average
For each of the Re-Forecast periods, loop through each of the active forecast models to calculate the Forecast Qty.
Review Configure Forecast Models to learn how GoldFinch calculates forecast quantities using forecast models.
Calculate the absolute Qty. Difference and the % Difference between the Forecast Qty and the Actual Qty. Save the Actual, Re-Forecast Qty., Qty. Difference and % Difference to the Re-Forecast Calculations table.
Starting Date | Forecast Model | Actual | Forecast | Qty. Difference | % Difference |
---|---|---|---|---|---|
2/1/20 | 3 Month Moving Average | 100 | 95 | 5 | 5% |
1/1/20 | 3 Month Moving Average | 90 | 80 | 10 | 11% |
12/1/19 | 3 Month Moving Average | 110 | 101 | 9 | 8% |
11/1/19 | 3 Month Moving Average | 85 | 97 | 12 | 14% |
2/1/20 | Seasonal Index | 100 | 110 | 10 | 10% |
1/1/20 | Seasonal Index | 90 | 91 | 1 | 1% |
12/1/19 | Seasonal Index | 110 | 109 | 1 | 1% |
11/1/19 | Seasonal Index | 85 | 87 | 2 | 2% |
2/1/20 | 6 Month Moving Average | 100 | 95 | 5 | 5% |
1/1/20 | 6 Month Moving Average | 90 | 50 | 40 | 44% |
12/1/19 | 6 Month Moving Average | 110 | 60 | 50 | 45% |
11/1/19 | 6 Month Moving Average | 85 | 70 | 15 | 18% |
Since the Forecast Accuracy Calculation Method is MAPE, calculate the average % Difference for the 3 forecast models
Forecast Model | MAPE |
---|---|
3 Month Moving Average | 10% |
Seasonal Index | 4% |
6 Month Moving Average | 28% |
'Seasonal Index' will be selected as the Best Fit Forecast Model for the SKU. A different SKU could have a different Best Fit Forecast Model.
The selected Best Fit Forecast Model is stored in the Calculated Best Fit Model field in the prior period item usage records.
Overwrite the Best Fit Forecast Model
Sometimes it makes sense to have a Locked Forecast Model per SKU or for all SKUs, because of the lack of sufficient history or to simplify forecast calculations.
On a SKU, you can enter an active Forecast Model into the Locked Forecast Model field to override the Calculated Best Fit Model.
Alternatively, you can enter an active Forecast Model to the Locked Forecast Model field on the Demand Planning Setup. For all SKUs that have a blank Locked Forecast Model, the Locked Forecast Model field on Demand Planning Setup will be used.
If both SKU and Demand Planning Setup have a blank Locked Forecast Model, the Calculated Best Fit Forecast Model will be used to forecast.
Update Planning Parameters
The following planning parameters will be calculated per SKU:
Calculated Daily Usage
Calculated Daily Usage = Total Sales Qty. / No. of Days.
If the Inventory Period Type = By Month, the past 12-month history will be used. If By Week, the past 13-week history will be used.
Calculated Reorder Qty.
Calculated Reorder Qty. = (total future Forecast Qty. * 2 * Ordering Cost) / (Carrying Cost per Unit * Unit Cost)
Future Forecast Qty. If the Inventory Period Type = By Month, the future 12-month forecast will be used. If By Week, the future 13-week forecast will be used.
Unit Cost = Item card's Last Invoiced Base Cost. If 0, the Item's Standard Base Cost will be used.
Ordering Cost = defined on the Warehouse, per purchase order.
Carrying Cost per Unit = defined on the Warehouse:
By Month, % per unit per year.
By Week, % per unit per quarter.
Calculated Lead Time
Calculated Lead Time = (Actual Receipt Date on WR - Order Date on PO) / No. of Receipts
If Inventory Period Type = By Month, the past 12-month history will be used. If By Week, the past 13-week history will be used.
Calculated Safety Stock
Calculated Safety Stock = Calculated Lead Time * Calculated Daily Usage