AI costing prompts  /  By task

The prompt for a cost-to-serve analysis with AI

Gross margin tells you what a customer buys. Cost-to-serve tells you what they actually cost you after the sale: the visits, the orders, the deliveries, the returns, the support. A customer with a healthy gross margin can still lose you money once you load all of that on. This prompt makes an AI assistant do the full calculation from your real figures, and stops it guessing the ones you do not give it.

In short

Give the assistant a customer's revenue, product cost, and the volume and rate of each service activity. It returns gross margin, the cost of each activity, the total cost-to-serve, and the real net profit and net margin, with every formula shown. The guardrail keeps it from inventing rates, which is the usual failure on this kind of task.

What the prompt is doing

Cost-to-serve applies activity-based logic below the gross-margin line. Instead of one average overhead rate, it counts the actual events a customer triggers, a sales visit, an order, a delivery, a return, an hour of support, and prices each at its own rate. The result is the true profit of that customer, which is often very different from what the gross margin suggests. It is the same logic as a TDABC model, pointed at a customer rather than a department. For the full method see our guide to cost-to-serve.

Copy this

The prompt

Replace the sample customer with your own. Keep the rules and the numbered steps.

You are a cost accountant specialising in cost-to-serve analysis using activity-based logic. Work only from the data I give you. Do not invent any numbers. Where a figure is missing, label it clearly as an assumption.

I want to know the true cost to serve one customer, beyond gross margin.

Data:
- Customer: Customer A
- Annual revenue from this customer: 240,000 EUR
- Product cost of goods sold: 168,000 EUR
- Cost-to-serve activities and our rates:
  - Sales visits: 18 per year at 220 EUR each
  - Order processing: 320 per year at 14 EUR each
  - Deliveries: 320 per year at 35 EUR each
  - Returns handling: 26 per year at 41 EUR each
  - Dedicated support hours: 90 per year at 38 EUR per hour

Do this step by step, showing the formula at each step:
1. Confirm gross margin (revenue minus COGS) and gross margin %.
2. Cost each cost-to-serve activity (volume x rate).
3. Sum total cost-to-serve.
4. Net profit from this customer (gross margin minus total cost-to-serve) and net margin %.
5. State whether this customer is profitable and what the single biggest cost-to-serve driver is.
6. List every assumption.

Output a clean table for steps 2 and 3.

Sample numbers are illustrative, not from a real client.

What it produces

A worked example

This is the actual output the prompt produced, with the arithmetic checked by hand.

Steps 1 to 3. Gross margin and cost-to-serve

ActivityVolumeRateCostShare
Sales visits182203,96016.4%
Order processing320144,48018.6%
Deliveries3203511,20046.4%
Returns handling26411,0664.4%
Support hours90383,42014.2%
Total cost-to-serve24,126100%

Gross margin is 240,000 minus 168,000 = 72,000 EUR, a 30% gross margin.

Step 4. Real net profit

72,000 gross margin − 24,126 cost-to-serve = 47,874 EUR net profit, a 19.9% net margin

Step 5. The verdict

This customer is genuinely profitable, but cost-to-serve eats a third of the gross margin, and deliveries alone are 46% of that cost. The lever is not the price, it is the delivery pattern: 320 orders and 320 deliveries means one delivery per order. Consolidating drops would attack the single biggest cost. That is the kind of insight a gross-margin view never surfaces.

What it costs you to run

About 290 tokens of input. The vague alternative, "is this customer profitable?", forces the assistant to either refuse or invent the service costs, and then ask for them anyway. The structured prompt gets the full answer in one pass.

Token figures are approximate and vary by model and language.

The guardrail that matters

Work only from the data I give you. Do not invent any numbers. Where a figure is missing, label it clearly as an assumption.

More on this in how to stop AI inventing your numbers.

When you need the real model

This prompt costs your customer at activity rates you supply. A real cost-to-serve model derives those rates from your own general ledger and operations, across every customer, and keeps them current. That is what we build. The prompt shows you the shape of the answer; we give you the answer you can act on.

M
Ask us anything
usually replies in minutes
Hi. I can answer the quick questions about cost, method and timing right here. For anything specific to your business, I'll hand you to Miguel on WhatsApp.
Free. No bot loops. Straight to a person.