Rank Stockout Drivers Fast
When demand volatility and DC constraints hit at the same time, supply chain teams often lose critical hours assembling the analysis needed to act. This decision intelligence workflow automates the stockout attribution and reroute brief by integrating weather, demand elasticity, inventory, margin, and inbound logistics signals into a decision-ready output.
The value is not replacing operator judgment; it is removing the manual analytical burden that slows intervention. The estimated impact is a 32.5% shift in role time from execution-layer work to higher-value decision making.
See the Decision Intelligence Workflow in Action
This workflow handles a compound disruption-analysis task: estimate weather-driven demand uplift, project stockout timing under constrained DC operations, and identify which inbound loads materially prevent the shortfall. It then converts those signals into an ops-ready explanation that ranks the causes and points to the few shipment actions that matter first.
What the Decision Intelligence Workflow Does
This workflow handles a compound disruption-analysis task: estimate weather-driven demand uplift, project stockout timing under constrained DC operations, and identify which inbound loads materially prevent the shortfall. It then converts those signals into an ops-ready explanation that ranks the causes and points to the few shipment actions that matter first.
Click any step below to see the business logic, data query, and sample output for that step of the workflow.
The output is a briefing artifact with a DC risk list, ranked drivers with evidence, and a shipment action table showing reroute or expedite recommendations by shipment ID. It can also be distributed as an email or Slack-style action brief for DC Ops and Transportation.
Data Warehouse Integration
The workflow depends on warehouse-native integration because the analysis spans operational, planning, and external data in one pass. It has to combine forecast temperature changes, demand elasticity, inventory and margin snapshots, and live inbound shipment telemetry quickly enough to support a weekend command-center briefing.
That cross-domain join is the core execution burden: weather feeds, elasticity tables, WMS or ERP inventory marts, and TMS telematics must be reconciled at the DC and SKU-group level before any manager can make a defensible reroute call.
CREATE TABLE pura_vida_foods_dev.supply_chain_ops.ext_weather_forecast_hourly (
dc_id STRING,
forecast_ts TIMESTAMP,
temp_f DOUBLE,
feels_like_f DOUBLE,
precip_prob DOUBLE,
source STRING,
ingested_at TIMESTAMP
);
WITH dc_list AS (
SELECT CASE
WHEN string">'{dc_scope}' = string">'strikebound_only' THEN string">'DC_CHI1'
ELSE string">'{dc_scope}'
END AS dc_id
UNION ALL
SELECT CASE
WHEN string">'{dc_scope}' = string">'strikebound_only' THEN string">'DC_ATL2'
ELSE NULL
END AS dc_id
),
weather AS (
SELECT w.dc_id,
avg(w.temp_f) AS avg_temp_f
FROM pura_vida_foods_dev.supply_chain_ops.ext_weather_forecast_hourly w
JOIN dc_list d
ON d.dc_id = w.dc_id
WHERE d.dc_id IS NOT NULL
AND w.forecast_ts >= CAST(string">'{start_date}' AS TIMESTAMP)
AND w.forecast_ts < CAST(string">'{end_date}' AS TIMESTAMP)
GROUP BY w.dc_id
)
SELECT dc_id, avg_temp_f
FROM weather
ORDER BY dc_id;
CREATE TABLE pura_vida_foods_dev.supply_chain_ops.mart_demand_elasticity_weather (
dc_id STRING,
sku_group STRING,
temp_feature STRING,
elasticity_pct_per_1f DOUBLE,
model_window_days INT,
r2 DOUBLE,
last_trained_date DATE
);
WITH elastic AS (
SELECT dc_id, sku_group, elasticity_pct_per_1f, r2
FROM pura_vida_foods_dev.supply_chain_ops.mart_demand_elasticity_weather
WHERE sku_group IN (string">'CHILLED_BEVERAGES',string">'CHILLED_DAIRY',string">'READY_TO_EAT')
),
dc_list AS (
SELECT CASE
WHEN string">'{dc_scope}' = string">'strikebound_only' THEN string">'DC_CHI1'
ELSE string">'{dc_scope}'
END AS dc_id
UNION ALL
SELECT CASE
WHEN string">'{dc_scope}' = string">'strikebound_only' THEN string">'DC_ATL2'
ELSE NULL
END AS dc_id
)
SELECT e.dc_id,
e.sku_group,
{temp_spike_f} AS temp_spike_f,
round(100 * ({temp_spike_f} * e.elasticity_pct_per_1f), 1) AS expected_demand_uplift_pct,
e.r2
FROM elastic e
JOIN dc_list d
ON d.dc_id = e.dc_id
WHERE d.dc_id IS NOT NULL
ORDER BY expected_demand_uplift_pct DESC;
CREATE TABLE pura_vida_foods_dev.supply_chain_ops.mart_inventory_position_daily (
dc_id STRING,
as_of_date DATE,
sku_group STRING,
on_hand_units BIGINT,
on_order_units BIGINT,
safety_stock_units BIGINT,
avg_daily_demand_units BIGINT,
gross_margin_per_unit DOUBLE
);
WITH dc_list AS (
SELECT CASE
WHEN string">'{dc_scope}' = string">'strikebound_only' THEN string">'DC_CHI1'
ELSE string">'{dc_scope}'
END AS dc_id
UNION ALL
SELECT CASE
WHEN string">'{dc_scope}' = string">'strikebound_only' THEN string">'DC_ATL2'
ELSE NULL
END AS dc_id
)
SELECT i.dc_id,
i.as_of_date,
i.sku_group,
i.on_hand_units,
i.on_order_units,
i.safety_stock_units,
i.avg_daily_demand_units,
i.gross_margin_per_unit
FROM pura_vida_foods_dev.supply_chain_ops.mart_inventory_position_daily i
JOIN dc_list d
ON d.dc_id = i.dc_id
WHERE d.dc_id IS NOT NULL
AND i.as_of_date = CAST(string">'{end_date}' AS DATE)
ORDER BY i.dc_id, i.sku_group;
CREATE TABLE pura_vida_foods_dev.supply_chain_ops.tms_telematics_inbound_shipments (
shipment_id STRING,
dc_id STRING,
sku_group STRING,
planned_arrival_ts TIMESTAMP,
current_eta_ts TIMESTAMP,
on_time_prob DOUBLE,
dwell_minutes_last_6h INT,
current_status STRING,
units BIGINT,
last_ping_ts TIMESTAMP
);
WITH dc_list AS (
SELECT CASE
WHEN string">'{dc_scope}' = string">'strikebound_only' THEN string">'DC_CHI1'
ELSE string">'{dc_scope}'
END AS dc_id
UNION ALL
SELECT CASE
WHEN string">'{dc_scope}' = string">'strikebound_only' THEN string">'DC_ATL2'
ELSE NULL
END AS dc_id
)
SELECT s.shipment_id,
s.dc_id,
s.sku_group,
s.planned_arrival_ts,
s.current_eta_ts,
s.on_time_prob,
s.dwell_minutes_last_6h,
s.current_status,
s.units,
s.last_ping_ts
FROM pura_vida_foods_dev.supply_chain_ops.tms_telematics_inbound_shipments s
JOIN dc_list d
ON d.dc_id = s.dc_id
WHERE d.dc_id IS NOT NULL
AND s.current_eta_ts >= CAST(string">'{start_date}' AS TIMESTAMP)
AND s.current_eta_ts < CAST(string">'{end_date}' AS TIMESTAMP)
ORDER BY s.dc_id, s.sku_group, s.current_eta_ts;
Where the Work Sits in the Labor Stack
Not all cognitive labor is equally automatable. The KWF analysis breaks the workflow into three layers — execution, judgment, and strategic — and maps each step to the layer it belongs to. Execution-layer work is automatable. Judgment and strategic work stays with the manager.
The Business Case for Automation
Primary Valuation Metric: Percent of disruption events where the brief results in a shipment-level action such as reroute, expedite, or substitution within 2 hours.
Next Step
Run your own value estimate for supply chain visibility operations — or talk to us about this stockout attribution workflow.
The Cognitive Labor Value Calculator models team size, fully loaded role cost, and automation coverage to estimate how much execution work can be shifted off your analysts and leads. It takes under two minutes to complete.