shipwithjev

Blog / 44

AI Invoice Processing: The Back Office Meets the Verdict Machine

Invoice processing as judgments: categorization, PO matching, anomaly flags, and approval routing at verdict prices, with the controls finance requires.

Accounts payable is where documents go to be judged slowly. Every invoice triggers the same quiet tribunal: is this a real vendor, which cost center, does it match a PO, is the amount weird, who has to approve it. In most companies that tribunal is a person with a queue, some OCR software from 2019, and a rulebook that lives partly in their head, which is why AP is simultaneously the most automatable department on the org chart and the one still forwarding PDFs. Custody note: the ecommerce page owns storefront money; this page owns the back office, and document classification owns the general document mountain of which invoices are the most structured foothill.

The tribunal, decomposed

An invoice is extraction plus judgments, and the split matters. Extraction (vendor, date, line items, totals) is OCR and span-pulling: local tooling per the local-perception pattern, with one meta-verdict on top ("is this extraction legible and complete?") routing bad scans out before they become confident nonsense. Then the judgments, which are a decision model's native food:

  • Categorization: which GL account and cost center, with boundary clauses doing the accounting policy ("software subscriptions include usage-based cloud; exclude hardware leases") per question craft
  • Vendor resolution: is "Acme Corp" this invoice the "ACME Corporation" in the master file, entity resolution with a checkbook
  • PO and receipt matching: do line items correspond to an open PO's items and quantities; is this a duplicate of an already-paid invoice (the fraud-and-error catch that pays for the whole pipeline)
  • Anomaly flags: amount out of range for this vendor's history; first-time vendor; bank-detail change since last invoice (the classic fraud tell); round-number suspicion on categories that shouldn't have them
  • Routing: which approval chain, what urgency (early-payment discount expiring?), straight-through eligible or human-required

The economics follow the standard shape (500 items for cents as the reference; the cost table generalizes), which is what makes every-invoice coverage, including the small ones fraud loves precisely because nobody reviews them, the new default.

The finance-grade seatbelts (this section is the product)

AP automation lives under controls, so the architecture is cascade with the thresholds set by your controller, not your engineers: straight-through processing only for high-confidence, in-policy, matched invoices under a value ceiling; everything else to human queues with the verdicts attached as pre-work, which is how a reviewer clears forty invoices an hour instead of nine. Non-negotiables: payments are never model-triggered (irreversible-action rule, with money's own multiplier); bank-detail changes always reach a human regardless of confidence; every verdict logs question version and confidence per audit discipline, because auditors will ask and "the model decided" is not a control; and the adversarial humility from the spam page applies, since invoice fraud is a professional field and your filter's consistency is their test environment. Expense-report categorization rides the identical machine at lower stakes, which makes it the right pilot: same questions, smaller blast radius, per the start-small ritual.

Frequently asked questions

What can AI actually automate in invoice processing?

Categorization, vendor matching, PO/duplicate checks, anomaly flagging, and approval routing, with straight-through processing for confident in-policy cases and evidence-attached queues for the rest. Extraction is tooling; judgment is the model's half.

Is it safe for financial controls?

As a routing-and-flagging layer with human approval on payments, value ceilings, mandatory review of bank changes, and versioned audit logs: yes, and it strengthens controls by reviewing 100 percent instead of samples. As an autonomous payer: no, permanently.

What does it cost per invoice?

Judgment batteries run fractions of a cent per invoice at reported verdict prices; OCR and workflow tooling dominate the real bill. Reference workloads: the cost table.

Where should a finance team start?

Expense-report categorization or invoice pre-coding (verdicts as suggestions your AP team confirms) for a month of calibration against human decisions, then promote straight-through processing category by category as agreement rates earn it.

Numbers throughout are as reported by the build authors, not verified by shipwithjev. Code-shaped examples are pseudocode; the official docs live at docs.typesafe.ai.