Planning analytics - IBM/intelligence-suite-supply-chain-solutions GitHub Wiki
As a supply chain manager, I need an operational environment to view and understand my demand forecasts, detect projected stockouts, and act on short and long term mismatches between demand and supply to avoid revenue loss and drive continuous improvement supply chain route planning.
This tutorial will show you how to develop dashboards for viewing inventories with custom attributes
. We will display information on inventory supply and demand filtered with Planner code
, Category
, Location ID
, Location name
, and display them by different charts and tables.
Here are some sample screenshots of the expected output. See more in the Planning analytics gallery
This sample solution assumes you are familiar with implementing solutions in SCIS. You can find relevant tutorials for all of the instructions here in the intelligence suite wiki.
Note - these tutorials are provided as-is for educational purposes only. We do our best to make them fully useable, however there will be gaps as published. If you have suggestions for improvements please submit an issue.
Data model
In this sample solution we are going to use the Inventory
business object to capture inventory supply and demand records. We registered different custom attributes for all SCIS inventory business objects. See below for details and definitions
Calculations
While we could directly query and compare the measurements to the limits for the dashboard and query, a better practice will be to register derived data fields to pre-compute days to stock out, overage and underage, consumption, etc. For that purpose we would register derived fields such as Inventory.daysToStockoutFloat
.
NOTE that for this static demonstration these rules were NOT created. The days-until values were manually calculated to a fixed value. For an instance of this dashboard to be implemented with live data these rules would need to be developed
NOTE: In the following examples, you need to make suitable replacements for the following: <INSERT_YOUR_ORG_ID_HERE>, <INSERT_YOUR_TENANT_ID_HERE>,
- Register custom attributes
- Load sample data
- Create widgets
- Create pages
- Create dashboards
- Create work queues
- Test on https://www.supply-chain.ibm.com/
Step 1. Register custom attributes
Values and limits
-
expectedLeadTimeFloat
- lead time for the product -
planningPeriodFloat
- longer time period than lead time, 21 days in this example -
consumptionLowerLimitFloat
- lower quantity to determing under-consumption -
consumptionUpperLimitFloat
- lower quantity to determing over-consumption -
mapeControlLimitFloat
= upper limit for mean average percentage error of the plan
Metrics
-
daysToStockoutFloat
- number of calendar days until the next stock out -
daysToStockOverageFloat
- number of calendar days until the next stock overage (excess) -
nextStockOverageQuantityFloat
quantity of the next stock overage (excess) -
daysToStockUnderageFloat
- number of calendar days until the next stock underage (approaching out) -
nextStockUnderageQuantityFloat
- quantity of the next stock underage (approaching out) -
quantityReceivedWithinPeriodFloat
- quantity of inventory which was received in last planning period (days) -
consumptionFloat
- average consumption of the product over a time period -
mapeCurrentValueFloat
- decimal mean average percentage error of the plan -
biasCurrentValueFloat
- decimal bias measurement for the plan
This POC builds on our standard "Lighttree" sample data whch can be found here:
The custom or extension attribues were mocked up and calculated using this workbook:
The excel sheet was transformed into JSON using these tips and tricks:
POST https://api.ibm.com/supplychainui/run/na/api/v1/wms/widget_definitions
POST https://api.ibm.com/supplychainui/run/na/api/v1/wms/subscriptions/subscribe
Daily Supply
-
KPI widgets
- Inventory stock out: stock_out_kpi.json
- Inventory stock out underage within planning period: stock_underage_within_planning_period_kpi.json
- Purchase order overage: purchase_order_overage_kpi.json
-
Bar chart widgets
- Stock out within lead time (location) : stock_out_within_lead_time_location_bar.json
- Stock out within lead time (planner code) : stock_out_within_lead_time_planner_code_bar.json
- Stock out within planning period (location) : stock_out_within_planning_period_location_bar.json
- Stock out within planning period (planner code) : stock_out_within_planning_period_planner_code_bar.json
- Stock underage within planning period (location) : stock_underage_within_planning_period_location_bar.json
- Stock underage within planning period (planner code) : stock_underage_within_planning_period_planner_code_bar.json
-
Table widgets
- Stock out within lead time: stock_out_within_lead_time_table.json
- Stock out within planning period: stock_out_within_planning_period_table.json
- Stock underage within planning period: stock_underage_within_planning_period_table.json
- Stock out within lead time view all: stock_out_within_lead_time_viewall_table.json
- Stock out within planning period view all: stock_out_within_planning_period_viewall_table.json
- Stock underage within planning period view all: stock_underage_within_planning_period_viewall_table.json
- purchase order overage vieew all:purchase_order_overage_view_all_viewall_table.json
Weekly Supply
-
KPI widgets
- Stock out within planning horizon: stock_out_within_planning_horizon_kpi.json
- Stock underage within planning horizon: stock_underage_within_planning_horizon_kpi.json
- Stock overage within planning horizon: stock_overage_within_planning_horizon_kpi.json
-
Bar chart widgets
- Stock out within planning horizon (planner code) : stock_out_within_planning_horizon_planner_code_bar.json
- Stock out within planning horizon (location) : stock_out_within_planning_horizon_location_bar.json
- Stock underage within planning horizon (planner code) : stock_underage_within_planning_horizon_planner_code_bar.json
- Stock underage within planning horizon (location) : stock_underage_within_planning_horizon_location_bar.json
- Stock overage within planning horizon (planner code) : stock_overage_within_planning_horizon_planner_code_bar.json
- Stock overage within planning horizon (location) : stock_overage_within_planning_horizon_location_bar.json
-
Table widgets
- Stock out within planning horizon: stock_out_within_planning_horizon_table.json
- Stock underage within planning horizon: stock_underage_within_planning_horizon_table.json
- Stock overage within planning horizon: stock_overage_within_planning_horizon_table.json
- Stock out within planning horizon view all: stock_out_within_planning_horizon_wiewall_table.json
- Stock underage within planning horizon view all: stock_underage_within_planning_horizon_viewall_table.json
- Stock overage within planning horizon view all: stock_overage_within_planning_horizon_viewall_table.json
Weekly Demand
-
KPI widgets
- Over consumption: over_consumption_kpi.json
- Under consumption: under_consumption_kpi.json
-
Donut chart widgets
- Over consumption: over_consumption_donut.json
- Under consumption: under_consumption_donut.json
-
Table widgets
- Over consumption view all: over_consumption_viewall_table.json
- Under consumption view all: under_consumption_viewall_table.json
Monthly Demand
-
KPI widgets
- Bias alerts (positive) : bias_alert_positive_kpi.json
- Bias alerts (negative) : bias_alert_negative_kpi.json
- MAPE alerts: mape_alert_kpi.json
-
Donut chart widgets
- Bias alerts (positive) :bias_alert_positive_donut.json
- Bias alerts (negative) : bias_alert_negative_donut.json
- MAPE alerts: mape_alert_donut.json
-
Table widgets
- Bias alerts (positive) view all: bias_alert_positive_viewall_table.json
- Bias alerts (negative) view all: bias_alert_negative_viewall_table.json
- MAPE alerts view all: mape_alert_viewall_table.json
POST https://api.ibm.com/supplychainui/run/na/api/v1/wms/layout_templates
Daily Supply
- Stock out within lead time view all: stock_out_within_lead_time_viewall_layout.json
- Stock out within planning period view all: stock_out_within_planning_period_viewall_layout.json
- Stock underage within planning period view all: stock_underage_within_planning_period_viewall_layout.json
- Stock purchase order overage viewall view all: purchase_order_overage_viewall_layout.json
Weekly Supply
- Stock out within planning horizon view all: stock_out_within_planning_horizon_viewall_layout.json
- Stock underage within planning horizon view all: stock_overage_within_planning_horizon_viewall_layout.json
- Stock overage within planning horizon view all: stock_underage_within_planning_horizon_viewall_layout.json
Weekly Demand
- Over consumption view all: over_consumption_viewall_layout.json
- Under consumption view all: under_consumption_viewall_layout.json
Monthly Demand
- Bias alerts (positive) view all: bias_alert_positive_viewall_layout.json
- Bias alerts (negative) view all: bias_alert_negative_viewall_layout.json
- MAPE alerts view all: mape_alert_viewall_layout.json
POST https://api.ibm.com/supplychainui/run/na/api/v1/wms/layout_templates
then POST https://api.ibm.com/supplychainui/run/na/api/v1/wms/subscriptions/subscribe
Subscription body should be of the form:
{
"id": "<TEMPLATE_ID>_subscription",
"offeringId": "SCO",
"state": "ACTIVE",
"subscriptionConfig": [],
"tenantId": "<tenant_id>",
"templateId": "<TEMPLATE_ID>"
}
- Daily supply: daily_supply_layout.json
- Weekly supply: weekly_supply_layout.json
- Weekly demand: weekly_demand_layout.json
- Monthly demand: monthly_demond_layout.json
POST https://api.ibm.com/infohub/run/metadata/api/v1/na/workqueues
- Stock Out Within Lead Time: stockOutWithinLeadTime.json
- Stock Out Within Planning Period (LT+1 week): stockOutWithinPlanningPeriodLt1Week.json
- Stock Underage within Planning Period: stockUnderageWithinPlanningPeriod.json
- Purchase Order Overage: purchaseOrderOverage.json
- Stock out within Planning Horizon: stockOutWithinPlanningHorizon.json
- Stock Underage within Planning Horizon: stockUnderageWithinPlanningHorizon.json
- Stock Overage within Planning Horizon: stockOverageWithinPlanningHorizon.json
- Under Consumption: underConsumption.json
- Over Consumption: overConsumption.json
- MAPE Alerts: mapeAlerts.json
- BIAS Alerts - Positive: biasAlertsPositive.json
- BIAS Alerts - Negative: biasAlertsNegative.json