From incoming invoice to approved payment
Processing an invoice involves several jobs: collecting the file, reading its fields, finding the purchase order, checking delivery and getting approval. Files may arrive through email, supplier portals or scanned paperwork.
Automation can reduce manual entry, but it also needs to handle mismatched amounts, duplicates and missing information. The matching rules and review queue deserve as much attention as extraction accuracy.
The steps, end to end
1. Intake
Invoices arrive through several doors: a dedicated email address, supplier portals, uploads from staff, sometimes an EDI feed from large suppliers. The first job is to collect all of them in one queue, keep the original file, and drop what is not an invoice at all. Newsletters, delivery notes and payment reminders end up in the AP inbox more often than anyone admits.
A simple classification step handles this. Send uncertain documents to a person before passing them into the pipeline.
2. Reading the document
Next comes turning a PDF or an image into text with positions. For digital PDFs this is mostly a matter of extracting the text layer. For scans and photos it is OCR, and quality varies with resolution, skew, stamps and handwriting in the margins.
Plain OCR gives you characters. It does not know which number is the total and which is the VAT registration. We covered that distinction in more depth in OCR vs intelligent document processing, and it matters here because invoice layouts are endlessly varied.
3. Field and line-item extraction
Header fields come first: supplier name, invoice number, dates, currency, net, tax and gross totals, bank details. Then the line items: description, quantity, unit price, amount, sometimes an order line reference.
Header fields are the easier half. Line items are harder, because tables wrap across pages, columns get merged, and some suppliers put three products in one free-text line. Modern extraction combines layout analysis with a language model that reads the table the way a person would, and then hands the result to plain rules that check it. Do the quantities times unit prices add up to the line amounts? Do the lines add up to the net total? Does net plus tax equal gross? Arithmetic catches a surprising share of reading errors before anyone sees them.
4. Supplier matching
The extracted supplier name has to become a supplier record in your accounting system. "ACME Ltd", "Acme Limited" and "ACME UK" may be the same company or three different ones. Matching on tax ID, IBAN or a known email domain is far more reliable than matching on names.
This step also catches fraud attempts. An invoice from a known supplier with new bank details should never post automatically, however confident the extraction looks.
5. Purchase order and receipt matching
For companies that use purchase orders, this is the heart of the process. Two-way matching compares the invoice to the order: right supplier, right items, prices within tolerance. Three-way matching adds the goods receipt: did we receive what we are being billed for?
Tolerances are a business decision, not a technical one. A few cents of rounding difference should pass. A different unit price should not. Partial deliveries, split invoices and orders that were amended after approval are where most matching logic lives, and where most of the effort goes when building the system.
6. Approval routing
Invoices without a purchase order, or above a threshold, need a human approval. The automation's job is to route each one to the right person based on cost center, amount and supplier, chase when it sits too long, and escalate when the approver is away. Approval by email reply or a single click from a phone removes most of the delay.
7. Posting
Finally the invoice is posted to the accounting system with the right accounts, tax codes and cost centers, the original file attached, and an audit trail showing who or what did each step. Complete the validation and approval checks before posting.
Where the errors come from
After the first weeks in production, the same handful of causes show up again and again.
New suppliers. The first invoice from a supplier has no history, no known layout and no verified bank details. Treat first invoices as exceptions by design.
Multi-page tables. Line items that continue on the next page, sometimes with repeated headers or subtotals in between, trip up extraction more than anything else.
Credit notes. They look like invoices with negative amounts, or positive amounts and the word "credit" somewhere small. Posting a credit note as an invoice is an expensive mistake.
Currencies and tax. Foreign currency invoices, reverse charge VAT, mixed tax rates on one invoice. Each needs explicit handling rather than hope.
Duplicates. The same invoice sent by email and uploaded to a portal, or re-sent as a reminder with a new date. Check supplier, invoice number and amount together before posting anything.
None of these are exotic. If a vendor's demo does not mention them, ask.
Exception queues and human review
Send invoices that fail validation to a review queue, with the reason and supporting records attached.
A useful review screen shows the original document next to the extracted fields, highlights the fields that failed a check or where two extractions disagreed, and states why the invoice stopped: price outside tolerance on line 4, no goods receipt for order 1182, bank details differ from supplier record. The reviewer fixes or confirms, and the invoice continues.
Language models do not return a calibrated confidence, so do not rely on a model's own stated certainty to decide what needs review. Build that signal from things you can measure: validation rules and arithmetic checks, agreement between two independent extractions, classifier scores, and comparison against source data such as the purchase order and the supplier record.
Two details make a big difference over time. First, corrections should feed back into the system, so a supplier's layout that caused a mistake once is handled next time. Second, exception reasons should be counted. If one supplier causes a third of all exceptions, a phone call to that supplier may do more than any model improvement.
What to measure
Demo accuracy on a hand-picked set of clean invoices tells you very little. Three numbers from your own production data tell you almost everything.
Straight-through rate. The share of invoices that go from inbox to posted with no human touch. This is the number that maps to saved hours.
Field accuracy. For invoices that were reviewed, how often each field was correct as extracted. Track it per field, because a system can be excellent on totals and poor on line items.
Time to post. From arrival to posting, including approvals. This catches problems that are not about AI at all, like approvers who sit on invoices for a week.
Watch these monthly. A straight-through rate that starts low and climbs steadily as corrections feed back is a healthy project. One that stays flat means the exceptions are not being worked on.
Test a batch of your invoices
Pick one entity, one inbox and the suppliers that make up most of your invoice volume. Collect a few hundred real invoices, including the awkward ones, and measure extraction and matching on those before connecting anything to accounting. Start with automatic posting switched off and a human confirming every invoice, then turn it on for the suppliers and invoice types that have proven reliable.
If you want to talk through how this would fit your own systems, our document processing page explains how we approach these pipelines.


