Yes, an AI agent can help with the three-way match. But the valuable part isn't the check itself. Most accounting software already compares each invoice with the purchase order and the delivery record. What it can't do is find out why an invoice failed and get it fixed. That's where an agent fits. It works through the stuck invoices, finds the reason, gathers the proof and gives a person a quick decision instead of a long investigation.
And there are a lot of stuck invoices. Ardent Partners puts the average at 18.4% in its State of ePayables 2025 research. That's close to one invoice in five. Below is how I'd build an agent for this, what it should never touch and how to tell if it's working.
What your software already does, and where it stops
The three-way match compares three documents. The purchase order says what you agreed to buy and at what price. The delivery record (accountants call it the goods receipt) says what actually arrived. The invoice says what the supplier wants you to pay. Microsoft's Dynamics 365 documentation explains it simply. The price on the invoice should match the price on the order, and the quantity should match what was received. You decide how big a difference you'll accept, and Dynamics lets you set that limit by item, by supplier or by company.
When the difference is bigger than your limit, the software stops the invoice. In SAP, according to SAP's own help pages, the invoice gets recorded but blocked for payment. That flag is usually where the software ends and people take over. Someone opens the order, checks what the warehouse logged, emails the buyer, emails the warehouse, waits, and then takes the supplier's call about a late payment.
Ardent's numbers show what that costs. On average it takes $9.84 and 8.2 days to process one invoice, and the team that pays the bills spends 21.9% of its time dealing with suppliers. The check itself takes no time at all. The waiting happens in the stuck invoices, where each one sits until the right person answers a question.
Why invoices get stuck
Before you build anything, sort your stuck invoices by reason. The reasons are usually boring, and that's good news. Boring problems can be handled with a simple playbook. These are the common ones.
- The goods arrived, but nobody logged the delivery, so the invoice has nothing to match.
- Only part of the order arrived. The supplier billed for 100 units and the warehouse logged 80.
- A new price or an extra charge that never made it onto the order.
- Different units, like cases on the invoice and single items on the order.
- Shipping or handling fees the order never mentioned.
- A wrong or missing order number, or a second copy of an invoice you already have.
Each reason has a different owner. A missing delivery record belongs to the warehouse. A price change belongs to the buyer. A short delivery or a duplicate is a conversation with the supplier. In my view the slow part is rarely the decision. It's getting the question to the right person and the answer back. That's exactly the kind of work an agent is good at.
How I build the agent
I build this in four layers. The order matters, because each layer limits what the next one can do.
Rules decide, the AI explains
The price and quantity check stays in your accounting software or in plain code. An AI model should never be the one deciding if $1.07 is within 5% of $1.00. The agent starts from the result of the check and works on what failed.
It can read everything but change almost nothing
The agent reads orders, delivery records, supplier details, the invoice itself and past emails with the supplier. It only writes notes, reasons, tasks and drafts. It doesn't change orders, edit supplier records, approve price differences or release payments. Those limits are built into the system's access rights, not just written in its instructions, so a confused agent can't step past them. Our note on permission boundaries shows how to set that up.
A simple playbook for each reason
For every stuck invoice, the agent names the reason, pulls the proof (the order line, the delivery record, the invoice line and recent invoices from the same supplier) and follows the playbook for that reason. If the delivery record is missing, it asks the warehouse what arrived and when. If the price is different, it sends the buyer both prices side by side with one question, accept or reject. If less arrived than was billed, it drafts a request to the supplier for a corrected invoice or a credit. If it looks like a duplicate, it holds the invoice and shows both copies next to each other.
When the warehouse logs the delivery or the buyer answers, the agent runs the check again. If it passes, the invoice moves on to approval and nobody had to chase anything.
Every step leaves a trail
Every action is logged with the proof the agent used and the message it sent. So when an auditor asks why an invoice went through with a 6% price difference, the answer is right there. The buyer's reply, the date and both prices.
What stays with people
The agent prepares decisions. People make the ones that involve money or risk. Accepting a price difference above your limit is the buyer's or the finance manager's call. Changing the limit itself is a policy decision. Credits, disputes and anything that changes what you owe a supplier go through a person, and releasing a payment always needs a human approval. Our approval queue pattern is how we put those decisions in front of people without slowing everything down.
Changes to a supplier's bank details get their own rule. The FBI's 2025 Internet Crime Report counted about $3.05 billion in reported losses in 2025 from business email scams, where criminals pose as a supplier or a boss over email. The 2026 AFP Payments Fraud and Control Survey found that 74% of the US organizations it surveyed were affected by these scams that year. So a request to change bank details that lands in the inbox is never something the agent acts on. It flags the request, and a person checks it by calling the supplier at a number already on file.
The numbers it should move
Measure where you are for a month before the agent does anything. Then track the same numbers every week.
- How many invoices pass the check on the first try, with no human help.
- How many days an invoice sits stuck before it gets fixed.
- How long an invoice takes from arrival to approval for payment. Ardent's average is 8.2 days.
- How often suppliers ask about their payments. This should drop as stuck invoices clear faster.
- Early payment discounts you catch, and late fees you pay.
The gap between average and good is big. Ardent's best companies, the top 20% with the lowest costs and the fastest processing, have a stuck invoice rate 47% lower than everyone else. Discounts are where the math gets interesting. Many suppliers offer 2% off if you pay within 10 days, and otherwise the full amount is due in 30. Skipping that 2% to pay 20 days later works out to roughly 37% a year in interest. And an invoice that sits stuck for two weeks has already missed the window.
How to start without breaking anything
Start with history. Export the stuck invoices from the last 90 days and let the agent tag the reason for each one, without changing anything. You'll see which three reasons cause most of the stuck invoices and which ones cause most of the waiting. Those two lists may not match.
Then let it practice in the background. The agent writes down its diagnosis and what it would do on each stuck invoice, and your team compares that with what they actually did. Once its calls agree with your team's on the common reasons, let it send questions to buyers and the warehouse on its own, and keep supplier emails as drafts a person approves. Our list of seven tests before deploy is a good gate for that step.
The last step is a little freedom. When the warehouse logs a missing delivery and the check passes, the invoice moves on without anyone touching it. Everything else stays assisted. One warning. If your warehouse often logs deliveries days late, fix that first. Otherwise the agent spends its days reminding the warehouse. That helps a little, but it's a process problem dressed up as a software problem.
Before OrbiResearch I ran a logistics company, so deliveries and the paperwork around them are familiar ground for me. I like stuck invoices as a first agent project for companies that buy a lot. The inputs are clear, every stuck invoice has a known owner and the results show up in numbers finance already tracks. If your team spends its week chasing deliveries and buyers, Work with us and tell us what your pile of stuck invoices looks like. For the bigger picture, read our guide to AI agents for accounts payable. And see the Inbox Router case study for a similar first step, a logistics company's shared inbox where invoices arrive mixed in with everything else.