Loading...

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.

Interactive Demo

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.

👤
Designed for line-of-business leaders — specifically the Supply Chain Visibility/Analytics Lead who has to defend weekend disruption decisions across Ops, Transportation, and Commercial. The workflow handles the repeatable synthesis work so the lead can focus on shipment trade-offs, service risk, and margin exposure. Why this matters: What line-of-business leaders actually need from automation →
Decision Intelligence Playground · Chilled Stockout Reroute Brief
KWF Runtime
Start with an example
See how this disruption-briefing workflow would run in your environment.
In a working session, we map your weather, inventory, elasticity, and shipment telemetry sources to the workflow steps and show how the ranked-driver brief is assembled. We will also review the execution-versus-judgment boundary, the intervention rules, and the outputs your ops team would actually consume. If you use Databricks, we'll show you this workflow running on your Databricks environment.
Schedule a Databricks Session
How It Works

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.

Pre-specified logic, not runtime guessing — Most AI agent frameworks work by figuring things out on the fly. These Decision Intelligence workflows work differently. The Knowledge Work Foundry analyzes the cognitive labor pattern before deployment and encodes the decision logic directly into the configuration — which tables to query, which thresholds define a breach, how signals are ranked, and what the output artifact should contain. That analysis happens once. By the time the workflow runs, there is nothing left to figure out.
1
Demand Lift
Calculates weather-driven demand uplift for chilled SKU groups by distribution center over the disruption window.
2
Risk Match
Projects stockout risk and matches the inbound shipments most likely to prevent or worsen the shortfall.
3
Ops Brief
Builds the disruption brief with ranked drivers, evidence, and recommended reroute or expedite actions.
↑ click a step to explore the logic, query, and output
1
Step Detail

                      

                    

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.

What this workflow does NOT do: It does not decide whether to accept service-level degradation for a region, determine which customers or stores should be prioritized if supply remains short, approve incremental transportation spend beyond policy, set promotional suppression policy with Commercial, or escalate a labor-driven receiving issue into a broader network or contract review.
Under the Hood

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.

Source system: External weather forecast feed  ·  Domain: Weather and demand planning
Role in this workflow: This table provides the forecast temperature context for each distribution center during the disruption window. It supplies the operational trigger for the workflow by turning a weekend heat spike into a measurable demand shock input rather than relying on analyst intuition.
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;
Source system: Demand planning and analytics mart  ·  Domain: Commercial analytics
Role in this workflow: This table stores historical demand response to temperature changes by DC and chilled SKU group. It converts the weather event into an expected uplift percentage and includes model quality so the workflow can distinguish between strong and weak explanatory signals.
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;
Source system: Warehouse Management System and ERP mart  ·  Domain: Inventory operations
Role in this workflow: This table shows current on-hand units, safety stock, average daily demand, and gross margin for each DC and SKU group. It is the inventory baseline used to determine whether uplifted demand creates a real stockout risk and to quantify which shortages matter most financially.
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;
Source system: Transportation Management System and carrier telematics feed  ·  Domain: Transportation operations
Role in this workflow: This table adds shipment-level ETA confidence, dwell time, status, and unit volume for inbound loads. It is the operational bridge from forecasted risk to concrete intervention because it identifies which specific shipments could still prevent a stockout and which are too unreliable to trust.
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;
Cognitive Labor Analysis

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.

Execution 50% Judgment 35% Strategic 15%
Execution Layer
50%
The execution layer retrieves weather, elasticity, inventory, margin, and telematics data; calculates uplift and stockout risk; ranks contributing factors; and formats the resulting brief.
Judgment Layer
35%
Judgment remains with the lead to decide whether reroute, expedite, or substitution is operationally feasible and how to communicate the action plan across teams.
Strategic Layer
15%
Strategic decisions stay with leadership on service-level policy, transportation spend tolerance, commercial trade-offs, and structural network changes during repeated disruptions.
Value Model

The Business Case for Automation

Time Recovered
32.5% role time shifted
Based on the candidate model, automating 65% of a 50% execution-heavy workload returns meaningful disruption-response time to a 4-person control-tower team.
Annual Savings
$0.64M net benefit
The conservative team-level value model estimates about $0.69M in annual value uplift and $0.64M net benefit after $45,000 yearly automation cost.
Strategic Upside
Avoided Margin Loss
The strategic upside is earlier shipment intervention on high-margin chilled goods before a weather-and-labor disruption turns into preventable stockouts.
Kill Question: Without this workflow, the team still makes reroute and expedite decisions, but by manually stitching together weather, inventory, and ETA evidence under time pressure. That produces slower action, weaker causal explanations, more cross-functional challenge from Ops and Commercial, and a higher chance of acting on the wrong loads first.

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.