3-Way Match Exception Workbench
Match every supplier invoice against its PO and goods receipt line by line, auto-pass clean matches within tolerance, and queue only the real exceptions for a person to resolve before anything is released to AP.
A login-protected workbench that loads PO, receipt, and invoice lines, matches them line by line, auto-passes clean matches within your tolerances, queues price/quantity/no-receipt exceptions with clear old-vs-new deltas, lets a reviewer resolve each one, sets an OK-to-pay status only after match-or-resolution, and exports an approved-to-pay CSV for AP with a full audit log.
Before you start
- A free Supabase account
- A free Vercel account
- A free Resend account (for exception and OK-to-pay notifications)
- Your PO, goods-receipt, and invoice lines available as a spreadsheet or CSV export (no live API needed)
The problem this kills
Right now, somebody on your AP or procurement team opens three documents for every invoice - the purchase order, the goods receipt, and the supplier's invoice - and eyeballs whether the numbers line up. They squint at quantities, hunt for the matching PO line, mentally compare prices, and try to remember whether that receipt ever actually came in. Do this fifty times a day, under deadline, and overpayments slip through: a price that crept up, a quantity billed but never received, a duplicate invoice paid twice, freight that nobody agreed to.
The boring truth is that most of those invoices are fine. The work isn't the matching - it's the small pile of exceptions hiding inside a big pile of clean lines. You're spending your attention on the 90% that's correct and rushing the 10% that costs you money.
This plan flips that. The clean matches pass automatically, within tolerances you set. The only things that reach a human are the genuine exceptions - and even those can't be paid until a person looks at them and decides.
What you'll build
A web-based 3-Way Match Exception Workbench your team logs into. You load (or import) the PO lines, the goods-receipt lines, and the invoice lines. The tool matches them line by line on the PO line ID, compares quantities and prices against your tolerances, and sorts every invoice into one of two buckets: auto-passed (clean, within tolerance) or exception (price variance, quantity variance, or no matching receipt).
Exceptions land in a queue that shows the deltas in plain numbers - PO price vs invoice price, received qty vs billed qty - so the reviewer sees exactly what's off. The reviewer resolves each one (approve the variance, dispute it with the supplier, or hold it), and only then can the invoice be marked OK-to-pay. When you're ready, you export a clean approved-to-pay CSV in the exact columns your AP system expects - and every action is written to an audit log.
It handles the messy real world too: partial receipts, multiple receipts or invoices against one PO, and freight/tax lines that don't match a goods receipt.
What's inside the Implementation Plan
The plan is a single file you paste into an AI coding agent (Claude Code), which then builds the tool with you step by step. The first thing it does is interview you about your business - your current matching process, the systems and spreadsheets you use, the exact field names and PO/invoice number formats in your data, your typical and peak invoice volumes, your tolerance rules, and your nastiest edge cases. It reads back a short tailored spec, waits for your thumbs-up, and only then starts building - so you get a tool shaped around how you actually work, not a generic template.
From there it walks through the data model, the matching engine, the auto-pass-vs-tolerance logic, the exception queue with deltas, the human resolution screen, the OK-to-pay gate, the approved-to-pay CSV export, and email notifications - each step ending in a ready-to-copy prompt you paste to your agent.
The governance it includes (this is the point)
This isn't a clever spreadsheet macro. It's an auditable control:
- Login so only your team can use it.
- Row-level security so each organization only ever sees its own POs, receipts, and invoices.
- A hard human-in-the-loop gate: no invoice becomes OK-to-pay until a person has reviewed it. Anything outside tolerance is never auto-paid.
- Duplicate guards: the same invoice (invoice number + supplier) can't be released to pay twice.
- A complete audit trail: who matched, who resolved, what they decided, and when - ready for your auditors.
Who it's for
AP and procurement staff who today open three documents per invoice and pay things they shouldn't. If you've ever caught a duplicate payment after the fact, paid a price that didn't match the PO, or signed off on goods you never received, this is for you. No coding background needed - if you can answer questions about your process and paste a prompt, you can build this.
You've got this - paste the first prompt and let the agent interview you.