Handling incoming invoices is the job somebody does at every company and nobody enjoys anywhere: saving attachments from e-mail, retyping the data, checking it, forwarding it to the accountant. In this article I show what the same process looks like with artificial intelligence, and not in theory: I built the system described here, and it runs in production on the German entsorgo waste-management platform, processing the invoices of a nationwide partner network.
Why traditional OCR is not enough
OCR (text recognition) has been around for decades, and all it does is read the text off the image of a document. Working out who the supplier is, which number is the grand total and how the line items belong together is a separate job: extraction. Rigid, template-based extraction can fail on a layout it has not seen; modern document processors and language models can handle that variety more flexibly, but their output still has to be validated. And if you can get reliable structured XML or data from an invoicing API, use that first. Do not rebuild it from a picture.
How a production system is built
The AI alone is not enough; reliability comes from the process built around it. This is how I built the chain:
- Intake: invoices arrive by e-mail or upload, every document gets an identifier, and nothing can be lost.
- Extraction: the LLM turns the invoice into structured data against a fixed schema: supplier, invoice number, dates, line items, net, VAT, gross.
- Rule-based validation: the AI's output is never trusted blindly. Separate, conventional code checks that the line items add up to the total, that the VAT arithmetic is right, and that the tax number has a valid format.
- Matching: the system links the invoice to its order or contract and compares it with the expected amount.
- Discrepancy handling: anything that does not match (a different amount, an unknown item, a suspected duplicate) goes into a human approval queue; everything else flows through on its own.
- Handover to bookkeeping: approved items leave the system ready to book, via export or API.
The key phrase is human-in-the-loop: the human does not disappear from the process, they move to where a real decision is needed. The machine carries the routine, the human handles the exceptions.
- Definition Human-in-the-loop
A process where the machine decides but a person approves before the decision has financial consequences. In invoice processing that is the difference between a demo and a production system: the question is not whether the AI gets it right, but what happens when it does not.
What we learned in production
At entsorgo the system processes the supplier partner network's invoices. It replaced most of the manual data entry and cut down on the retyping; the administrators' time moved to the exceptions and the customers. As a rule of thumb: the more invoices flow through a company and the more varied their formats, the bigger the saving. With only a handful of invoices a month it is not worth it: the rollout costs more than it will ever return.
What to check before you adopt it
- Hallucination risk: an LLM can be wrong, so rule-based post-validation is mandatory, along with a confidence threshold (below which the invoice goes to a human automatically), and a link from every extracted field back to the original document.
- Data protection: an invoice carries business and personal data. Clarify where the model runs, what data-processing agreement stands behind it, and whether the provider trains on your data (the right answer: no).
- Integration: the system is only as good as its fit with your existing bookkeeping flow. The goal is not another island, it is that your accountant receives checked, ready-to-book data.
- Regulation: EU invoicing is moving toward structured formats under the ViDA package, with mandatory structured e-invoicing for cross-border B2B from 1 July 2030. Anyone building a process now should design it for machine processing from day one.
What it costs, and when it pays back
The honest answer: it depends on your volume and the number of integrations. The good news is that you do not have to buy the whole system at once: I start every project with a pilot on a narrow set of invoices, against a measurable target (processing time, error rate, manual hours). If the pilot's numbers do not justify continuing, I say so. The payback typically appears where several hundred invoices flow through the company each month, or where invoice entry is the bottleneck at closing time.
If you would like to see what this means on your own invoices, book a consultation: bring 10-20 invoices of mixed quality and I will show you live. :) The service details are on the AI invoice processing page.