Sample output from the Inventory Two-Way Grading — Trapped Cash & Walking Margin prompt in the Sonar AI Prompt Library, run against a NetSuite test account. Every name and number here is test data. Back to the post · The library
TD3016323 · Consolidated (ex-Elimination)
Prepared 26 August 2026 · Trailing 12 months to date

Inventory, graded in both directions.
$425.9K trapped in excess stock. $12.6K of margin walking out the door.

Every stocked line was graded twice: once for the cash a disciplined exit would return, and once for the gross profit not booked when demand arrived and stock didn't — weighted by what the customer actually did next: waited, substituted, or bought elsewhere. This is not a service-level report. Lines are ranked by net cash and margin impact.

$1.12M
On-hand inventory at cost
144 stocked lines graded (InvtPart + Assembly)
$715.6K
Excess cost above 6-mo cover
64% of the balance sheet position is surplus
$425.9K
Realizable cash release
After grade-tiered recovery haircuts
$12.6K
Behavior-weighted GP at risk
+ $15.2K un-margined cancelled demand
All figures at cost unless noted. Recovery haircuts: Grade B 95% · C 70% · D 50% · E 30%. Carrying-cost drag on the excess: $143.1K/yr at 20%.
The imbalance is 34 : 1. This business does not have a stockout problem — it has an over-buying problem concentrated in eleven leather-goods SKUs.

01The verdict in one chart

Cash trapped by grade vs. margin lost to demand failure — same scale, deliberately.
Releasable cash by overstock grade ($, after haircut) vs. total stockout exposure
Grade D — Clearance (25 lines)
$221,776
Grade B — Trim buys (53 lines)
$104,554
Grade C — Markdown (47 lines)
$89,119
Grade E — Dead stock (18 lines)
$10,417
Stockout GP at risk (all 74 lines)
$12,588
Bars scaled to Grade D = $221.8K. Grade A (healthy, ≤6 months cover): 1 line only — Volumizing Shampoo.
Key finding

Only 1 of 144 stocked lines carries a healthy cover position. The median stocked line holds roughly 12–17 months of demand. Eleven leather & accessories SKUs alone hold $389.1K of excess cost — 54% of the total surplus — led by the Black Leather Jacket (item 106): 552 units on hand against 90 sold in twelve months, 73.6 months of cover.

02Overstock — priced at what release would return

Excess = on-hand − committed − 6 months of trailing demand, valued at average cost, discounted by grade-tier recovery.

Grading scale. A ≤ 6 months cover (healthy) · B 6–12 (trim replenishment, sells through at ~95% of cost) · C 12–24 (markdown program, ~70%) · D > 24 (clearance / channel liquidation, ~50%) · E zero sales in 12 months (liquidate or write down, ~30%).

Top 30 lines by realizable cash release

GrItem (internal id)Category On handValue $Mo. cover Sold 12mGM % Excess unitsExcess cost $ Cash release $Write-down $
DBlack Leather Jacket106Leather & Acc.552110,40073.69028.748797,40048,70048,700
DBlack Leather Valise107Leather & Acc.58475,33679.68862.953969,53134,76634,766
DBrown Leather Satchel108Leather & Acc.20962,69835.37122.317452,04826,02426,024
DGold Watch w/ Leather Strap114Leather & Acc.27059,40044.47337.423351,15025,57525,575
DBrown Leather Valise109Leather & Acc.28345,28039.08736.224038,32019,16019,160
DCanvas Backpack111Leather & Acc.32840,01680.34949.930437,02718,51418,514
DIndigo Relaxed Fit117Apparel52536,75094.06748.549234,40517,20317,203
DOlive Utility Pack120Leather & Acc.27627,60048.76848.124224,20012,10012,100
CThe Bindel Jacket130Apparel7119,88012.76710.03710,2207,154—
BSER_Box Spring283Mattress6318,9009.97640.0257,5007,125—
BPatriarch Luxury Firm T B238Mattress3514,00011.73654.9176,8006,460—
CPatriarch Luxury Firm T M236Mattress3614,40017.32554.8239,0006,300—
CEstes Park Chair28Furniture5416,60521.6302.7298,9186,242—
BPatriarch Luxury Firm F B239Mattress3212,80012.03254.9156,0005,700—
CEstes Park Queen Poster Headboard35Furniture4515,21012.34448.6237,7745,442—
BEstes Park Chest34Furniture4816,51210.95348.9175,6765,392—
BSilver Watch w/ Leather Strap123Leather & Acc.6913,80010.38036.5275,4005,130—
CAscend Sofa Table39Furniture5710,74518.03848.5387,1635,014—
DBlack Leather Belt105Leather & Acc.30011,10051.47018.42659,8054,9034,903
CPatriarch Luxury Firm F M237Mattress3212,80012.43154.8176,6004,620—
CSkinny Tinted124Apparel1118,88022.65945.5826,5204,564—
BEstes Park Sofa Table33Furniture5310,15011.85448.5254,7884,548—
BEstes Park Rect Cocktail Table30Furniture499,53110.75538.5224,1823,973—
BEstes Park End Table - Chairside32Furniture508,40011.85151.2254,1163,910—
CEstes Park End Table31Furniture5910,44312.95548.6325,5763,903—
BEstes Park Ottoman29Furniture4813,8489.85948.8143,8953,700—
BBaja Round End Table43Furniture518,74710.45948.5223,6873,503—
CAscend Round Cocktail Table38Furniture499,43312.34848.5254,8133,369—
CAscend Round End Table40Furniture528,71012.55048.5274,5233,166—
BContour Rhapsody Breeze T B232Mattress4012,0008.35838.2113,3003,135—
Remaining 114 graded lines (mostly B/C beauty, bath & body, apparel colorways; E-grade electronics & components)175,319116,586—
Total — 144 lines715,656425,881249,723

Where the surplus sits

Excess cost by category ($; red = share of total surplus > 25%)
Leather & Accessories (11)
$389,101
Apparel & soft goods (41)
$124,854
Furniture (14)
$71,968
Mattress & bedding (13)
$47,900
Beauty / LOT items (28)
$31,712
Electronics & misc (12)
$23,612
Configurator components (13)
$16,684
Bath & body (11)
$9,817
Write-down exposure

Grades D and E carry $249.7K of implied write-down if exited at assumed recovery rates. Eighteen E-grade lines ($39.9K at cost) recorded zero invoiced sales in twelve months — including the ASUS PG348Q monitor ($9.1K), 2-Layer Copper stock ($7.8K), BLT001/CAP001 components ($10.5K), and Solder Mask inventory ($3.9K). One anomaly worth a separate look: Estes Park Chair (28) is selling at a 2.7% gross margin — effectively at cost — while holding 21.6 months of supply.

03Stockouts — margin not booked, weighted by customer behavior

Not a service-level percentage. Each unfulfilled line is priced at its estimated gross profit, then weighted by the probability the customer walks — inferred from line age, this item's proven wait history, and cancellation rates.

Behavior classification, from evidence. Order-to-ship latency was measured for every item that shipped in twelve months (ItemShip lines joined back to their sales orders via createdfrom). The median item ships same-day; genuine waits exist on only four items — the configurator assemblies AS_MBK001 / AS_SAF001 (42–45 days average, and customers demonstrably wait), Posh Collection Eye Shadow, and one add-on line. Where a line's demand was closed unshipped, that demand is treated as bought elsewhere — realized loss, not risk. The item-substitution field (custcol_scm_itemsub_original_item) is unused in this account, so substitution could not be observed directly; the walk-probability curve absorbs it.

Line age (open, unshipped)P(customer walks)Rationale
≤ 14 days10%Normal fulfillment window for a same-day-ship business
15–30 days25%Beyond norm; patience decaying
31–60 days45%Well past expectations, no wait precedent
> 60 days70%Order effectively abandoned
Proven-wait items× 0.5Halved — history shows these customers wait (made-to-order assemblies)

Top stockout lines by expected GP loss

Item (internal id)CategoryBehavior signal Unshipped qtyGP on open lines $ Avg age (d)P(walk)Expected GP loss $
Estes Park Chest34FurnitureAt risk — aged, no wait history51,617820.701,132
Estes Park Nightstand36FurnitureAt risk — aged, no wait history132,497400.451,124
Samsung Odyssey G5 32"19790IT / demoLikely waiting — young line83,432150.25858
AS_SAF001 assembly17317ConfiguratorWaited — proven 42d avg, ships4114,431140.05722
Estes Park Chair28FurnitureAt risk — aged, no wait history221,418340.45638
Estes Park Upholstered Couch37FurnitureAt risk — aged, no wait history5884820.70619
AS_MBK001 assembly17316ConfiguratorWaited — proven 45d avg, ships1010,09330.05505
Canvas Backpack111Leather & Acc.Likely waiting — young line151,920150.25480
Olive Utility Pack120Leather & Acc.Likely waiting — young line201,900150.25475
Ascend Round Cocktail Table38FurnitureLikely waiting — young line61,875190.25469
AS_Keyboard assembly17759ElectronicsLikely waiting — young line101,645250.25411
Estes Park Rect Cocktail Table30FurnitureLikely waiting — young line41,462190.25366
Posh Collection Lipstick MA/PL/PU17726–28BeautyAt risk — 103 days aged609431030.70660
All other open lines (36 items)——————4,129
Expected GP loss — behavior-weighted12,588
Realized losses already booked by customers, not by the ledger

$15.2K of demand was closed unshipped in the last twelve months — customers who stopped waiting. It concentrates in special-order/add-on lines (items 17741 $4.0K, 17745 $8.0K, 17740 $2.1K) whose lines carry no estimated GP in NetSuite (estgrossprofit = 0), so it is reported as revenue foregone, not margin. It is excluded from the $12.6K expected-loss figure to avoid double counting; treat it as a floor on last year's actual stockout cost.

The flattery trap this analysis avoids: a conventional fill-rate metric would score this account ~97% and hide that two-thirds of the weighted loss sits in just eight furniture and configurator SKUs — while awarding a "failure" to gift-wrap add-ons that carry zero margin. Weighted by GP and behavior, the picture inverts.

The double-sided lines

Four items appear on both lists — simultaneously overstocked and failing demand: Canvas Backpack (111), Olive Utility Pack (120), Black Leather Valise (107) and Estes Park Chair (28). Stock exists but isn't where or how demand needs it (328 backpacks on hand, 15 unshipped on an open order). That is an allocation/fulfillment defect, not a buying defect — it costs nothing to fix and is the fastest win in this report.

04The action plan, priced

Sequenced by cash impact per unit of effort.
Fix the double-sided lines this week
Ship the open lines on items 111, 120, 107, 28 from existing stock (all have deep on-hand cover). Pure execution — no purchase, no markdown.
$2.9K GP
Stop replenishing Grade C/D — freeze open POs
Open purchase orders exist on already-overstocked lines (105: 6 units, 283: 5, 115: 40). Cancel or divert before receipt.
stops the bleed
Clearance program: 8 leather & accessories SKUs + Indigo Relaxed Fit
Grade D concentration. Even at 50¢ on the dollar these nine lines return ~$207K and free warehouse capacity. Margin rates of 37–63% on items 107/111/114 support an aggressive promo before resorting to jobbers.
$207K cash
Markdown cycle: Grade C (47 lines)
Structured 20–30% markdowns through the store network, review at 90 days. Beauty LOT items with expiry risk go first.
$89K cash
Write off Grade E, recover what's recoverable
18 dead lines, $39.9K at cost. RTV where vendor terms allow (components), liquidate electronics while they retain value ($9.1K monitor ages badly), write down the remainder. Book the ~$28K hit now.
$10K cash
Protect the four proven-wait assemblies differently
AS_MBK001 / AS_SAF001 customers wait 6+ weeks and still take delivery — protect them with component availability (the E-grade components in this report feed them), not finished-goods stock.
$1.2K GP
Investigate Estes Park Chair pricing
2.7% gross margin on 12-month sales is a pricing or costing error. At current margin, its stockout lines are barely worth chasing — fix price first, then fulfill.
margin repair
Net position: a disciplined exit returns roughly $426K of cash against a one-time write-down of ~$250K and removes a $143K annual carrying drag. Total demand-failure exposure — realized plus expected — is under $28K a year. Every dollar of buying discipline is worth ~15 dollars of safety stock here.

05Method, sources & assumptions

Everything below is reproducible against the live account. All queries ran on 26 Aug 2026.

Assumptions

ParameterValueRationale & sensitivity
Target cover6 months of trailing 12-mo unit salesGenerous for a same-day-ship retailer (industry norm 2–3 mo). A 3-mo target raises excess to ~$800K; results are robust to this choice.
Excess valuationAverage cost per unit (on-hand value ÷ qty from inventoryitemlocations.onhandvaluemli)Matches the balance-sheet carrying value.
Recovery ratesB 95% · C 70% · D 50% · E 30%Conservative liquidation-channel norms; grade D/E items retain brand value (leather goods) so 50%/30% may understate recovery.
Carrying cost20% per annum on excess costCapital + storage + shrink + obsolescence; mid-range of the standard 18–25% band.
Committed stockExcluded from excess (netted out first)Committed units are spoken for; grading them would overstate surplus.
Stockout GPPer-line estgrossprofit, prorated to the unshipped fraction; fallback to item's realized 12-mo marginUses NetSuite's own line-level margin estimate at order entry.
Walk probabilityAge curve 10/25/45/70%, halved for proven-wait items, floored at 70% for high-cancel itemsCalibrated to this account's measured behavior: median ship latency ≈ 0 days; only 4 items have wait precedent.
BackordersPriced at unit GP × 50%Only ~$42 of exposure; immaterial.
Sales windowInvoices + cash sales, 12 mo to 26 Aug 2026, elimination subsidiary (id 4) excludedCashSale volume exceeds CustInvc in this account; both included.
Zero-cost anomaliesIT-* items (avg cost 0) graded but release value = 0Recently loaded demo/IT gear with no cost basis — flagged, not monetized.

Known limitations

Read before acting

Source queries (SuiteQL)

Q1 — Stock positions: on-hand, value, committed, backordered, on-order per item
SELECT
    i.id                              AS item_id,
    i.itemid                          AS sku,
    ROUND(MAX(i.averagecost), 2)      AS avg_cost,
    SUM(iil.quantityonhand)           AS qty_on_hand,
    ROUND(SUM(iil.onhandvaluemli), 2) AS on_hand_value,
    SUM(NVL(iil.quantitycommitted,0)) AS qty_committed,
    SUM(NVL(iil.quantitybackordered,0)) AS qty_backordered,
    SUM(NVL(iil.quantityonorder,0))   AS qty_on_order
FROM item i
JOIN inventoryitemlocations iil ON iil.item = i.id
WHERE i.itemtype IN ('InvtPart', 'Assembly')
GROUP BY i.id, i.itemid
HAVING SUM(iil.quantityonhand) <> 0 OR SUM(iil.quantitybackordered) <> 0
ORDER BY SUM(iil.onhandvaluemli) DESC
Q2 — 12-month sales velocity, revenue and estimated COGS per item
SELECT
    tl.item                                  AS item_id,
    SUM(ABS(tl.quantity))                    AS qty_sold_12m,
    ROUND(SUM(ABS(tl.netamount)), 2)         AS rev_12m,
    ROUND(SUM(ABS(NVL(tl.costestimate,0))), 2) AS cogs_12m,
    COUNT(DISTINCT t.id)                     AS order_count_12m,
    TO_CHAR(MAX(t.trandate), 'YYYY-MM-DD')   AS last_sale
FROM transaction t
JOIN transactionline tl ON tl.transaction = t.id
WHERE t.type IN ('CustInvc', 'CashSale')
  AND tl.mainline = 'F' AND tl.taxline = 'F'
  AND tl.item IS NOT NULL
  AND tl.subsidiary <> 4                    -- exclude elimination sub
  AND t.trandate >= ADD_MONTHS(TRUNC(SYSDATE), -12)
GROUP BY tl.item
Q3 — Open unfulfilled sales-order demand, aged and GP-prorated
SELECT
    tl.item AS item_id,
    SUM(ABS(tl.quantity) - NVL(tl.quantityshiprecv,0)) AS open_unshipped_qty,
    ROUND(SUM(NVL(tl.estgrossprofit,0)
        * (ABS(tl.quantity) - NVL(tl.quantityshiprecv,0))
        / NULLIF(ABS(tl.quantity),0)), 2)              AS open_unshipped_gp,
    ROUND(AVG(TRUNC(SYSDATE) - TRUNC(t.trandate)), 0)  AS avg_line_age_days,
    MAX(TRUNC(SYSDATE) - TRUNC(t.trandate))            AS max_line_age_days,
    COUNT(*)                                           AS open_lines
FROM transaction t
JOIN transactionline tl ON tl.transaction = t.id
WHERE t.type = 'SalesOrd'
  AND tl.mainline = 'F' AND tl.taxline = 'F'
  AND tl.item IS NOT NULL AND tl.subsidiary <> 4
  AND tl.isclosed = 'F' AND t.status <> 'G'
  AND ABS(tl.quantity) - NVL(tl.quantityshiprecv,0) > 0
GROUP BY tl.item
Q4 — Cancelled demand: SO lines closed while unshipped (bought elsewhere)
SELECT
    tl.item AS item_id,
    COUNT(*) AS closed_lines,
    SUM(ABS(tl.quantity) - NVL(tl.quantityshiprecv,0)) AS qty_cancelled,
    ROUND(SUM(ABS(NVL(tl.foreignamount,0))
        * (ABS(tl.quantity) - NVL(tl.quantityshiprecv,0))
        / NULLIF(ABS(tl.quantity),0)), 2)              AS cancelled_amount
FROM transaction t
JOIN transactionline tl ON tl.transaction = t.id
WHERE t.type = 'SalesOrd'
  AND tl.mainline = 'F' AND tl.taxline = 'F'
  AND tl.item IS NOT NULL AND tl.subsidiary <> 4
  AND (tl.isclosed = 'T' OR t.status = 'G')
  AND ABS(tl.quantity) - NVL(tl.quantityshiprecv,0) > 0
  AND t.trandate >= ADD_MONTHS(TRUNC(SYSDATE), -12)
GROUP BY tl.item
Q5 — Order-to-ship latency: did customers actually wait?
SELECT
    tls.item AS item_id,
    COUNT(*) AS ship_lines,
    ROUND(AVG(TRUNC(ts.trandate) - TRUNC(so.trandate)), 1) AS avg_days_to_ship,
    COUNT(CASE WHEN TRUNC(ts.trandate) - TRUNC(so.trandate) > 21 THEN 1 END) AS lines_over_21d
FROM transaction ts
JOIN transactionline tls ON tls.transaction = ts.id
JOIN transaction so      ON tls.createdfrom = so.id
WHERE ts.type = 'ItemShip'
  AND tls.item IS NOT NULL AND tls.mainline = 'F'
  AND so.type = 'SalesOrd'
  AND ts.trandate >= ADD_MONTHS(TRUNC(SYSDATE), -12)
GROUP BY tls.item
Grading model (applied to query outputs)
months_cover   = qty_on_hand / (qty_sold_12m / 12)
excess_units   = MAX(qty_on_hand - qty_committed - qty_sold_12m/2, 0)   -- 6-mo target
excess_cost    = excess_units * (on_hand_value / qty_on_hand)
grade          = A: cover ≤ 6 | B: ≤ 12 | C: ≤ 24 | D: > 24 | E: zero 12-mo sales
cash_release   = excess_cost * recovery{B:.95, C:.70, D:.50, E:.30}
carry_drag     = excess_cost * 20%/yr

p_walk(age)    = 10% (≤14d) | 25% (≤30d) | 45% (≤60d) | 70% (>60d)
               × 0.5 if item has proven wait history (measured via Q5)
exp_gp_loss    = open_unshipped_gp * p_walk
realized_loss  = cancelled demand (Q4), reported separately — no double count
Source: NetSuite account TD3016323 (production), SuiteQL queries executed 26 Aug 2026; trailing-12-month window 27 Aug 2025 – 26 Aug 2026. Elimination subsidiary excluded throughout. Inventory valued at average cost per inventoryitemlocations; margins per NetSuite line-level estimates. Recovery rates, carrying cost, and walk probabilities are stated assumptions — directional planning figures, not audited valuations. Write-downs require controller review before booking. Prepared by Sonar AI; verify grade assignments with merchandising before executing clearance.
Sonar AI · Inventory Intelligence