AI Cost-to-Serve Analysis: Finding Unprofitable Customers, Orders and Channels

Turn this article into takeaways for your work.

Each assistant summarizes the article only for you and suggests best practices for your work.

AI cost-to-serve analysis is the use of machine learning and language models to trace the handling, delivery, service and administrative costs of each customer, order and channel, so you can see what each one really earns after the work it causes. Gross margin tells you what a product earned. Cost to serve tells you what it took to get that product to that buyer, and for a surprising number of accounts the second number erases the first.

This piece is for operations leaders, finance partners and commercial managers who suspect that some of their revenue isn't worth what it costs to deliver. It covers the accounting ideas behind the method, what AI changes, a worked example, a step-by-step rollout, and the actions that usually follow. It sits inside the AI for Operations collection, next to AI-assisted decisions in operations and getting operational data ready for AI.

Key Facts

  • Activity-based costing assigns overhead to products and customers by the activities they cause rather than by a flat percentage. Time-driven ABC, introduced by Robert Kaplan and Steven Anderson in Harvard Business Review in November 2004, relies on "informed managerial estimates rather than on employee surveys" (HBR abstract).
  • The same abstract notes that many managers abandoned large-scale ABC implementations, which is the problem AI-assisted cost allocation tries to fix.
  • The "whale curve" ranks customers from most to least profitable and plots cumulative profit. Because the unprofitable tail subtracts from what the top customers earn, the curve usually peaks well above the company's final profit before falling back to it.
  • Management accountant Gary Cokins writes that managers usually expect the curve to be fairly flat, and that activity-based information "usually shocks" them the first time they see it (Strategic Finance, February 2015).
  • The common thread: cost to serve is a mapping problem. AI helps most where the data is messy and the drivers are many, and it only pays off if someone acts on what it finds.

What Cost to Serve Means

Cost to serve is every cost beyond the product itself that a customer, order or channel triggers. That includes picking and packing, freight and delivery, returns, customer service contacts, credit and collections, order changes, special packaging, sales calls and the time your people spend on exceptions.

Traditional accounting hides most of it. Product costing methods spread overhead across everything using a blunt driver such as revenue or direct labor hours, so a customer who orders 300 times a year in single cartons and a customer who orders twelve full pallets look alike below the gross margin line. The pieces on overhead cost allocation and product costing methods cover why flat allocation distorts decisions. Cost to serve extends the same logic from products to the commercial side: who buys, how, and how often.

How Activity-Based Costing Got Here

Robert Kaplan and Robin Cooper developed activity-based costing (ABC) to answer exactly this problem. The idea is simple. Resources such as people, trucks and warehouse space are consumed by activities, and activities are consumed by products, customers and channels. Trace the chain and each customer gets a cost that reflects the work it causes.

The practice was harder than the theory. The 2004 HBR article that introduced time-driven ABC opens by saying that ABC looks like a great way to manage limited resources in the classroom, but many managers have abandoned large-scale implementations (HBR abstract). Anyone who has sat through an ABC project knows why: surveys of how people spend their time, and models that go stale.

Kaplan and Anderson's answer was to replace surveys with managerial estimates of time. The method has two ingredients. First, a capacity cost rate: what one minute of a resource costs, found by dividing the cost of a team or machine by the minutes it can realistically supply. Second, a time equation for each activity: a base time plus extra minutes for each complication. An order might take a base of a few minutes, plus time per line, plus extra time if it's expedited or needs a split delivery. Multiply the minutes by the rate and every order gets a cost. The model is easy to update because you change an equation, not a survey.

What AI Adds

Time-driven ABC fixed the maintenance burden. It left a different gap: someone still has to decide the drivers, estimate the minutes and keep them current. AI helps in four places.

  • Discovering drivers. Instead of guessing what makes an order expensive, a model can test candidates against actual effort data (timestamps, ticket handling times, warehouse scan intervals) and show which attributes matter: line count, order size, channel, destination, expedite flag, number of order changes.
  • Reading unstructured work. Returns notes, service tickets, emails and delivery exceptions carry cost information that never reaches a ledger. Language models can classify them by cause and effort so service cost lands on the right customer.
  • Filling gaps. Some activities aren't timestamped. A model can estimate effort from related signals, with a person confirming a sample.
  • Keeping it current and flagging change. An anomaly model can watch cost per order by customer and warn when an account's cost to serve jumps, for example after a service promise is changed or a carrier raises rates.

In ACE Framework terms this is Ingest (pull orders, shipments, tickets), Analyze (classify and attribute), Predict (estimate effort and future cost) and Generate (draft the account review and the options). Execute stays with people. Changing a price or a delivery policy affects a customer relationship, and that call belongs to a named owner.

A Worked Example (Illustrative)

The numbers below are invented to show the arithmetic. They aren't from a real company.

Imagine a regional distributor with a 25% gross margin. Warehouse and customer service teams cost the business $1.20 per minute of working time, loaded. The time equation for one order is: 5 minutes base, plus 2 minutes per order line, plus 8 minutes if expedited, plus 10 minutes if delivery is split.

Order Lines Extras Minutes Handling cost Gross margin on order
Full-pallet monthly replenishment 4 None 13 $15.60 $1,400
Mid-size weekly order 8 None 21 $25.20 $300
Small urgent order 1 Expedited, split delivery 25 $30.00 $45

Handling cost alone looks modest. Add delivery and the picture shifts. Say the small urgent order also incurs $38 of freight that the customer isn't charged for. Its margin of $45 minus $30 handling minus $38 freight is a loss of $23, before a single service call. A customer who places 250 such orders a year is losing about $5,750 on those orders alone, while the pallet customer earns well over 98% of its margin after handling.

Roll the same logic up by customer and you get the whale curve. Here is what a customer-level view might look like in the same illustrative distributor:

Customer type Annual gross margin Annual cost to serve Profit after cost to serve
A: large, scheduled pallets $300,000 $60,000 $240,000
B: mid-size, regular orders $150,000 $110,000 $40,000
C: small, frequent, urgent $37,500 $62,500 -$25,000

All three look like healthy accounts on a gross margin report. Only the cost-to-serve view shows that C is losing money and that B is barely worth the effort it takes.

The Whale Curve: Seeing the Whole Customer Base

The whale curve is the picture that makes this analysis land in a leadership meeting. Rank every customer from most to least profitable after cost to serve, then plot cumulative profit. Cokins describes the line as the cumulative buildup of each customer's profit, with the last data point reconciling to the company's total profit and loss statement. He says the shape is typical for most companies: a substantial share of profit from a minority of customers, rough break-even on some, and losses on the rest (Strategic Finance, February 2015).

The curve usually climbs above 100 percent of total profit before it falls. That sounds odd until you see the logic: the unprofitable tail subtracts from what the top earns, so the peak of the curve sits above the company's final profit. The gap between the peak and the end point is the profit hidden by averaging.

How high the peak goes varies by company and industry, so don't borrow someone else's numbers. Draw the curve with your own costs.

Reading Cost to Serve by Order, Channel and Customer

The same model slices three ways, and each slice points to different decisions.

By order. This reveals the effect of order size and complexity. Small orders, rush orders, split shipments and many-line orders carry more activity per dollar. The table of drivers below shows where the effort typically sits.

Cost pool Typical driver What AI helps find
Order entry and changes Lines per order, number of amendments Which accounts change orders most
Picking and packing Lines, units, special packaging Cost jump on small or custom orders
Delivery Drop size, distance, delivery windows, frequency Routes that cost more than the order earns
Returns and claims Return rate, inspection effort Customers or SKUs with chronic returns
Service contacts Tickets, calls, handling time Accounts that generate a disproportionate contact load
Credit and collections Days late, disputes Accounts that tie up working capital

By channel. Marketplace, direct web, wholesale, field sales and partners each have a different cost to serve. A channel with a strong sales number can still produce the weakest margin once fees, returns and fulfillment are loaded. The fulfillment strategy piece explains how fulfillment choices drive those costs.

By customer. Customers can look similar in revenue and differ wildly in effort. This is the whale curve view. Often the problem is a few repeatable behaviors (late changes, tiny drops, urgent requests), not the customer as a whole.

From Insight to Action

Analysis that doesn't change a policy is a report. The usual moves, from least to most disruptive:

  1. Make the cost visible to sales. Put cost to serve beside margin in account reviews and quote tools, so reps see what a concession costs.
  2. Minimum order sizes or order-handling fees. If small orders lose money, a threshold or a fee for orders below it corrects the economics without changing the relationship.
  3. Delivery frequency and windows. Consolidate to fewer, fuller drops. Offer standard delivery as the default and charge for expedite and split shipments.
  4. Service tiers. Define what each tier gets (response times, dedicated contacts, special packaging) and price the tiers to match the effort.
  5. Channel shifts. Move low-volume customers to a lower-cost channel such as self-service ordering or a distributor, and keep the personal channel for accounts that justify it.
  6. Reprice or exit. For accounts that can't be fixed, a price increase is a legitimate test. Exiting should be a last resort and a deliberate one.

Cokins makes the point that the benefit comes from using the information to move customers toward higher profitability, not from calculating it (Strategic Finance, February 2015). Think of it as migrating accounts to the left side of the curve, not firing the right-hand ones.

How to Implement AI Cost-to-Serve Analysis, Step by Step

  1. Pick the scope and the question. Start with one business unit, region or product family and one question, such as "which accounts lose money after delivery and service?" A narrow start produces trust quickly.
  2. Map the activities. List the steps between order and cash: entry, picking, packing, shipping, returns, service, billing, collections. Interview the people who do the work, not just the managers. Keep the list short, usually under fifteen.
  3. Assign resource costs. Find the cost of each team, site and vehicle, and the minutes it realistically supplies. This gives you the capacity cost rates. The manufacturing cost analysis piece covers the cost side in more depth.
  4. Collect the transaction data. Orders, lines, shipments, drop sizes, returns, tickets, amendments and payment dates, tied to a common customer ID. Most delays here come from IDs that don't match across systems, which is why the data groundwork matters.
  5. Let the model propose drivers, then validate with the floor. Use AI to test which attributes explain effort, then show the time equations to supervisors. If they say "that's not how it works", believe them and adjust.
  6. Build the customer and order view. Calculate cost to serve for every order, roll it up to customers and channels, and draw the whale curve. Reconcile the total to the general ledger. If it doesn't tie, find out why before sharing it.
  7. Review exceptions and the top and bottom of the list by hand. A person should read the twenty most and least profitable accounts and confirm the story makes sense before any action.
  8. Test one policy change. Pick a single lever, such as a small-order fee for one segment, and run it for a defined period against a comparison group.
  9. Refresh on a schedule. Re-run monthly or quarterly and flag accounts whose cost to serve moves sharply.

Pitfalls to Avoid

Allocating what isn't variable. If you spread fixed overhead as though it disappears when you lose a customer, you'll overstate the savings from exits. Separate costs that move with activity from costs that don't, and be honest about unused capacity. Cutting an account only saves money if you also cut the capacity it used or fill it with better work.

Judging on one year, or ignoring strategy. A new or growing account can look unprofitable now, and some customers bring a reference or a market entry. Weigh trend and strategic value outside the arithmetic.

Trusting the model's drivers blindly. A model can find a correlation that isn't causal, such as a region that looks costly only because it carries more urgent orders. Validate drivers with the people doing the work.

Poor customer or SKU identifiers. Duplicate accounts and inconsistent codes split one customer into several and hide the pattern. Fix the master data first.

Cost to serve as a weapon. Handing sales a list of "bad" customers invites defensiveness. Present it as a way to price complexity fairly, and involve commercial leaders in the design.

Over-engineering. A model that needs ninety drivers won't survive staff turnover. Start with five or six that explain most of the effort.

What to Measure

  • Distribution: profit after cost to serve by customer decile, and the size of the unprofitable tail.
  • Unit economics: cost per order, per line and per drop by segment.
  • Policy results: change in average order size, expedite share and return rate after each action, plus retention and complaints for affected accounts.
  • Model trust: share of drivers confirmed by operations staff.

Where to Go Next

Cost to serve gets sharper when it feeds the plan. Delivery costs and service levels connect directly to inventory and routing, which AI in supply chain management covers, and to the monthly planning cycle described in AI in sales and operations planning. If you do one thing this quarter, calculate cost to serve for a single product family, draw the whale curve, and read the bottom twenty accounts with the people who serve them.

About the author

Tara Minh

Tara Minh

Senior Operations & Growth Strategist

Tara Minh is Senior Operations & Growth Strategist at Rework, helping B2B SaaS leaders scale without breaking their teams. Tara turns messy workflows into systems people actually follow. Readers get practical frameworks they can use to cut waste, align teams, and grow on purpose.