Accounts Payable
9
Exceptions to clear
214
Cleared automatically
2
Suspected duplicates
3 days
To next discount deadline
| Supplier | Invoice | Amount | Why it is here | Due |
|---|---|---|---|---|
| Kestrel Ltd | KL-4471 | 31,000 | No purchase order | 11 days |
| Apple | AP-99120 | 26,880 | Over tolerance by 340 | 6 days |
| Harbon LLP | H-2210 | 9,500 | Unknown supplier | 14 days |
| Figma | FG-8801 | 18,400 | Possible duplicate | 9 days |
| Northrise | NR-114 | 4,120 | Quantity mismatch | 2 days |
What matters here
- An invoice queue is four parts: intake, matching against what was already approved, an exception path, and a payment-ready state.
- Most invoices should never need a human. If everything lands in a queue for review, the queue is a re-approval process rather than an exception process.
- Three-way matching means invoice, purchase order and receipt of goods or service agree. Two-way skips the receipt, which is common for services and fine if you know that is the trade.
- Tolerance thresholds are what make auto-matching usable. An invoice that differs by rounding should clear; one that differs by 30% should not.
- Duplicate detection belongs at intake, not at payment. The same invoice arriving twice by two routes is the most common and most expensive error.
- The queue reads and writes to a finance system, so managed credentials and a named owner are not optional extras.
Who this is for
You run accounts payable or finance operations. You already know your approval matrix and your payment terms. What you want is for the invoices that match what was approved to clear without a human, and for the ones that do not to be obvious.
How it works in practice
What happens to an invoice from the moment it arrives to the moment it is paid.
- 1
It lands in one place
However it arrived, emailed, portal or scan, it becomes one record with the supplier, number, amount and any purchase order reference.
- 2
Duplicates get caught at the door
Same supplier and number, or same supplier, amount and a nearby date, gets flagged before anything else touches it.
- 3
Most invoices clear without a human
If it matches the purchase order within tolerance, it clears and goes straight to the payment-ready list, with a record of what it matched.
- 4
The rest become exceptions with a reason
No order, over tolerance, quantity mismatch, unknown supplier. Each routes to whoever can resolve that kind, not to a shared pile.
- 5
An approver sees the discrepancy, not two documents
Invoice on one side, order on the other, difference highlighted. No opening attachments to find the gap.
- 6
Payment-ready, with the discount dates in view
A clean list of what is approved to pay, sorted by due date, with early-payment windows flagged before they close.
What an invoice queue is made of
An invoice queue is not an inbox with rules. It is four parts, and the second is the one that decides whether the tool saves time or just moves the pile.
Intake
Every invoice in one place, however it arrived: emailed PDF, supplier portal, or a forwarded scan. Capture supplier, invoice number, date, amount, currency, line items and the purchase order reference if there is one.
Matching
Compare the invoice against the purchase order or approval that authorized it. Agreement within tolerance clears automatically. Anything else becomes an exception with a reason attached.
An exception path
The queue proper: mismatched amounts, missing purchase orders, quantities that do not reconcile, suppliers nobody recognizes. Each exception routes to whoever can resolve that kind, not to a general pile.
Payment ready
A clean, dated list of what is approved to pay, with the evidence attached. This is the handoff to whoever runs the payment run, and it is what an auditor asks to see.
The prompts
Paste these into Claude Code, Codex or Cursor in order. Each one leaves you with something that runs, so you can stop after any step.
These prompts start from a Helix project, which is what handles sign-in, credentials and hosting. Start with Helix.
Every invoice in one place, duplicates caught
Intake, and the single most expensive error in accounts payable.
Create a Helix app: an invoice approval queue.
Start with intake. Every invoice becomes one record: supplier, invoice number, dates, currency, totals, line items, and the purchase order reference if there is one. Let me type one in and attach the original document.
Before anything else touches a new invoice, check whether we have seen it before. Flag it if the supplier and invoice number already exist, and flag it if the supplier, total and date are all close to something we already have. Show me the suspected duplicate side by side rather than rejecting it. The same invoice arriving twice by two routes is the most common mistake in this whole process and it costs real money.
Matching, so most invoices never reach a person
The part that decides whether this saves time or just moves the pile.
Now match invoices against what was actually approved.
I will give you purchase orders with their line items. Match each invoice by reference, and fall back to supplier plus amount when the reference is missing, because it often is.
Set tolerances in one place I can edit: an absolute amount and a percentage, whichever is smaller. Inside tolerance, the invoice clears on its own and goes to the payment-ready list. Outside it, or with no order at all, it becomes an exception with the reason attached.
Every automatic clearance still writes down what it matched and why. "It cleared automatically" is a decision, and somebody will eventually ask what it matched against.
The exception queue
The screen a person opens, and what has to be on it.
Build the queue itself, and only put exceptions in it.
Each row shows what the invoice says, what the order said, and the difference between them, next to each other. An approver should never have to open two documents to find a discrepancy.
Route each type of exception to whoever can resolve that type. Missing order, over tolerance, quantity mismatch, unknown supplier, suspected duplicate. A single shared pile means everything waits for whoever looks first.
Actions: approve anyway with a reason, reject with a reason, send back to the supplier, or reassign. Sort by days to the payment due date, because paying late is the actual cost of a slow queue.
Ready to pay, and the record behind it
The handoff, and the evidence.
Finish with the payment-ready list.
Everything approved and not yet paid, grouped by supplier, sorted by due date, with early-payment discount windows flagged before they close. A queue that pays on time is table stakes. One that catches the discount pays for itself.
Let me export a batch for the payment run and mark it paid so it leaves the list.
And keep an appended record of every state change, with who, when, and what the invoice and the match looked like at that moment. Give me a supplier view too: every invoice from one supplier and its status, which is what I need open when they ring.
Connect it to real systems
The step that turns a working prototype into something with your data in it.
Now connect it to the systems we actually run, so it works on real data rather than the rows you seeded.
Anything in angle brackets is a placeholder. Swap it for whatever we use instead, and have the app name the connection it wants rather than assume a vendor, so changing my mind later is a config change and not a rewrite.
<NetSuite>. Read purchase orders to match against, and push the approved payment batch back.
<Gmail>. Pull invoices that arrive as attachments, so intake is not somebody retyping them.
<Slack>. Tell an approver an exception is waiting, with the discrepancy in the message.
<Google Drive>. Keep the original invoice attached to its record for the audit trail.
<Coupa>. Read the purchase orders and receipts that three-way matching needs.
<Snowflake>. Land cleared invoices next to the purchase orders, so spend by supplier and by cost center is one join rather than two exports.
<Brex>. Match card-paid invoices, which otherwise arrive twice and get paid twice.
Only write where I have said to write. Everything else is read only.
Ship it
The last step of every build: a URL, and the right people on it.
Deploy my app.
What it connects to
An invoice queue is only as good as what it can see, and most of what it needs already lives somewhere else.
-
NetSuite Read purchase orders to match against, and push the approved payment batch back. Reads and writes -
Gmail Pull invoices that arrive as attachments, so intake is not somebody retyping them. Reads
-
Slack Tell an approver an exception is waiting, with the discrepancy in the message. Writes
-
Google Drive Keep the original invoice attached to its record for the audit trail. Reads and writes
-
Coupa Read the purchase orders and receipts that three-way matching needs. Reads -
Snowflake Land cleared invoices next to the purchase orders, so spend by supplier and by cost center is one join rather than two exports. Writes -
Brex Match card-paid invoices, which otherwise arrive twice and get paid twice. Reads
Named systems are the ones most teams actually run, not a list of the only ones that work. Swap in whatever you use.
Running it for real
The build gets you a working queue. It holds supplier data, decides what gets paid, and writes to a finance system, so it has to be run properly before it touches a real payment run.
- 1
Get it to a URL people can open
One command takes the app from your assistant to a live address, so the people who need it get a link rather than instructions for running it locally.
- 2
Put your identity provider in front of it
An invoice queue decides what money leaves the company. SSO means approvers sign in with their existing account, and access is scoped to the people whose approvals count.
- 3
Connect the finance system with managed credentials
Reading purchase orders and writing payment-ready batches needs real access. Granting it to the app rather than pasting a key into it means it can be rotated or revoked without a redeploy.
- 4
Put a name on it
Every app carries a named owner and an entry IT can see, so the tool does not become nobody's problem when the person who built it changes role.
- 5
Know what it costs to run
Per-app spend visibility, so an internal tool cannot quietly become a line item nobody can explain.
Do this as a workflow instead
An app is only as good as the data in it. These build the integrations and automations that keep this one current, on the Tray platform. Same kind of guide, same kind of prompts.