Three-way matching with an agent works line by line: it compares each invoice line with the purchase order line and the goods receipt: quantity, price and item. Matches within tolerance it clears at depth 3, ready for approval. Price differences go to the buyer, quantity differences to the receiver, and missing receipts to the requester, with evidence.
What is three-way matching, and who owns each part?
A three-way match checks that you are paying for what you ordered, at the price you agreed, for goods or services you received. The order sets price and quantity; the receipt confirms delivery; the invoice asks for payment. When all three agree, the invoice can proceed. A two-way match skips the receipt and is used where receipt is not recorded, such as some services.
Ownership is split by the kind of disagreement. The buyer who placed the order owns price. The person or team who received the goods owns quantity. The requester owns whether a service was delivered. The AP lead owns the matching process and tolerances, under policy set by the financial controller. Most matching delays come from routing exceptions to the wrong person. The general bounds for finance agents are in AI agents for finance.
How does the agent match, and what may it clear on its own?
- Agent, depth 1: reads invoice lines. After the invoice has been captured and the supplier confirmed.
- Agent, depth 1: finds the order and receipt lines. By order reference, then by supplier, item and quantity where references are missing or wrong.
- Agent, depth 1: compares. Quantity invoiced against quantity received not yet invoiced; unit price against order price; item against item, including unit of measure.
- Agent, depth 3 once certified: clears matches within tolerance. Price and quantity within the tolerances set per category, supplier established, bank details unchanged within the cooling period. The invoice moves to "matched, ready for approval".
- Agent, depth 2: routes exceptions. Price over tolerance to the buyer; quantity over receipt to the receiver; no receipt to the requester or receiver; no order to AP; item or unit mismatch to the buyer.
- Person, exception owner: decides. Accept the variance, correct the receipt, ask the supplier for a credit, or reject.
- Agent, depth 1: logs every exception. In an exception log with reason, owner, age and outcome.
| Step | The agent does | Depth | Stays with a person |
|---|---|---|---|
| Read | Invoice lines | 1 | Nothing |
| Find | Order and receipt lines | 1 | Nothing |
| Compare | Quantity, price, item | 1 | Nothing |
| Clear | Within tolerance | 3 | Setting tolerances |
| Price exception | Routes with evidence | 2 | Buyer decides |
| Quantity exception | Routes with evidence | 2 | Receiver decides |
| Missing receipt | Routes | 2 | Requester or receiver |
| Log | Records every exception | 1 | AP lead reviews |
Which exceptions does a person decide?
Every exception is a person's decision, and the right person depends on the cause. A price over tolerance may be a legitimate price change the buyer forgot to update, or an overcharge. A quantity over receipt may be a short delivery, or a receipt that was never entered. A missing receipt may mean the goods have not arrived. The agent can describe what it sees, but only the person who placed the order or received the goods knows which it is.
For example, take an illustrative invoice for 500 units at 10.40 against an order for 500 at 10.00, with 450 units received. The agent finds two exceptions on one line: a price variance of 0.40 a unit, above the category tolerance, and 50 units invoiced but not received. It routes the price question to the buyer and the quantity question to the warehouse, and holds the whole line until both are answered. The buyer confirms the old price applies and asks the supplier for a credit; the warehouse confirms the short delivery.
Use an exception log template so every exception has the same fields: invoice, line, type, variance, owner, date routed, decision, decided by, and date closed.
Which controls matter, and what evidence does each leave?
Tolerances in policy. Per category, as an amount and a relative limit, approved by the controller. Evidence: the tolerance version on each cleared match.
Receipt independence. The person who raised the order should not be the only person who can receipt it. Evidence: identities on order and receipt.
No clearing without a receipt. On three-way categories, no receipt means no clearance, whatever the amount. Evidence: the match record.
Cumulative tolerance. Small price variances on many lines from one supplier add up. Evidence: a running total per supplier per period.
Exception ageing. Evidence: the log with ages.
The way these checks spread across operations, risk and audit is set out in a three lines of defence matrix for AI agents.
What should you measure?
- Invoices cleared by the agent later found wrong.
- Exceptions by type and owner. A dominant type points to an upstream fix: price exceptions to contract maintenance, quantity exceptions to receiving discipline.
- Exception age at month end.
- Credits recovered from price exceptions.
Where does it usually go wrong?
Receipts entered to make invoices match. A requester receipts the invoice quantity without checking delivery. The agent should flag receipts entered after the invoice arrived for exactly the invoice quantity.
Tolerances widened to clear backlogs. Each widening is a policy change and needs the controller's approval.
Units of measure. The order is in boxes, the invoice in units. The agent must convert using the item master, not guess.
Partial deliveries. One order, several receipts, several invoices. Match against quantity received and not yet invoiced, not against the order total.
Depth set by label, not evidence. Calling the agent "level 3 autonomous" tells you little about whether its clearances are right. Whether autonomy levels are the right way to govern AI agents is the wider debate; here, clearing at depth 3 is earned on your own past invoices and lost if the agent fails.
Questions people ask
What happens if the agent's certificate lapses?
It stops clearing the same day and every match goes to a person as an exception until it is re-certified. Comparing and routing continue at depth 1 and 2.
Can the agent update the order price to fix a variance?
No. Changing an order is the buyer's decision, and the agent has no write access to orders.
Should services use three-way matching?
Where a service can be confirmed, such as with a timesheet or acceptance, yes. Otherwise use two-way matching with approval by the requester.