Loading...

Rank Top Customers by Revenue

When a constrained-supply week or quarterly planning review hits, the VP Supply Chain typically has to ask for or assemble a ranked customer revenue list for the relevant time window before any allocation discussion can start. In this workflow, that means pulling revenue totals from the sales warehouse table `sales_dw.fact_sales`, filtering by dates such as 2025-10-01 through 2025-12-31, grouping by customer, and manually ordering the results into a top-10 list for dashboard or KPI-pack use. Even for a simple query, this is repeat analysis work that recurs across executive reviews and supply allocation meetings; it is execution-layer data assembly that keeps the manager in spreadsheet and query prep work instead of decision-making.

Last Quarter Customer Concentration is a Decision Intelligence workflow designed for the VP Supply Chain. It automates the execution layer of the task—date-bounded querying, revenue aggregation, ranked list generation, and output formatting—which the candidate estimates as about 40% of the total cognitive labor, with 60% automation coverage of that layer. The result is that the VP gets back time for judgment: interpreting concentration risk, aligning with Sales, and making service-level trade-offs under constrained supply.

Interactive Demo

See the Decision Intelligence Workflow in Action

This workflow handles a narrow but recurring cognitive task: converting raw sales transactions into a ranked customer revenue view for a defined period. The business need is simple, but the operational burden is still real because the output has to be current, consistent, and ready to use in allocation and service-level conversations.

👤
Designed for line-of-business leaders — specifically the VP Supply Chain — who need a fast, defensible customer concentration view before making allocation and service-priority calls. The workflow handles the repeatable retrieval and ranking work so leadership time stays focused on operating decisions. Why this matters: What line-of-business leaders actually need from Decision Intelligence →
Decision Intelligence Playground · Top Customer Revenue Ranking
KWF Runtime
Start with an example
See this workflow in your own supply chain environment.
In a working session, we'll map this workflow to your sales warehouse tables, reporting cadence, and allocation decision process. We'll show you this workflow running on your AWS environment with your date ranges, customer hierarchies, and dashboard outputs so your team can evaluate fit using real operating questions.
Schedule an AWS Session
How It Works

What the Decision Intelligence Workflow Does

This workflow handles a narrow but recurring cognitive task: converting raw sales transactions into a ranked customer revenue view for a defined period. The business need is simple, but the operational burden is still real because the output has to be current, consistent, and ready to use in allocation and service-level conversations.

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
Rank Customers
Aggregates revenue by customer for the selected date range and returns the top 10 customers in descending order.
↑ click a step to explore the logic, query, and output
1
Step Detail

                      

                    

The workflow produces a top-10 customer-by-revenue list for the selected time window. That output is suitable for an executive dashboard module and for direct inclusion in a quarterly KPI pack snapshot.

What this workflow does NOT do: It does not decide which customers should receive scarce inventory first, decide whether a concentration pattern is severe enough to trigger contingency actions, decide whether to revise service-tier commitments with Sales, decide whether to escalate retailer penalty exposure, or decide whether to invest in backup suppliers, safety stock, or network changes.
Under the Hood

Data Warehouse Integration

The workflow reads directly from the enterprise sales warehouse and returns a consistent ranked revenue view for a specified date range. That makes the result easy to reuse in executive dashboards, quarterly KPI packs, and constrained-supply planning discussions without waiting for a custom analyst pull.

In practice, the output becomes a cross-functional reference point between Supply Chain and Sales because the same customer revenue ranking informs allocation rules, service commitments, and contingency planning.

Source system: Sales data warehouse  ·  Domain: Sales and Supply Chain
Role in this workflow: This table provides the transaction-level sales history used to calculate customer revenue for a specified time window. In this workflow, it is the sole source for assembling the ranked customer list that supply chain leadership uses as a precursor to allocation, service-level, and concentration-risk discussions.
CREATE TABLE pura_vida_foods_dev.sales_dw.fact_sales (
  sale_id VARCHAR NOT NULL,
  sale_date DATE NOT NULL,
  customer_id VARCHAR NOT NULL,
  product_id VARCHAR NOT NULL,
  order_id VARCHAR NOT NULL,
  quantity DECIMAL(10,2) NOT NULL,
  unit_price DECIMAL(10,2) NOT NULL,
  unit_cost DECIMAL(10,2) NOT NULL,
  revenue DECIMAL(15,2) NOT NULL,
  cost DECIMAL(15,2) NOT NULL,
  profit DECIMAL(15,2) NOT NULL,
  profit_margin DECIMAL(8,4),
  discount_amount DECIMAL(10,2),
  discount_percent DECIMAL(5,2),
  sales_channel VARCHAR,
  order_priority VARCHAR,
  shipping_cost DECIMAL(10,2),
  created_at TIMESTAMP,
  updated_at TIMESTAMP
);

SELECT
  customer_id,
  ROUND(SUM(revenue), 2) AS total_revenue
FROM pura_vida_foods_dev.sales_dw.fact_sales
WHERE sale_date BETWEEN string">'{start_date}' AND string">'{end_date}'
GROUP BY customer_id
ORDER BY total_revenue DESC
LIMIT 10;
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 40% Judgment 40% Strategic 20%
Execution Layer
40%
The execution layer retrieves sales records for the requested dates, sums revenue by customer, ranks the results, and formats the top-customer list for reporting use.
Judgment Layer
40%
The VP Supply Chain still interprets whether the concentration pattern changes service priorities, risk posture, or account coverage in the current operating context.
Strategic Layer
20%
Leadership still owns structural decisions such as changing service-tier policy, approving contingency investments, or revising network and capacity plans around key accounts.
Value Model

The Business Case for Automation

Time Recovered
Recurring executive prep work
This workflow removes the repeated query, aggregation, and ranking steps that otherwise have to be rebuilt for each quarter-end review or constrained-supply decision cycle.
Annual Savings
$194,000 net benefit
The candidate's conservative value model estimates $219,000 in gross value uplift and $194,000 in net benefit after automation cost.
Strategic Upside
Better allocation decisions
The strategic upside is faster, more defensible prioritization of high-revenue customers when inventory is constrained and service-level trade-offs have financial consequences.
Kill Question: Without this workflow, the VP Supply Chain falls back on ad-hoc analyst pulls, stale dashboard snapshots, or intuition about major accounts, which slows allocation decisions and increases the chance that high-revenue customers are under-served during constrained-supply periods.

Primary Valuation Metric: Number of constrained-supply decisions per quarter where the top-customer revenue list is referenced directly in meeting notes or BI audit logs.