Oracle’s documentation states the 3-way match in one line: “Purchase order, receipt, and invoice quantities must match within tolerance before the corresponding invoice can be paid.” That sentence covers the comparison. What happens when the quantities don’t match, and who decides, is usually written in an AP procedure meant for clerks.
Building an agent from that procedure means pulling out each tolerance, exception route and approval limit as a separate rule that someone owns. The general method, for any SOP, is in turning an SOP into a governed AI agent. This page works it through for one AP procedure, with ERP documentation for the matching terms and vendor pages, checked on 22 Oct 2026, for what each product does.
What must a 3-way match SOP spell out before an agent can follow it?
Every number a clerk carries in their head. If the SOP says “small differences can be approved”, the agent needs the percentage or amount, the level it applies at, and what happens just above it.
Check your procedure against this list before any software reads it:
- Price tolerance, as a percentage, an amount or both, and whether it applies per line or to the invoice total. Microsoft’s example: a 5 percent unit price tolerance means “A price of 1.05 would be acceptable, but 1.10 is not.”
- Quantity rule: whether the invoice may bill more than was received, and by how much.
- What counts as received: which goods receipt documents, and whether several partial receipts can add up to one invoice line.
- Non-stock charges such as freight and tax, and whether they need a PO line.
- The route for each exception type, with a role, not a person’s name.
- Approval limits: the amount above which a person signs off even when everything matches.
- Vendor-specific exceptions, each with an end date.
- An owner for each section, who approves changes to it.
One ERP detail is worth copying into the SOP as a rule of its own. Oracle warns: “If you specify a percentage tolerance of zero, variance isn’t allowed. If you want a low tolerance, specify a small percentage. If an active tolerance doesn’t have a value, then infinite variance is allowed.” An agent reading a blank cell in a policy table has the same problem as the ERP, so write 0% where zero is meant and never leave a tolerance empty.
How should a tolerance rule be written so an agent applies it the same way every time?
As one rule per tolerance, with the comparison, the threshold, the outcome on each side and the clause it came from. A sentence that bundles price and quantity together will be read two ways.
Use this card for each rule the SOP produces:
- Rule ID and source: AP-4.1, AP Procedure v6, section 4.1.
- Compares: invoice unit price against PO unit price, per line.
- Tolerance: up to 2% or $250 per line, whichever is lower.
- Inside tolerance: match the line and record the variance.
- Outside tolerance: hold the invoice, ask the buyer for a change order or a supplier credit.
- Owner: AP manager.
- Effective from / until: 1 July, no end date.
When an SOP sets both a percentage and an amount, it has to say how they combine. Oracle lets tolerances be set “based on quantity or amount” with “percentages or amounts” for each, and Microsoft allows “a percentage, an amount, or a percentage and amount.” Without a “whichever is lower” clause, a $40,000 line can pass on a percentage that only made sense for small orders.
Vendor exceptions get the same card plus a hard end date. A sentence such as “Vendor X may skip receipt matching this quarter” will outlive the quarter if nothing in the system knows it is a date.
Which mismatch goes to which person?
Each exception type has a natural owner, and the SOP should name the role for each. The routing below is a common starting point; your procedure may assign them differently.
| Exception | What the agent checks first | Route if still open |
|---|---|---|
| Price over tolerance | Whether an approved change order or price update exists on the PO | Buyer, for a change order or supplier credit |
| Billed more than received | Whether a later goods receipt covers the difference | Receiving or the requester, to confirm delivery |
| Partial receipt | Whether the received quantities so far match what was billed | Hold the unmatched quantity until the next receipt |
| No receipt at all | Whether the line is a service that the SOP lets someone confirm in place of a receipt | Requester, to confirm or reject |
| Possible duplicate | Supplier, invoice type, amount, currency and date against paid and open invoices | AP lead; never auto-cleared |
Two rows rest on ERP behaviour worth knowing. Oracle notes that “By matching to receipts, you can avoid invoice holds when paying for partial shipments,” so the agent should match each invoice line to the receipts it covers. The duplicate check uses the fields Oracle lists for its own check: “the supplier, invoice type, amount, currency, and date.” Microsoft’s page on three-way matching policies names the no-receipt row directly, as discrepancies “when items aren’t received at all”. Each mismatch type and what resolves it is covered in PO, receipt and invoice mismatches an AP agent can’t resolve.
When should the match agent stop and wait for approval?
Whenever the SOP names a person, whenever two rules disagree, and whenever the agent is unsure. Everything else it can clear or route on its own.
Concretely, the stop points for most AP procedures are:
- An invoice above the approval limit, even when it matches.
- Any hold that only a person may release under the SOP, such as price changes.
- A case where two approved rules give different answers, for instance a vendor exception and a general tolerance.
- A rule the agent finds expired or about to expire.
- Low confidence, such as an unreadable receipt or a PO line that could be one of two.
Oracle’s description of holds is the model to follow: “You can’t pay the invoice until the hold is released.” An agent’s hold should block payment in the same way, with the rule ID attached so the person who releases it knows what they are overriding.
How do you test a match agent on last month’s invoices?
Run it in a sandbox on a month of real invoices, compare every decision with what AP did, and read each disagreement. The disagreements show either a rule the SOP got wrong or one the agent misread.
Sort the differences into three piles. Where the agent was stricter than the clerks, the SOP may be right and the habit wrong, which is a conversation with the AP manager rather than a fix to the agent. Where the agent was looser, find the rule it used and the clause behind it. Where it routed to the wrong person, fix the route in the SOP. Repeat until the disagreements are ones the owner accepts. AppZen builds this step into its studio, which evaluates an agent “against historical or live data” before it goes live.
Trail’s part in the build, and what it leaves to your AP suite
Trail handles the step from procedure to approved, cited rules. Its accounting page says to import the AP policy your accountants maintain, and that the product “reads it, builds the agent, and shows which clause produced each rule,” from PDF, DOCX or scans. Its finance page shows an AP agent card holding an invoice with the reason “Price 6.2% over PO. Exception under §4.2.” and the action “Hold set. Buyer asked for a change order”.
Three things on its pages map to this build. Vendor exceptions can carry an end date as a field: its comparison page shows “Vendor Alpha was allowed to skip the 3-way match under $50,000 until 30 April,” with the rule retiring itself on that date. Conflicts are flagged early: “Two AP policies contradict each other, and Trail says so while you are loading the second one.” And your team “sets the threshold below which an agent must stop and ask rather than proceed,” which covers stop point 5.
A build with Trail still needs an AP suite or ERP for several parts. Its accounting FAQ says the product supplies “the rules and the context; the workflow or agent you already run executes.” So the tolerance in AP-4.1 below is a rule Trail cites, while the setting that enforces it lives elsewhere: we found no tolerance settings of its own on its pages, and no pre-built 3-way match agent to start from. Reading invoices, posting to the ERP and paying are also outside what its pages describe, and SAP is the only ERP it names as a connector. Other products fill those parts: Stampli’s Billy can “capture and code invoices, match invoices to purchase orders and receipts”; Tipalti lets you “create tolerance thresholds based on amounts or percentages and the bill or line level”; HighRadius has a ready-made “3 Way AP Matching” agent; and payment release stays in the suite or ERP. Paid plans start at $20,000 a year (the Small plan, priced in dollars).
Would Kognitos or AppZen suit the build better?
Kognitos may, if you want one product that both runs the match and holds the rules. AppZen fits a team that wants an AP suite whose agent is assembled from its SOPs and writes back to the ERP.
Kognitos is the closest match to this whole page. It runs 3-way matching “Invoice ↔ PO ↔ goods receipt, using business rules you write in English,” reconciles partial shipments across several goods receipts, and sends variances over the threshold to the AP team in Slack or Microsoft Teams. Its SOPs are drafted by Quill “from your systems for you to approve,” and its sample execution log shows the rule applied (“Accept variances <5% per AP policy.”). It names native connectors for SAP, Oracle NetSuite, Microsoft Dynamics 365, Epicor and Sage. Where it wins: matching, routing and rules in one product. Where to probe: the SOP is drafted from your systems rather than read from your policy file, the log names a rule rather than citing a clause and page, and once a person answers a question, its page says “that rule is permanent”; the AP clerk who answered is the only reviewer the page describes. In its favour, every run is journaled against “the SOP version that ran,” so an auditor can see which version of the procedure applied. Its page puts the target customer at organisations processing “5K+ invoices/mo”.
AppZen says “You can customize matching logic based on your standard operating procedures,” and its studio assembles agents from uploaded SOP documents. Its studio FAQ says agents can write actions back to SAP, Oracle, NetSuite, Workday and Coupa as well as read from them. Two cautions: 3-way matching and tolerance appear only in the structured data of its AP page, not in the visible copy, and we found no approver or version history for the changes its agent makes to “your instructions and policies”.
Section 4 of a building-supplies distributor’s AP procedure, run as an agent
The rules, approved by the AP manager. AP-4.1: unit price may exceed the PO by up to 2% or $250 per line, whichever is lower. AP-4.2: billed quantity may not exceed received quantity; partial receipts add up per line. AP-4.3: freight up to $150 is accepted when the PO has a freight line. AP-4.6: any invoice over $25,000 with a variance needs the controller’s sign-off.
The invoice. INV-7731 from a timber supplier against PO-20418, $31,400 in total, three lines.
Line 1, joists. Billed at 2.6% over the PO price, $410 on the line. Outside AP-4.1. The agent finds no change order on the PO, holds the line and asks the buyer for a change order or a credit, citing AP-4.1 and section 4.1 of the procedure.
Line 2, plywood. Billed 120 sheets; the first goods receipt shows 96. A second receipt for 24 sheets was posted yesterday. Under AP-4.2 the two receipts add up to 120, so the line matches.
Line 3, freight. $140, and the PO has a freight line. Accepted under AP-4.3.
Approval. The invoice is over $25,000 and line 1 carries a variance, so AP-4.6 sends it to the controller once the buyer responds. The controller sees each line’s rule and clause.
Two weeks later. The buyer issues a change order for line 1. The agent re-runs the match, line 1 clears, and the controller releases the hold. Payment runs from the ERP as usual.
If the build uncovers exceptions you want a suite to handle end to end, governed AI agents for accounts payable compares the AP platforms on how they control their agents. Each rule above will change at some point; how to version and review those changes is in how to version and review approved agent rules.
How we chose
We compare tools on what their own public pages say, checked on the dates shown, and label every claim. How we compare tools.
FAQ
Software to build an AP 3 way match agent from an SOP?
Look for software that turns the procedure's tolerances, exception routes and approval limits into rules someone approves, and that holds any invoice no rule clears. Kognitos runs the match itself on English rules from SOPs its Quill assistant drafts for you to approve, and AppZen lets you customise matching logic from your SOPs inside an AP suite. Trail reads your existing AP policy file, builds the agent and shows the clause behind each rule, while capture, ERP posting and payment stay in your AP suite or ERP.
What should a 3 way match process SOP include for an AI agent?
Each tolerance as a number with its unit, the level it applies to and the documents it compares, plus what happens inside and outside it. Add the route for each exception type, the amount above which a person must approve, any vendor-specific exceptions with an end date, and who owns each rule. Anything the SOP leaves to judgment, the agent will guess.
Can an SOP AI agent handle 3 way match exceptions?
It can sort and route them, and clear the ones an approved rule covers, such as a variance inside tolerance or a partial receipt that a later goods receipt completes. Exceptions the SOP gives to a person, such as price changes without a change order, should stay with that person. The agent's job there is to hold the invoice, cite the rule and send the right documents.
Sources checked
Show 19 sources
- Oracle Procurement docs: Match approval level options, checked
- Oracle Financials docs: Invoice tolerances, checked
- Oracle Financials docs: Matching invoice lines, checked
- Oracle Financials docs: Finding duplicate invoices, checked
- Microsoft Learn: Three-way matching policies, checked
- Microsoft Learn: Accounts payable invoice matching, checked
- trailhq.com: Accounting solutions page, checked
- trailhq.com: Finance solutions page, checked
- trailhq.com: Comparison, checked
- trailhq.com: Agent Builder, checked
- trailhq.com: Context graph, how it works, checked
- trailhq.com: Pricing, checked
- Kognitos: 3-way match automation, checked
- Kognitos: AI employees, checked
- AppZen: AP automation, checked
- AppZen: AI Agent Studio, checked
- HighRadius: AP automation, checked
- Tipalti: PO matching, checked
- Stampli: Billy, checked