Automating invoice verification in wholesale starts with the order confirmation
If you want to automate invoice verification in wholesale, the invoice is the wrong place to start. A worked example of an agent chain covering order confirmations, purchase prices, goods receipt and invoice matching.
This article was generated by AI. Labelled in accordance with Article 50 of the EU AI Act. Responsible for publication: Sophera Consulting.
Most wholesale distributors who set out to automate invoice verification start with the invoice. Software reads the PDF or e-invoice, compares each line with the purchase order and approves whatever matches. It looks like the obvious route, and we think it gets the sequence backwards. The invoice is the last document in a chain. You can only tell whether it is right if someone recorded along the way what the supplier actually confirmed and which price actually applies.
Below we walk through such a chain with an invented example. It has four steps, and each one hands a checked result to the next. For every step we say whether it needs an AI agent or whether a fixed rule does the job.
Why automated invoice verification in wholesale often starts in the wrong place
A purchase order records what your buyer wanted and expected to pay. Between that and the invoice, plenty changes in wholesale, and much of it is legitimate. The supplier announced a price increase three weeks ago that never made it into your item master. One item is short and ships in two deliveries. The order came in under the free-freight threshold, so there's a freight charge.
Match the invoice against the purchase order and every one of these shows up as an exception. That leaves two bad options. Either a large share of invoices goes back to accounts payable, where someone researches each difference by hand, or you set the tolerance so wide that justified and unjustified differences slip through together. Neither is what you paid for.
The fix is a reference value that gets updated as the order moves along. Every accepted change between order and invoice is recorded where it happens, with the supporting document and the name of whoever accepted it. At the end, the invoice is checked against that record instead of the original order.
The example
This scenario is made up. Names, quantities and terms exist only to show where the work sits.
Say a plumbing and heating distributor places an order on Monday with a valve manufacturer: 200 press fittings, 40 radiator valves and 10 expansion vessels. Purchase prices on the order come from the item master. The annual agreement with this manufacturer locks radiator valve prices until December 31. Three weeks ago the manufacturer sent a circular announcing a four percent increase from the first of the month. The circular sits in the purchasing inbox, and nobody has touched the item master yet.
Step 1: reading the order confirmation
The confirmation arrives on Tuesday as a PDF. An agent matches it to the purchase order by order number. If the number is missing, it searches by supplier, item numbers and quantities, and shows the likely match to a person rather than assuming it. Then it compares each line on item, quantity, price and delivery date.
In our example that turns up three findings. Fittings and valves both come back four percent above the ordered price. The expansion vessels have the right price, but the supplier confirms 6 this week and 4 in three weeks.
The agent doesn't settle any of it. It sends the responsible buyer a proposal: split the vessel line into two scheduled deliveries and pass the later date to inventory planning. The two price differences move on to step 2. Whatever the buyer accepts becomes the new reference for the invoice. Whatever they reject stays open and goes back to the supplier. Our article on suppliers confirming something other than what you ordered covers the usual deviations and why confirmations so often get filed unread.
This is where a language model earns its keep. Every supplier lays out confirmations differently. Split quantities might sit on one line or on three, and a note like "price as per circular" tends to hide in the footer. Once the document has been read, a plain rule handles the comparison.
Step 2: which purchase price applies
A higher price on the confirmation doesn't tell you whether the supplier is entitled to it. Step 2 answers that question. It needs the supplier's terms in a form you can query: price lists with validity dates, price locks from the annual agreement, volume tiers, the free-freight threshold and surcharges.
For the fittings, the check finds the circular and no price lock, so the increase is covered. The buyer confirms it, the new cost goes into the item master, and sales gets a note that margin on this item has just shrunk. What tends to happen to selling prices without that note is covered in our piece on where wholesale margin leaks.
For the valves, the check finds the same circular plus the price lock until year end. This increase isn't covered. The agent drafts a query to the supplier citing the agreement, and the buyer reviews it before it goes out. The reference price for the invoice stays where it was.
Most of the work in this step happens before go-live. Plenty of distributors keep supplier terms as prose in annual agreements, circulars and email threads. A language model can pull them out on the first pass. Someone who negotiated the agreement should still read the result, because exceptions like to hide in a subordinate clause. For your ten largest suppliers, a rough estimate is a few days of work.
Step 3: what actually arrived
On Thursday the fittings, the valves and 6 expansion vessels arrive, and the warehouse books the goods receipt. For every line the chain keeps four running quantities: ordered, confirmed, received and invoiced. This step works without AI, but it depends on the warehouse booking receipts the same day. If the warehouse enters a whole week's receipts on Friday afternoon, every invoice waits until then. Why the goods receipt belongs in the match at all is explained in our article on three-way matching.
Step 4: the invoice
The invoice comes in on Friday. Reading it is the smaller job, and with a structured e-invoice there's hardly anything left to read. Each line is matched against the record the first three steps have built.
Against the original order, the fittings would be an exception. Against the confirmed price they are correct and go straight through. The valves carry the increase too, even though the query to the supplier is still unanswered, so that line is blocked with a reference to the query and the price lock. On the expansion vessels the supplier bills 10 while 6 were received, and that line is held as well. Finally there's a 35 euro freight charge on an order that was above the free-freight threshold in the supplier's terms, which gets blocked too.
Accounts payable ends up with three cases, each with a reason and the documents attached. Nobody has to pick apart an invoice with four differences. Approved lines go into the payment run, sorted by discount deadline. For the blocked lines the agent drafts a reply to the supplier, and a person checks and sends it.
Why a chain and not one big agent
You could hand all four steps to a single agent that passes judgment on the invoice at the end. We prefer the chain, mostly because every step has an owner. Purchasing decides on confirmations and terms, the warehouse books receipts, and accounts payable releases payment. When a step gets something wrong, its log shows where, and the person responsible fixes it there. If one agent does everything in a single pass, every question lands in accounts payable, even when the cause sits in purchasing.
A chain can also go live one step at a time. Step 1 is useful on its own, because changed delivery dates reach planning days earlier. Invoice verification at the end gets more precise with every step you add.
One limit applies to every step. The language model reads documents and drafts proposals. Rules and people decide whether a price applies and whether a line gets paid or blocked.
What the chain can't do
No check can know terms that aren't written down. If the manufacturer's sales rep promised a special price on the phone and there's no email to back it up, the chain blocks the invoice, rightly, and someone has to chase it. That's annoying at first. Over time it gives you a good reason to insist on such promises in writing.
Plan for a ramp-up period too. In the first weeks more documents end up with a person than later on, because terms are missing or a supplier structures its confirmations in some unusual way. How many depends heavily on how complete your terms data is, and nobody can give you an honest figure before they've looked at a sample of your own documents.
Where to start
Pull the last 50 supplier invoices that got stuck in approval and note the cause for each one. If most of the differences were already visible on the order confirmation, start the chain there. If many came down to prices nobody could explain, capture the terms of your ten biggest suppliers first. And if quantities are the main problem, look at how and when goods receipts get booked. We would only start with automated invoice reading once none of these causes dominates.
If you'd rather not do that sorting on your own, Sophera Consulting goes through it with you in the free automation check. We then build the agent chain at a fixed price with no subscription, starting with the step that causes the most back-and-forth in your business.
This article was created with the help of AI.