← All use cases

Use case · dnd-dispute-agent

Detention & demurrage invoice disputes

Shippers and forwarders just pay container storage-and-delay invoices because rebuilding the free-time math takes hours per container — even though under the FMC's OSRA-2022 billing rule, a defective invoice means the charge isn't owed.

01 The work arrives — often on its own

Invoices arrive on their own schedule — into the AP inbox, or straight off a Terminal49 or project44 event feed. Any of them can start the task; nobody has to notice the invoice is wrong first. Each container becomes its own durable dispute with its own clocks.

02 Grain fans out

Grain rebuilds what actually happened to the container from four sources — interchange receipts, the tariff, the appointment log, the invoice itself — and recomputes free time day by day. Then the federal billing rule runs as a hard gate: required invoice elements, issuance timing, correct billed party. The gate cuts both ways — a real defect voids the charge, but a meritless dispute comes back as “recommend pay.”

03 It lines up the facts

The facts are laid out per container: free time under the tariff, days billed, days the terminal was actually bookable, when the invoice was issued. Against them, the checks — what the paperwork supports, and the three ways this invoice fails the rule that governs it.

04 The output is a packet, not an answer

The packet is the dispute, ready to stand on its own: the letter, the day-by-day recalculation with each disputed day citing its defect or its ledger event, and the proposed send to the carrier's billing desk. Validations make sure nothing weakens it — a cited day with no ledger row behind it never survives — and an independent pass confirms every citation matches an actual finding.

05 Nia brings it back to a person

Priya reads one page, sees $0, and asks Nia whatever she's unsure about — why day five counts, what the rule actually requires. When the carrier replies weeks later she forwards it to Nia, who re-runs the math and updates the recommendation. The letter goes out through her own systems, inside the 30-day window the clock has been holding.

Get started

Run this workflow on Grain.