The headline gross margin on my NetSuite test account is 59.5%. The operating reality is 44.9%. The difference is one item.
A service called SVC_Delivery Service generated $763,724 across 30 invoices, one per customer, with no cost of sales, posted to the product revenue account with no class. It accounts for every customer in the book with a 100% margin. It also accounts for most of the receivables problem, because those same invoices are almost all still open, some of them for 498 days. Product customers, by contrast, carry $138K open with a single overdue account.
That's the first of six findings in the Customer Profitability Review, and it's why the report presents margin to management on a product-only basis until the item is reclassified. It went into the Sonar AI Prompt Library in September. If you're new to this, Sonar AI is an AI agent that runs inside NetSuite. Every prompt in the library is a playbook that I engineered and tested against live NetSuite data, and you run it inside your own account, against your own records. Nothing leaves the account, and nothing is written to it.
Attributed From the Ledger, to the Cent
Revenue rankings tell you who's busy. Profit rankings tell you who's worth it, and to build one you have to attribute cost of sales to a customer, which is where most attempts go wrong.
The prompt attributes every posting general ledger line to the customer named on its own document, across invoices, cash sales, item fulfillments, credit memos, and cash refunds. Item fulfillments carry the sales-order customer, so cost of goods lands on the same customer as the invoice it relates to. Over 24 posted periods on the test account, that produced $2,891,691.74 of revenue and $1,171,583.02 of cost across 114 customers and 1,834 sales documents, and both figures reconcile to the general ledger exactly. The reconciliation table shows what was excluded and why, including the $19.8 million of synthetic journal income that carries no customer at all.
It's gross margin only. No operating expense is allocated, and the report says the 44.9% product margin is therefore an upper bound on customer contribution. The last recommendation is about how to get from here to a true cost-to-serve analysis.
A 23-Account Business
The top 20% of customers, 23 accounts, deliver 87% of gross profit and 88% of revenue. Ten accounts deliver 56% of profit. Nine are enough to reach half. The remaining 91 customers, 66 of them individuals buying at the stores, contribute $261K of revenue at a healthy 49% margin but only $129K of profit combined.
The report's reading is that the concentration is structural. Eight Subsidiary 2 accounts and about fifteen Subsidiary 1 business accounts are the profit engine, and the consumer tail is long and thin, with little risk in it. The recommendation follows from that: account-plan the 23, and manage the 66 individuals as a channel, on basket size and category mix, rather than as customers.
Two names in the top ten deserve attention for opposite reasons. Jones Manufacturing, ranked first at $317K of revenue and $133K of gross profit, is down 28% in the last twelve months against the prior twelve, posted $3.2K in August and nothing in September. Marshall Industries is up 340% and is the fastest-growing product account. The report flags the first for retention and the second for a capacity and credit-limit review.
Margin Is Uniform, Which Limits Pricing Leverage
Across the 80 customers who bought product, gross margin runs from 38.4% to 65.2% with a median of 49.3% and an interquartile range of six points. The distribution has almost no left tail, which the report reads as list-price selling on standard cost rather than negotiated discounting. That's good discipline and it also means there's little to recover at the deal level. Apparel is the structurally weakest category at 41.6%, four points behind the others, and it's the reason the most apparel-heavy large accounts sit below the median. A three-point improvement on $694K of apparel revenue is about $21K of annual gross profit.
The cost-to-serve proxy is a number I liked: gross profit per sales document. Every invoice or cash sale implies order entry, picking, shipping, and settlement effort, and on the test account a business-to-business document yields roughly forty times the gross profit of a consumer one. The consumer channel is entirely cash sales, though, with zero receivables and zero collection effort, and the report says that offsets part of the gap.
Four Small Defects
Three item fulfillments posted $784 of cost of goods with no matching invoice. One cash refund reversed revenue without reversing cost. Immaterial in dollars, the report says, and material as a control signal, because a fulfilled order that never billed is revenue leakage regardless of size. The recommendation is a weekly exception check on fulfilled sales orders with no billing link, added to the close.
Collections
Receivables are the single largest value-at-risk item in the review, and the aging is the tail of the service invoices rather than a portfolio problem. The payment-behavior statistics for paid invoices, a median of zero days and 6% paid late, reflect the demo-data pattern of payments recorded on the invoice date, and the report says so rather than presenting them as a real DSO.
How It's Built
Four SuiteQL queries plus a reconciliation probe, all in the appendix, feeding a sandboxed reducer. The customer table embedded in the document is the reducer's output, and every chart and derived figure on the page is computed from it in the browser, so the document is internally consistent by construction. Nine assumptions are listed, from the attribution key to the rounding rules. There's also a note that one inactive customer record is a privacy canary with no activity.
Wrapping Up
The concentration post ranked the same customers by revenue. This one ranks them by what they leave behind after cost, and the two lists disagree in the places that matter.
Customer Profitability Review is in the paid tier of the library. The full sample report from the test account is online, and I covered the whole September release in a separate post.
Nine customers produce half the gross profit on this account. The more useful list is the one at the other end.