How to Match Supplier Invoices to Purchase Orders Automatically

Coding Liquids tutorial cover featuring Sagnik Bhattacharya for How to Match Supplier Invoices to Purchase Orders Automatically.
Coding Liquids tutorial cover featuring Sagnik Bhattacharya for How to Match Supplier Invoices to Purchase Orders Automatically.

Give every stock order a purchase order number suppliers must quote, capture invoices with a tool that reads PO numbers and line items, and let a matching step compare each invoice with its PO and with what was delivered, inside tolerances you set (say 2 per cent on price). Matches go for approval; exceptions go to a person.

The automation is only as good as the paperwork behind it. Most small businesses that try this find that half their suppliers never quote the PO number, supplier names differ between the capture tool and the accounts, and nobody records what actually arrived. Fix those three things and matching mostly runs itself. Where suppliers still will not quote PO numbers, an AI step can propose the right order from the invoice's contents, as long as a person confirms it and it cannot pick an order that was already billed.

Follow me on Instagram@sagnikteaches

Two-way or three-way: pick the match that fits your deliveries

Two-way matching compares the invoice with the purchase order: right supplier, right items, right prices, quantities no higher than ordered. Three-way matching adds a third document, the goods received record (a signed delivery note or a receiving entry), so you only pay for what arrived.

Connect on LinkedInSagnik Bhattacharya
What you buyMatch to useWhy
Food, drink and anything sold by weightThree-wayDelivered weight and quantity often differ from the order
Stock for resale in counted unitsThree-wayShort deliveries are common and easy to miss
Packaging and consumablesTwo-way, three-way for large ordersUsually delivered complete; check big pallets
Services at a fixed priceTwo-wayNothing physical to count
Utilities, rent, subscriptionsNo PO; simple approvalRecurring and predictable

What has to be true before anything can match

Work through this list before choosing a tool. Each item has a reason and a quick way to check it.

Subscribe on YouTube@codingliquids
  • Every stock order has a PO number. Why: it is the key the match hangs on. Check: pick last month's ten largest stock invoices and see how many had a PO.
  • Suppliers quote the PO number on invoices. Why: without it, matching falls back to guessing. Check: count how many of those ten invoices show it. Then email suppliers who do not, with the wording below.
  • Supplier names are identical everywhere. Why: Dext, for example, needs the supplier name in Dext to match the accounting system exactly before it shows open POs. Check: compare your supplier list in both systems for near-duplicates such as "Hillside Dairy" and "Hillside Dairy Co-op".
  • Units agree. Why: a PO in trays of 30 eggs and an invoice in dozens will never match. Check: open the POs for your five largest suppliers and compare the units with their invoices.
  • Deliveries are recorded. Why: three-way matching needs a received quantity. Check: can you find last Tuesday's delivery notes in under a minute?
  • POs are in the right status. Why: tools only match against open orders. Dext matches against Draft or Approved POs in Xero and Open POs in QuickBooks Online, and only syncs POs created in the last six months.

Wording for the supplier email:

Subject: Please quote our PO number on invoices from [date]

Hello [name],
From [date] every order we place will carry a purchase order number (for example
PO-1187). Please show it on your invoice, ideally in the reference field. Invoices
without a PO number will still be paid, but they go into a manual queue and may
take longer. If one invoice covers several orders, please list each PO number.
Thank you, [your name]

Tools that do the matching

You may already have most of what you need. Purchase orders exist in Xero, and in QuickBooks Online on the Plus and Advanced plans.

ToolWhat it doesDetails worth knowing
Xero purchase ordersCreate a bill from an approved PO, entering the quantity received on each lineSupports several bills from one PO; the PO shows what has been billed and is marked Billed when everything is received
Dext Purchase Order MatchReads the PO number from a captured invoice and matches it to an open PO in Xero or QuickBooks OnlineNeeds exact supplier names; one PO per cost item, not several; PO marked Billed in Xero (if enabled) or Closed in QuickBooks Online after matching
Dext Line Item ExtractionCaptures individual lines (product, quantity, price) from invoices, receipts and delivery notesCan be switched on per supplier, so only suppliers that need line-level checks use it
ApprovalMaxBill-to-PO matching with approval workflows for Xero, QuickBooks Online and NetSuitePO matching is on its Advanced and Premium plans; matched bills from trusted suppliers can be approved automatically (on QuickBooks Online and NetSuite, with Xero listed as coming soon); every match is logged in the audit trail
An AI step in Zapier or MakeReads invoice text and proposes the matching PO when there is no PO numberYou build and maintain it; best as a fallback for a handful of suppliers

A common setup for a small business: capture invoices in Dext with line items switched on for the suppliers who deliver by weight, match to Xero or QuickBooks POs, and use an approval tool only if several people approve spending. If you are still choosing a capture tool, see Dext vs Hubdoc.

Setting tolerances: how close counts as a match

A tolerance is the difference you are willing to let through without a person looking. Too tight, and every invoice becomes an exception; too loose, and overcharges go straight to payment. These are illustrative starting points for a food retailer; adjust them after a month of real exceptions.

CheckToleranceReason
Unit price vs POUp to 2% or $0.05 a unit, whichever is smallerCatches price rises without flagging rounding
Quantity of counted items vs receivedExactYou either got 30 trays or you did not
Weight of weighed goods vs receivedUp to 3%Allows for normal variation in weighed produce and meat
Invoice total vs PO totalUp to 1% or $10Final safety net on the whole invoice
Lines not on the PO (delivery charges, surcharges)NoneNew charges always need a person
Substituted productsNoneA different product needs agreeing, even at the same price

Invoices with no PO number: an AI match with guard rails

Small producers, market growers and one-person suppliers often invoice from a phone app or by hand. For these, an AI step can compare the invoice's contents with your open POs. Feed it the extracted invoice text and a short list of candidate POs from that supplier only.

Invoice text (extracted):
"Hillside Dairy Co-op  Invoice 88213  12 Sep
Whole milk 2L x 120 @ 1.42 = 170.40
Semi-skimmed 2L x 90 @ 1.38 = 124.20
Double cream 300ml x 48 @ 1.95 = 93.60
Delivery 12.00      Total 400.20"

Open POs for this supplier, not yet fully billed (attached as JSON):
PO-1187 (week of 8 Sep): whole 2L x 120 @1.42, semi 2L x 100 @1.38, cream x 48 @1.95
PO-1193 (week of 15 Sep): whole 2L x 120 @1.42, semi 2L x 100 @1.38, cream x 48 @1.95

Which PO does this invoice belong to? Only choose a PO whose week includes the
invoice date. Compare each line: quantity, unit price, line total. List every
difference and any invoice line not on the PO. Answer "NO CONFIDENT MATCH" if
two POs fit equally well.

An illustrative reply:

Match: PO-1187 (invoice date 12 Sep falls in week of 8 Sep).
Whole milk: matches (120 @ 1.42).
Semi-skimmed: invoice 90, PO 100. 10 fewer; check delivery notes for a short delivery.
Double cream: matches.
Delivery 12.00: not on PO. Needs approval.
Arithmetic check: lines sum to 400.20. Matches invoice total.

This is a good result, and the guard rails made it good. On a first version without the date rule and the "not yet fully billed" filter, the model picked last week's PO because the lines were identical, which would have marked the wrong order as billed. Keep the AI's answer as a suggestion shown to the person approving, never as an automatic posting. The approach to capturing the text in the first place is in AI invoice processing for supplier bills.

Goods received: making the third document easy

Three-way matching fails in small businesses for one reason: nobody records what arrived. Make receiving a 30-second job at the back door.

  1. Whoever takes the delivery checks the count or weight against the delivery note and writes any difference on it ("27 trays, not 30").
  2. They photograph the signed note with a phone and send it to the capture tool's upload address or a shared folder, named with the supplier and date.
  3. Line extraction (or an AI step) reads the received quantities into a simple receiving log: date, supplier, PO, item, quantity received.
  4. The match compares invoice quantities with the receiving log, not with the PO.

If you want received quantities to update stock at the same time, whether AI can read delivery notes and update stock covers the setup and its limits.

A fortnight of supplier invoices at a farm shop

An illustrative farm shop with a butchery counter and café buys from about 25 suppliers: a dairy co-op, egg and vegetable farms, a bakery on a daily standing order, a meat supplier invoicing by weight, cheese and jam makers, and packaging firms. Before automation, the bookkeeper spent about six hours a fortnight ticking invoices against delivery notes, and short deliveries were usually spotted weeks later, if at all.

After three months of the setup above, a typical fortnight of 64 invoices looked like this:

OutcomeCountNotes
Matched automatically inside tolerance38PO number read by the capture tool; lines within tolerance
Matched via AI suggestion, confirmed by a person9Growers and makers who never quote PO numbers
Exceptions needing a decision11See below
No PO expected (plumber, fuel, repairs)4Sent to non-PO approval
Duplicates stopped2Same invoice number resent by email
Total64

The eleven exceptions: four meat invoices where invoiced weight exceeded received weight by more than 3 per cent; three cheese invoices at a new price 6 per cent higher (accepted, with the PO prices updated); two egg deliveries short by three trays each but invoiced in full; one substitution of vine tomatoes for heritage tomatoes at a higher price; and one $15 delivery charge not on the PO.

Money kept that fortnight: $54 in short-delivered eggs (six trays at $9) credited, about $48 in overweight meat invoices corrected, and $598 across the two duplicate invoices that would otherwise have been paid twice. None of it is large on its own; over a year the pattern is. The bookkeeper's time fell to about two hours a fortnight, mostly on the eleven exceptions.

The exceptions, and what to do with each

  • Short delivery, full invoice. Approve only the received quantity, or hold the invoice, and ask the supplier for a credit note. Do not edit the supplier's invoice yourself; the credit note keeps both sets of books agreeing.
  • Over-delivery. Decide whether you want the extra. If you keep it, update the PO so the match passes and the history is honest.
  • Price change. Accept or dispute, then update the PO price for future orders. A price that changes without notice twice is worth a conversation, and a reason to check your supplier price tracking.
  • Substitution. Treat it as a new line. Agree the price, then add it to the PO. Otherwise your margin reports carry the wrong cost.
  • Surprise charges. Delivery, fuel or small-order surcharges not on the PO need an explicit yes. If they are regular, add them to future POs.
  • One invoice, several POs. Dext matches one PO per cost item, so split the invoice by PO or match in your accounting software, where one bill can draw from several orders.
  • Credit notes. Match them to the original invoice and PO, so the PO's billed quantity drops accordingly.

What changes for other kinds of stock

  • An online clothing shop receiving from a manufacturer should match at size and colour level, not style level. An invoice for 200 jackets can match the PO in total while the delivery is 40 short in medium and 40 over in extra large, which is the size you cannot sell.
  • A wine merchant taking mixed pallets needs case counts per wine and a breakage line on the receiving log, because a supplier credit for two broken bottles is only claimable if someone wrote it down at the door.
  • A craft brewery buying malt by the tonne can use the weighbridge or delivery ticket as the received record, and agree a weight tolerance with the maltster in advance so a small difference on a large delivery is not argued about invoice by invoice.

Controls that stop a matched bill from being the wrong bill

A perfect match on a fraudulent or duplicated invoice is still a loss. Add these alongside the matching:

  • Duplicate checks on supplier plus invoice number, and on supplier plus amount within 30 days. The two duplicates in the example were caught this way. Catching duplicate invoices and payment fraud with AI goes further.
  • Bank detail changes confirmed by phone on a number you already hold, never by replying to the email that requested the change.
  • Separation of duties where you can: the person who raises a PO is not the only one who approves the bill.
  • Spending limits on who can raise POs and for how much. Setting spending rules and approvals helps you draw them up.

Rolling it out one supplier at a time

Switching every supplier over at once creates a month of exceptions and a bookkeeper who gives up on the system. Rank suppliers instead, and start where the effort pays back fastest. The farm shop's first ranking looked like this:

SupplierInvoices a monthPast problemsQuotes PO numbers?Start in
Meat supplier (by weight)8Weight differences, frequentYes, once askedWeek 1
Egg farm8Short deliveriesNo: AI fallbackWeek 1
Dairy co-op4Occasional short linesYesWeek 2
Bakery standing order4RareYes, against one weekly POWeek 3
Packaging firms3RareYesWeek 4
Seasonal growersVariesPrice changes mid-seasonNo: AI fallbackAfter a month

Two weeks per group is usually enough to tune tolerances before adding the next. Keep a short log of every exception and its cause during the rollout; by week four it tells you which tolerances are wrong and which suppliers need a conversation rather than a setting.

Measuring whether matching is working

  • Automatic match rate: invoices matched without a person, as a share of PO invoices. In the example, 38 of 58, about two-thirds. Aim to raise it by getting more suppliers to quote PO numbers, not by loosening tolerances.
  • Exception reasons: tally them monthly. If most are weight variances from one supplier, that is a supplier conversation.
  • Time from invoice received to approved: matching should shorten it and help you take any early-payment discounts.
  • Money recovered: credit notes for short deliveries and corrected overcharges. It is the easiest number to show that the process pays for itself.
  • POs left open: old POs that never got billed usually mean an invoice matched to the wrong order or a delivery that never came.

Getting the order right at the start makes every later match easier; automating purchase orders and supplier emails with AI covers raising POs from stock levels in the first place.

Invoice matching: what small buyers ask

Do I need a purchase order for every purchase?

No. Most small businesses use purchase orders for stock, ingredients and anything over a set value, and treat rent, utilities, subscriptions and small one-off spends as non-PO bills that go through a simple approval instead. Write the rule down, for example a PO for all stock purchases and anything over $250, so everyone knows which invoices should have a match.

What if my accounting software has no purchase orders?

Check your plan first: QuickBooks Online includes purchase orders on its Plus and Advanced plans, and Xero has purchase orders too, though entry-level plans can limit how many bills you enter. If yours does not, a purchasing or approval tool that connects to your accounts can hold the POs, or a shared spreadsheet of orders can act as the PO list for an AI-assisted match while you decide.

Is three-way matching overkill for a small business?

Not if you buy goods whose delivered quantity or weight can differ from what was ordered, such as food, drink or anything sold by weight. That is exactly where two-way matching lets you pay for things that never arrived. For services and fixed-price items, two-way matching against the PO is usually enough.

How do I handle daily standing orders such as bread or milk?

Raise one standing purchase order per supplier per week or month, listing the expected daily quantities and prices, rather than a PO per delivery. Match each invoice against that PO and the delivery notes for the days it covers, and reset the PO when prices or quantities change. Tools that support partial billing make this far easier.

Further reads

Sources: Xero Central on creating bills from purchase orders; Dext Help Centre on Purchase Order Match and Line Item Extraction; ApprovalMax PO matching product page; QuickBooks Help on purchase orders (Plus and Advanced).

Want your supplier bills matching themselves?

On a 1:1 call we'll look at how you order, receive and approve supplier bills, set tolerances that fit your goods, and choose whether your accounts software, a capture tool or an approval app should do the matching.

Book a 1:1 call with me