← News
spracovanie faktúr••8 min read

An AI Agent in Accounting: Processing Incoming Invoices

Accounts payable repeats every month in the same order — which is exactly why an agent suits it. How data extraction works, how invoices are matched against orders, and where the decision has to stay with a person.

An invoice arrives by email. Someone downloads it, opens it, retypes the supplier, the amount, the due date and the reference into the system, finds the matching purchase order, checks that quantity and price line up, assigns a cost centre and sends it for approval. At ten invoices a month that is a few minutes' work. At a thousand it is a full-time job — and a place where errors appear that only surface at audit, or when a supplier sends a reminder.

Accounts payable is therefore one of the first processes companies try to automate. It is also the process where people most often discover that "automation" meant something different from what they expected.

Why invoices suit an agent

The process has three properties that make it a good candidate. It repeats in the same order — receipt, extraction, checking, posting, approval. It has clear rules — an invoice either matches the order or it does not; VAT either matches the rate or it does not. And most cases are boring: eighty percent of invoices are repeat purchases from the same suppliers that pass without a single intervention.

This is the same distinction we make in the piece on where to start with process automation: the processes worth taking first are high volume and low variability. Invoices are the textbook case.

What the agent actually does

It is worth being precise here, because the terms get mixed up. Classic OCR turns an image into text. That is only the first step and not enough on its own — from the text you still have to know which number is the total and which is the taxable base.

An AI agent works a level above that. It reads the document as a whole, pulls out structured data, fills it in from context and then decides what happens next:

  • Extraction — supplier, company and VAT numbers, invoice number, issue and due dates, currency, line items, taxable base and VAT per rate.
  • Supplier identification — not by the name, which is written differently every time, but by company number and bank account against master data.
  • Matching — finding the order the invoice belongs to and comparing the lines.
  • Checks — whether VAT adds up, whether the supplier is a duplicate, whether the invoice has already been posted once.
  • Coding — proposing cost centre, job and account based on how similar invoices were posted in the past.

That last point saves the most time and surprises people the most. The agent does not decide by a rule someone wrote, but from history: if invoices from this supplier were posted to the same cost centre all year, it proposes that again — and says what it based this on.

Three-way matching is where the saving lives

The invoice has to line up with the purchase order (what we ordered) and the goods receipt (what actually arrived). If all three agree, the invoice can go for payment.

Done by hand this is the most tedious part of the job, because it means moving between three systems. The agent does it in one step, because it has access to all three — how that access gets built is covered in our piece on connecting company systems through APIs.

The interesting part is the mismatches, not the matches. An invoice for €1,040 against an order for €1,000 can mean three things: the supplier raised prices, they added shipping, or they made a mistake. A well-configured agent tells these apart and routes each somewhere different — a price difference inside tolerance it approves itself, shipping it adds as a separate line, and where an error is likely it stops the invoice.

Where it breaks

These limits are worth knowing in advance, because they show up in the first month of running.

Suppliers change format. A company that sent PDFs from its accounting system for years suddenly sends a phone photo. An agent that learned one layout cannot cope; an agent that reads the document for meaning can — but with lower confidence, and it has to admit that.

Poor scans. A creased paper invoice photographed at an angle is hard for a person too. The only right answer here is escalation, not a guess.

Foreign currency and rate dates. Conversion is not a multiplication — it matters which rate is used and for which day. That rule has to come from accounting; the agent cannot invent it.

Prepayments and credit notes. Different logic, different posting. If they are left out of the design, the agent will treat them as ordinary invoices and create more work than it saves.

Leave the payment decision to a person

This is a line we recommend holding even where the agent performs reliably. The agent prepares the case, fills in everything it knows, and flags what it is unsure about. Approval and release of payment stay with a human.

The reason is operational rather than technical: a posting error gets corrected, a wrongly sent payment has to be chased. Invoices also carry personal data and company financial data, which needs the same care we describe in the article on AI agents and GDPR.

A good compromise is a band: invoices below a set amount, from a verified supplier, with an exact match to an order go through automatically; everything else lands on someone's desk — but pre-filled.

What to prepare

An agent is not independent of tidy data; quite the opposite. Before rollout it is worth having:

  1. Supplier master data without duplicates, with company numbers and bank accounts.
  2. Order numbers on invoices — if suppliers do not quote them, matching will always limp, and that is fixed by agreement, not by technology.
  3. ERP access to read orders and receipts and to write the proposal.
  4. Tolerance rules — by how many percent or euros an invoice may exceed an order without intervention.
  5. Historical postings for at least a year, so there is something to learn from.

Point two tends to be the biggest obstacle and the cheapest to solve — often it is enough to add the requirement to the order and tell suppliers.

How to tell whether it is worth it

Do not measure the percentage of "successfully recognised invoices". That number looks good and says nothing. Track:

  • The share of invoices that passed without human intervention — the headline figure.
  • Time from receipt to posting — before and after.
  • Number of overdue invoices — automation shows up here sooner than in saved hours.
  • Error rate — how many postings had to be corrected.

In the first month the no-touch share will be low, typically around half, and that is normal. It rises as master data fills in and tolerances are tuned. We take the same approach to measurement in the piece on the ROI of deploying an AI agent.

Where to start

Not with the whole of accounting. Pick one supplier with high invoice volume and a stable format, let the agent run for a month alongside the existing process, and compare the output. When it lines up, add a second.

If you are weighing whether it pays off at your volume, get in touch — we will go through the real numbers with you and say plainly when it does not add up. Examples of similar deployments are in our case studies.

INTERFASE