WorkConsumer Goods (CPG)6 min read

Recovering Retail Deductions at 70% Win Rate With LLM Document Intelligence

An agent that reads every cryptic retailer deduction, checks it against your order-to-cash record, and assembles the dispute, so the invalid ones stop being silently written off.

The client sells into national retail, and the retailers claw money back through deductions: shortages, compliance chargebacks, pricing and promo disputes, post-audit claims. They arrive as EDI 812 adjustments, PDF claim backup, and portal exports, every retailer with its own cryptic reason codes. The AR team could only fight a fraction by hand, so the rest, valid or not, was written off.

Client profile
A consumer packaged-goods brand, ~$25M revenue, selling into national retail and grocery
Industry
Consumer Goods (CPG)
Region
North America / UK

01 The Challenge

Money leaving the building through documents nobody had time to read

~70%Of deductions never disputedWritten off because reviewing them by hand did not scale

Deductions were running at a few points of wholesale revenue and climbing as the brand added retail accounts. Each one came as a different artifact: an 812 with a numeric reason code, a scanned PDF with claim backup, a spreadsheet exported from a retailer portal. To dispute one, someone had to read it, decode the retailer's reason code, dig the proof out of the order-to-cash system (was the ASN actually late? was it really short-shipped?), and write a packet. At volume, that was impossible, so AR disputed the easy few and absorbed the rest.

The money was recoverable. The reading was the bottleneck.

02 The Approach

Treat deductions as a structured-data and evidence problem, with a human on the deciding end

The governing rule: every deduction is read, classified, and scored for validity against the order-to-cash record, and a human approves before anything is disputed. The LLM does the reading and the assembly; it does not file claims on its own.

Two decisions shaped it. First, normalize each retailer's reason-code dialect into one canonical deduction taxonomy, so a "shortage" from one retailer and a "carton compliance" from another land in the same model. Second, ground every extraction in its source: the model returns the exact page and quote it pulled each figure from, so a disputer (and the retailer) can see where the claim came from. We did not let the model invent recoverability. It scores, a person decides.

What we deliberately did not do: no auto-submission of disputes, no touching the ERP's books directly, and no offshore claims team. The system makes the work tractable; the AR lead still owns the call.

03 The Build

A reading pipeline, an evidence match, and a dispute the team approves

Deduction documents land from EDI 812 feeds, retailer portals, and email, and are stored in S3. Claude Haiku 4.5 reads each one (using vision for the scanned PDFs), extracts the line items, and classifies the reason against the canonical taxonomy, returning the source page for every value. A match step joins each deduction to the order-to-cash record from the EDI build (ASN timestamps, proof of delivery, invoice, shipment) and scores validity. For the disputable ones, Claude Opus 4.8 drafts an evidence-backed dispute packet. Everything surfaces in a TypeScript review console where AR approves, edits, or rejects, and Temporal runs the dispute workflow: submit, await the retailer's response, escalate, and record the outcome.

It reuses the order-to-cash data the EDI build already produces, so every deduction is scored against real shipment evidence rather than a guess.

  • Python
  • Claude Haiku 4.5
  • Claude Opus 4.8
  • TypeScript
  • Temporal Cloud
  • Aurora PostgreSQL
  • S3
  • AWS

04 The Results

Every deduction fought on the merits, not on whoever had time

70%Win rate on disputed deductionsRecovering deductions worth roughly 2 to 3 points of margin

Every deduction is now triaged instead of a sampled few, and disputes that used to never get written go out with the evidence attached. Win rate on disputed claims runs around 70%, recovering deductions worth roughly two to three points of margin that had been leaking away. Turnaround is about three times faster because the reading and packet assembly are automated. And because every deduction is classified, the recurring root causes surface, for example a pattern of ASN-timing chargebacks from one retailer, which feeds straight back into fixing the order-to-cash process so the chargeback stops happening.

05 What's Next

Closing the loop back into order-to-cash

The deduction data is a map of where the operation leaks money. Feeding the recurring root causes back into the EDI and routing build (the same brand's order-to-cash system) turns recovery into prevention: the chargebacks that keep winning disputes are the ones worth engineering out entirely.

Dental6 min read

Every Marketing Source and Patient Outcome in One Dashboard You Can Just Ask

Meta, Google, Search Console, GA4, and Dentally unified into one live custom dashboard, with an LLM that answers plain-English questions tied to booked patients and treatment.

8 hrs/weekReclaimed from manual reporting
  • Marketing Dashboard
  • BigQuery
  • LLM Analytics
Read

DTC E-commerce5 min read

True Net Profit in One Number, Pulled From Every Sales and Cost Source

A reconciled, automated P&L for a small brand: sales, every variable cost, and overhead from the books, combined into the real net profit the founder can finally trust, refreshed daily.

+5 ptsNet margin, after the real number exposed the leaks
  • Profit
  • dbt
  • Metabase
  • QuickBooks
Read

Engineering edge,
without hiring a team.

Numbers you can trust, operations that run themselves, all built into your stack and owned by you. Tell us where you want the edge, and we'll build it.

Have a project in mind?

  • Quick response

    You'll hear from an engineer the same working day, not a sales sequence.

  • Clear next steps

    A short call, then a plan, and we start with Proof Week or a full build.

  • Fixed fee first

    A fixed fee agreed before anything starts, for Proof Week or the full build.