← Back

AI Invoice Processing: How It Works, with a Matching Example

TL;DR

Extraction can be correct while the invoice still fails approval. Follow a partial delivery through matching, review and payment controls.

Conceptual illustration for AI Invoice Processing: How It Works, with a Matching Example

AI invoice processing uses AI to read invoice data and help match it to business records. A complete workflow also checks purchase orders, receipts and duplicates, then sends discrepancies to an authorised reviewer. Reading a field correctly does not, by itself, authorise payment.

An invoice arrives for 100 components. The purchase order also says 100. The price is correct, the supplier is familiar and the PDF has been read perfectly. Only 80 components have arrived.

Should the system approve the invoice? That depends on the purchasing agreement and your finance controls. A high extraction-confidence score cannot answer it.

AI invoice processing becomes useful when it separates reading a document from deciding what may happen next. The model can extract a supplier reference or suggest a line-item match. Your accounting workflow still needs explicit rules for receipts, discrepancies, duplicates and approval. Start there before measuring how many PDFs the system can read per minute.

What AI should do in an invoice workflow

Think of the workflow as four jobs: capture the document, identify the transaction, check the evidence and route the decision. Different tools may handle each job. You may need document recognition for an inconsistent PDF but ordinary code for totals and an existing finance system for approval.

Microsoft’s invoice-matching documentation distinguishes comparisons against purchase orders from three-way matching that also checks product receipts. That distinction matters more than whether the extraction step uses a language model.

Keep the original document and the extracted fields together. A reviewer should be able to inspect the source behind a disputed quantity without searching an inbox. Store the supplier identifier separately from the supplier name: two businesses can trade under similar names, and a renamed supplier does not necessarily represent a new account.

For an initial pilot, let automation prepare a proposed transaction and its evidence. Keep payment release in the existing authorised process. This preserves a useful boundary while you discover which exceptions actually consume the team’s time.

Diagram showing Order: 100 units, Receipt: 80 units, Invoice: 100 units, Decision: Review 20.
Editorial decision aid; worked examples are fictional, not measured client results.

The invoice is right. The delivery is short.

Consider this fictional example. It is a designed test case, not a Pixelfield client result. All amounts are net; tax treatment is outside the example.

Record Quantity Unit price Net value
Purchase order PO-418 100 £12 £1,200
Recorded goods receipt 80 £12 £960
Supplier invoice INV-762 100 £12 £1,200

The price difference is zero. The unmatched quantity is 20, representing £240 net. None of that tells you whether the supplier has made a mistake. The final delivery might be in transit, the receiving team might not have recorded it, or the contract might permit advance invoicing.

A useful exception record therefore says: “20 invoiced units are not covered by the selected receipt records.” It includes the purchase order, invoice and receipts used in the comparison, plus the person responsible for investigating. It does not declare “fraud” or invent a delivery date.

The next action is to obtain evidence. If the goods have arrived, update the receipt through the authorised receiving process and rerun matching. If they have not, finance applies the agreed handling policy. Recording a liability and releasing a payment are separate decisions; this example is a workflow design exercise, not accounting advice.

Test the changes that a clean demo misses

A pilot with ten tidy PDFs can tell you whether fields are extracted. It tells you little about a month-end queue. Add controlled variations to the same transaction so you know why the outcome changes.

Variation What the workflow should surface What must not happen silently
A second delivery of 20 is recorded Receipts now cover the invoiced quantity Count the first receipt twice
Invoice price becomes £12.50 £50 price difference across 100 units Accept because quantity matches
The same invoice arrives again Possible duplicate with the original transaction reference Create a second payable item
Invoice uses boxes of ten Unit conversion needs an agreed mapping Compare ten boxes directly with 100 units
A credit note follows Link it to the relevant transaction and review status Treat it as another positive invoice
Supplier bank details change Separate supplier-master verification Update payment details from the PDF alone

We checked the simple arithmetic in this fixture locally: the short-delivery case produces 20 unmatched units and £240; the price-change case produces £50. That validates the example’s calculations, not an OCR engine or an accounting integration. The downloadable worksheet includes the inputs and expected exceptions for your own pilot.

Give each exception a route out

“Needs review” is a queue label, not a working process. Someone needs to know what evidence is missing and what they are authorised to change.

Route a missing receipt to the receiving owner. Route a price discrepancy to the purchaser or commercial owner. Route a duplicate candidate to accounts payable with the existing invoice reference. Send a supplier-master change through its separate verification process. One shared queue can support all four, provided the reason and ownership are explicit.

Specify what happens while an exception waits. Does it remain outside the payment run? Can another invoice on the same purchase order proceed? What happens if a corrected document arrives? Preserve the relationship between versions rather than overwriting the history and losing the reason for a decision.

Dynamics 365’s automated invoicing documentation describes receipt matching as a background process with configurable retry limits. This highlights an implementation question worth asking in any system: when should a missing record be retried, and when should a person investigate? A retry is useful when evidence is expected to arrive. It does not fix a wrong purchase order.

Keep approval rules outside the model’s prose

Write tolerances as explicit business rules. Define whether a tolerance is absolute, percentage-based, per line or per invoice, and who can change it. A small percentage on a large invoice can still be a material amount. An acceptable rounding difference should not quietly become permission to approve a quantity discrepancy.

Do the monetary calculation in a deterministic component using appropriate decimal handling. Require a recognised currency and unit before comparing values. Let a model suggest that “widget pack” maps to a catalogue item, but verify the mapping and retain uncertainty when more than one item fits.

Treat text inside invoices as transaction data. A note telling an assistant to bypass checks is not an instruction from your finance team. The integration should enforce allowed actions and permissions regardless of how confidently the model phrases its recommendation. Our AI agent security guide covers that boundary in more detail.

Design for retries without creating a second bill

An integration can fail after the accounting system has accepted a request but before your application receives the response. Retrying blindly can create another transaction. Give each proposed posting a stable identifier and reconcile uncertain outcomes against the accounting system before retrying.

Decide how document duplicates differ from transaction duplicates. Two files may be different scans of the same invoice. Conversely, two legitimate invoices may have the same amount. A file hash helps identify identical uploads, but it is not a complete invoice-duplication policy.

Record the input version, matching result, approval event and posting reference. Avoid storing unnecessary personal or banking information in general application logs. The operator usually needs enough information to find the controlled record, not a copy of the whole invoice in every monitoring tool.

Measure accepted work and exception effort

Report extraction accuracy by field, matching outcomes by exception type and handling time for the whole process. A system that reads PDFs faster but doubles investigation time is not an operational win.

Separate invoices eligible for the pilot from all incoming invoices. If you exclude foreign-currency bills and invoices without purchase orders, make that denominator visible. Track false approvals separately from unnecessary holds: they have different consequences, and an average accuracy number hides both.

Compare against the existing process on the same sample. Include the time people spend checking suggestions, correcting mappings and resolving failed postings. Do not translate every saved minute into cash savings unless the business can actually redeploy capacity or avoid a cost. The AI automation ROI calculator provides a broader way to examine that distinction.

Start with one supplier group and one exception policy

Download the invoice exception worksheet. Fill it with a small, permissioned set of representative documents, including the awkward cases. Agree the expected outcome with finance before testing extraction or posting. Keep live payments out of the first experiment.

If your main problem is identifying fields, scope a document-processing experiment. If fields are already reliable but invoices stall between teams, work on matching, ownership and integration. Those are different projects with different success measures.

Pixelfield’s AI workflow automation service can help connect the document, business rules and exception queue. Bring one complete transaction trail, including a case that went wrong. It will reveal more about the required system than a folder of perfect invoices.

Michal Vávra
Written by
Head of AI & Development

Michal has been with Pixelfield since September 2012 and has held technical leadership roles since 2017. He is the technical force behind our most demanding builds, combining AI expertise with the infrastructure and software architecture needed to make it work in production. His work spans LLM applications, multi-agent orchestration and complex integrations. He sets the engineering standards behind reliability, performance and scale, and guides the team through the decisions that determine how a system runs long after launch.