Inventory at risk due to fire and flood - IBM/intelligence-suite-supply-chain-solutions GitHub Wiki
As a supply chain management manager, I need a dashboard to help me measure the impact of weather at various warehouse locations so I can provide feedback and take action to my suppliers to recover costs and drive continuous improvement supply chain route planning.
This tutorial will show you how to develop a dashboard for viewing locations with related weather. We will display information on the center of the weather, and then monitor the information on the location of the warehouse affected by the weather. Also show affected stock products
Here are some sample screenshots of the expected output:

This use case assumes you are familiar with implementing solutions in SCIS. You can find relevant tutorials for all of the instructions here in the User interface, Data platform, Data import-export and Produce quality use case tutorial wikis.
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 use case we are going to use the ExternalEvent to represent a weather. One ExternalEvent business object indicates an ongoing or ended weather. Using Inventory business object to store the relation of inventory and product and location. An Inventory allows a product to be associated with an inventory location. We use the Product business object to record product information. We use the Location business object to record a location's information. We use the GeoCorrelationIssue business object to link between Location and ExternalEvent. A GeoCorrelationIssue allows to record a location associated with a weather.
Attributes
We will register an extended property isCurrentlyMeetingCorrelationCriteria = true to indicate that a location is currently affected by a weather, or otherwise. We will use the attributes locationName, locationIdentifier and some other attributes in Location. Use properties subject, areaCounty, country, stateProvince in ExternalEvent. We will use property forecastedEnd and start on which forecastedEnd >= nowTime && start <= nowTime to filter the ongoing weathers. We use the attribute includeInCorrelation=true to filter whether the impact of weather needs to be considered.
Calculations
While we could query the ExternalEvent directly and compare the Locaion's coordinates to its sphere of influence, it is better to create a new object to record the relationship between the ExternalEvent and Locaion that are associated. This will simplify the query and execute faster. To do this, we will register a new object GeoCorrelationIssue.
NOTE: In the following examples, you need to make suitable replacements for the following: <INSERT_YOUR_ORG_ID_HERE>, <INSERT_YOUR_TENANT_ID_HERE>,
- Load sample data
- Register rules
- Register work queues
- Create widgets
- Create pages
- Create dashboards
- Test on https://www.supply-chain.ibm.com/
- Register data import rules to pick up files from object storage (if your tenant does not already have CSV import rules registered)
- Load sample data to your COS bucket
- (Optional) add additional locations and inventory to the sample data set for more correlation opportunitis
- Warehouse depot locations - data-warehouse-locations.csv
- Warehouse depot inventory - data-warehouse-inventory-v2.csv
POST https://api.ibm.com/infohub/run/metadata/api/v1/na/derived/rules
Create GeoCorrelationIssue to correlate ExternalEvent (weather event) with locations
- Location correlation rule: dd_location_geo_correlation.json
POST https://api.ibm.com/infohub/run/metadata/api/v1/na/workqueues
- Locations at risk - wq-location-at-risk.json
- Inventory at risk - wq-inventory-at-risk.json
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
Dashboard widgets
- All active risk events - widget-severe-weather-list-v2.json
- Location advisories - widget-location-advisories-list.json
- Inventory at risk - widget-inventory-at-risk-list.json
- Location advisories map - widget-location-advisories-map-v4.json
Detail page widgets
- Severe weather event map - widget-detail-severe-weather-map.json
- Severe weather event data table - widget-detail-location-advisories.json
- Location detail data table - widget-detail-location-advisories.json
View all widgets
- All active risk events - widget-severe-weather-view-all.json
- Location advisories - widget-location-risk-view-all.json
- Inventory at risk - widget-inventory-risk-view-all.json
POST https://api.ibm.com/supplychainui/run/na/api/v1/wms/layout_templates
View all pages
- Active severe weather view-all page - page-severe-weather-view-all.json
- Location advisories view-all page - page-location-risk-view-all.json
- Inventory at risk view-all page - page-inventory-risk-view-all.json
Detail pages
- Severe weather detail page - page-detail-severe-weather.json
- Location detail page - page-detail-location-advisories.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>"
}
Location advisories - dashboard-location-advisories-v2.json
Step 7. Test on https://www.supply-chain.ibm.com/
