Custom cost-to-serve analytics development
Your revenue report shows who your biggest customers are, not what it costs to serve them. Cost-to-serve analytics allocates transport, order processing, warehouse handling, returns and service traffic to the customer, order and channel that cause them. Appfront builds this as software when the outcome needs to be repeatable and feed structurally into commercial decisions. Below, you will also find out when a spreadsheet is enough.
Your biggest customer by revenue is rarely your best customer by margin
Cost-to-serve is everything that happens after gross margin: processing order lines, picking, driving, receiving returns, handling complaints, plus the discounts and rebates from the annual agreement. In 2001, Robert Kaplan and V.G. Narayanan described the whale curve: the most profitable twenty per cent of customers account for one hundred and fifty to three hundred per cent of total profit, after which the tail gives it back again. In that tail, you will often find a name from the top of your revenue list.
This pattern emerges where small rush orders, high return rates, negotiated delivery terms and heavy service traffic come together: wholesale, foodservice, e-commerce with large return flows, and manufacturers with customer-specific delivery agreements. Revenue reporting shows none of it: these costs sit on ledger lines without a customer name.
Are you on the right page? Cost-to-serve looks back and explains what a customer has actually cost. If you want to look ahead, with demand forecasting or a revenue forecast, that belongs in a predictive analytics dashboard. If the question is which stops go on which route tomorrow, that is a transport planning API.
Allocation per activity
Cost pools with one driver per pool: pick lines, cartons, stops, route minutes, customer contacts. The allocation key is visible in the application, not hidden in a formula.
Net margin per customer and channel
From gross margin to net margin per debtor, delivery address, order line and channel, with drill-down to the underlying order lines.
Scenarios with a behavioural assumption
Calculate what a higher free-delivery order threshold, fixed delivery days or a rush surcharge would do, with an explicit assumption about how the customer will respond.
Where margin disappears in practice
The costs leaking away here are small per item, they recur, and they sit on a cost centre that has no customer name. Four patterns almost always appear.
The rush order that comes back four times a week
One customer doesn't order a full pallet a week, but half a roll container four times, usually just after the cut-off. Every order costs a pick run, an extra stop, a delivery note and an invoice line. Below the free-delivery order threshold, you also bear the freight.
Returns that aren't attached to any order line
For distance selling, a fourteen-day cooling-off period applies (Article 6:230o of the Dutch Civil Code); in B2B, a return usually runs through a separate credit note. Receiving, inspecting, repackaging and write-downs land in overheads as warehouse costs, never with the customer who causes them.
Delivery terms negotiated per contract
Delivery in a fixed time window, inbound via a distribution centre's booking portal, a prescribed carrier, or exports where you deliver DDP under Incoterms 2020 while EXW applies elsewhere. Those agreements are in the contract, not in the cost price.
Service traffic without a cost centre
Orders that arrive by email and are keyed in manually instead of via EDI, changes after the cut-off, discussions about delivery notes, repeated questions about delivery status. Those minutes belong to a customer name, but they sit in a payroll line spread across total revenue.
Since 1 July 2026, heavy road transport in the Netherlands also pays per kilometre driven through the heavy goods vehicle charge, with a rate that varies by weight and emission class. Panteia points out that the effect differs per trip and per customer, so a single average trip-cost rate across all shipments no longer suffices.
The allocation key determines the outcome, not the dashboard
Direct costs are the easy part: a consignment note is attached to a shipment, a pick line to an order line. The work lies in the costs that aren't tied to any single order: warehouse rent, planning, order desk, customer service, quality control. You allocate those with a key, and that choice determines who comes out badly. Allocating per carton penalises volume, per order line penalises assortment breadth, and per pick minute requires measurement data that many WMS implementations rarely expose.
Activity-based costing is therefore not an objective measurement but a model built on assumptions. The underlying principle is causality: a cost belongs where the activity that causes it takes place, and where that link cannot be demonstrated you make a reasoned analogy, as the IMA's Conceptual Framework for Managerial Costing sets out for both principles. Kaplan and Anderson introduced time-driven activity-based costing in 2004 precisely because the classic variant got bogged down in endless interviews about time spent. What remains is a choice, and it should be open to discussion.
In practice, that means three things. Record for each cost pool which driver was used, who set it and when it was last recalibrated. Show for every amount which allocation key was applied, with a drill-down to the order lines. And build a sensitivity analysis. Without one, whoever sees their biggest customer turn red will attack the allocation key, and they will win the argument.
Bringing the data together is usually the project
The calculation itself is the smallest problem. The data sits in four or five systems, at different levels of granularity, with keys that do not match.
Order lines from the ERP
Item, quantity, selling price and standard cost price per order line. Watch out for customer identity: account number, delivery address and purchasing group are three different things.
Carrier invoices and TMS
The actual rate is on the carrier invoice, including surcharges per shipment. Large carriers supply EDI messages such as IFTMIN, IFTSTA and INVOIC; smaller ones send a PDF.
Warehouse activity from the WMS
Pick lines, parcels and, where available, picking and packing times. If this source is missing, warehouse costs stay a fixed amount per order and the very distinctions you are looking for disappear.
Returns and credit notes
Usually the weakest source. The records are missing or do not refer back to the original order line, so returns handling and write-downs cannot be traced to a customer.
In addition, tickets and the order entry channel (EDI, web shop, email) provide the driver for the sales support team, and volume discounts and annual bonuses are usually in contracts with no link to the customer record. Linking it all up is the hardest part: a single trip contains orders from several customers, so trip costs are first spread over stops and then over shipments. State explicitly which part of the costs can be demonstrably tied to an order and which part runs through an allocation key.
Test your idea first: a working prototype in 1 day
With OneDayBuild, we make your idea tangible in a single day for €1,150, so you know whether further development is worth the investment. Decide to go ahead with the full build? Then we deduct the cost in full.
View OneDayBuild →An outcome that leads to a conversation, not a report
An analysis is only worth something if a decision follows from it, and those decisions come from a limited number of levers: the free-delivery order threshold, a minimum order size, fixed delivery days per region, a rush-order or small-order surcharge, adjusted delivery terms in the annual agreement, and, in the extreme case, deliberately parting ways with a customer or delivery condition.
Scenario functionality is therefore core to the application, and every scenario contains an assumption about behaviour. A customer you push towards one delivery slot per week might double their order size or move volume to a competitor. So show the volume risk too, with an assumption the account manager can adjust.
Finally, plan the decision point as part of the design. Outcomes that are discussed at the annual agreement, the price review or the customer review lead to action; a standalone quarterly report does not.
Sources and integrations we connect:
When you are better off not building this as software
A first cost-to-serve analysis is a one-off exercise, and it belongs in a spreadsheet or an advisory engagement. You need a representative period of order lines, an export from your transport system and a set of assumptions. That quickly shows whether your data is sufficient. If it turns out that a large share of freight costs cannot be linked to an order, that is your first project, not an application.
For some readers, off-the-shelf software is the right answer. If your organisation runs on SAP S/4HANA, margin analysis, the account-based successor to CO-PA, is already there and reconciled with the financial accounts via the universal journal. With Profitability and Cost Management Cloud, Oracle offers an allocation engine for multi-step allocation keys; Anaplan, Board and Jedox do the same. A second model alongside it gives you two versions of the truth about the same margin.
Custom software is defensible when the bulk of your costs sits outside the ERP, in the TMS, WMS, carrier invoices and ticketing systems, and the package cannot ingest those sources at order-line level. It is also defensible when allocation keys differ by channel or customer group, or when the standard configuration forces you to translate your operation into the vendor's model.
With custom software, expect a burden that falls on you: recalibrating allocation keys whenever the operation changes, version control so that an earlier result stays reproducible, and someone who can explain the assumptions when the controller asks.
- Allocation keys differ by channel, region or customer group
- Scenarios depend on the quote, the annual agreement or the webshop threshold
- The output is used structurally in commercial decision-making
- Someone owns the model and defends the assumptions
Frequently asked questions about cost-to-serve analytics
The questions controllers, supply chain managers and commercial directors ask us most often.
Often that is the right choice. If you run on SAP S/4HANA, margin analysis, the account-based successor to CO-PA, is already there and reconciled with the financial accounts. Oracle Profitability and Cost Management Cloud and EPM platforms such as Anaplan, Board and Jedox offer a ready-made allocation engine. Custom software only becomes defensible when most of your costs arise outside the ERP.
By agreeing the key in advance with controlling and operations together, and making it visible in the application. Every allocated amount should show which driver was used, who set it and when it was last recalibrated. A sensitivity analysis shows how much of the outcome depends on that choice.
That is the normal starting point and usually the hardest part of the work. Freight costs are on the carrier invoice and first have to be spread across trips and stops. Returns often run as a separate credit note with no reference to the order line. The first step is to establish which share of the costs can demonstrably be tied to an order.
For an initial exploration, almost always. A representative period of order lines, an export from the transport system and a set of assumptions will give you conclusions faster than any build. Software only becomes defensible when the output must be repeatable and up to date, and is used structurally in commercial decisions.
Put ownership, source code and handover in writing in the contract, and keep the model readable: every cost pool, driver and assumption documented, version control so that an earlier result stays reproducible, and calculations that can be traced without the original builder. A model that nobody can explain stops being used.
No. A profitability report follows the general ledger structure and usually stops at gross margin per product group or debtor. Cost-to-serve follows the activities: how many pick lines, stops, route minutes, return receipts and customer contacts a customer has caused. At total level, the two should reconcile.
Related services
Predictive analytics dashboard
Cost-to-serve explains what has happened. If you want to look ahead, with demand forecasting, churn risk or a revenue forecast per segment, that calls for a predictive model built on the same order and customer data.
Transport planning API
The route costs you allocate arise in planning. A planning API determines which stops go on which route and supplies the route, stop and rate data your allocation needs.
Want to know what your customers really cost you?
Tell us which systems record your orders, routes, warehouse activities and returns, and where the margin conversation currently breaks down. We first check whether your data allows a reliable allocation, and we will tell you if an analysis outside software would help you faster.