Benchmark Store OSA Declines
In weekly district scorecard reviews, the district manager has to determine whether a store's sales risk comes from a local availability problem or a district-wide drift. This workflow assembles the store's current and prior OSA comparison against the district median and produces a variance table with a one-sentence direction of change.
The manager still decides whether the issue needs store coaching, merchandising support, or broader escalation; the workflow removes the data gathering, comparison, and formatting work. The estimated impact is a 30.0% shift in role time from execution-layer work to higher-value decision making.
See the Decision Intelligence Workflow in Action
This workflow handles a recurring comparative analysis task inside weekly store review: calculate a focal store's on-shelf availability for the current period, calculate the prior equal-length period, benchmark both against the district median store, and present the variance in a format that can be used in scorecards and store action plans. The execution work is mechanical but time-consuming because it requires consistent period logic, peer-set benchmarking, threshold evaluation, and presentation-ready output.
What the Decision Intelligence Workflow Does
This workflow handles a recurring comparative analysis task inside weekly store review: calculate a focal store's on-shelf availability for the current period, calculate the prior equal-length period, benchmark both against the district median store, and present the variance in a format that can be used in scorecards and store action plans. The execution work is mechanical but time-consuming because it requires consistent period logic, peer-set benchmarking, threshold evaluation, and presentation-ready output.
Click any step below to see the business logic, data query, and sample output for that step of the workflow.
The workflow produces a variance table showing OSA% by period, change versus prior period in percentage points, district median OSA%, and variance versus the district median. It also produces a short direction statement such as whether the store is deteriorating, below district baseline, or both.
Data Warehouse Integration
The workflow reads directly from the store daily availability rollup and applies a repeatable comparison logic to the focal store and its district peer set. That removes the manual export-and-reconcile cycle that often delays weekly review meetings and creates inconsistent baselines from one store discussion to the next.
Although the calculation uses one analytical source here, the business question is cross-functional because the result is used by store operations, merchandising, and inventory teams to determine whether to pursue local remediation or district-level escalation.
CREATE TABLE pura_vida_foods_dev.inventory_mart.mart_store_daily_availability (
store_id STRING,
region_id STRING,
business_date DATE,
osa_numerator_in_stock INT,
osa_denominator_assortment INT,
shelf_oos_events INT
);
WITH store_period AS (
SELECT
store_id,
region_id,
period_label,
CASE
WHEN SUM(osa_denominator_assortment)=0 THEN NULL
ELSE SUM(osa_numerator_in_stock)*1.0/SUM(osa_denominator_assortment)
END AS osa_rate
FROM (
SELECT
store_id,
region_id,
business_date,
osa_numerator_in_stock,
osa_denominator_assortment,
CASE
WHEN business_date BETWEEN string">'{start_date}' AND string">'{end_date}' THEN string">'current'
WHEN business_date BETWEEN date_add(string">'{start_date}', -datediff(string">'{end_date}',string">'{start_date}')-1)
AND date_add(string">'{end_date}', -datediff(string">'{end_date}',string">'{start_date}')-1)
THEN string">'prior'
ELSE NULL
END AS period_label
FROM pura_vida_foods_dev.inventory_mart.mart_store_daily_availability
WHERE region_id = string">'{region_id}'
AND (
business_date BETWEEN string">'{start_date}' AND string">'{end_date}'
OR business_date BETWEEN date_add(string">'{start_date}', -datediff(string">'{end_date}',string">'{start_date}')-1)
AND date_add(string">'{end_date}', -datediff(string">'{end_date}',string">'{start_date}')-1)
)
) d
WHERE period_label IS NOT NULL
GROUP BY store_id, region_id, period_label
),
median_period AS (
SELECT
region_id,
period_label,
median(osa_rate) AS district_median_osa
FROM store_period
GROUP BY region_id, period_label
),
focus AS (
SELECT * FROM store_period WHERE store_id = string">'{store_id}'
)
SELECT
f.store_id,
f.region_id,
f.period_label,
f.osa_rate,
m.district_median_osa,
(f.osa_rate - m.district_median_osa) AS delta_vs_median
FROM focus f
JOIN median_period m
ON f.region_id = m.region_id AND f.period_label = m.period_label
ORDER BY f.period_label;
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: Reduction in time-to-decision for inventory escalation
Next Step
Run your own value estimate for district store review work — or talk to us about your in-store operations team.
The Cognitive Labor Value Calculator models team size, role cost, and automation coverage so you can estimate the operational value of removing repetitive analysis work. It takes under two minutes to complete.