
Automated accounting document processing is a chain of stages, not a single reading program: intake, classification, data extraction, multi-layer verification, an exception queue for people, indexing and export to the accounting system. Invoices are indexed without errors when the only fields that reach the index are those confirmed by control rules or by an employee. Below we describe such an application stage by stage and explain what the 100% accuracy achieved in one of our deployments means in practice.
Automated invoice processing is usually associated with one question: how well does the system read. In our experience, the outcome is decided by what the application does with the reading afterwards. In one of our deployments, an AI application processes very large volumes of accounting documents and indexes them with 100% accuracy, where classic OCR still makes mistakes. This is possible because the application does not trust a single reading: it combines AI reading with control rules and sends every uncertain field to a person. This article shows how such an application is built, of the kind we design and develop as custom software, and what has to be measured before it goes into production.
Legal status as of November 2026. This article is for information only and is not legal or tax advice.
What is automated invoice processing, and which documents does it cover?
Automated invoice processing is a process in which the application itself receives a document, recognises its type, reads the data, checks it and passes it to the accounting system, while people deal only with exceptions. This class of solutions has become known as intelligent document processing (IDP). Three terms are often confused:
- Digitisation of accounting documents turns paper into a file. A scan in an archive saves space, but it is still an image that someone has to read.
- Optical character recognition (OCR) turns an image into text. The text can be searched, but the software still does not know which number is the gross amount.
- Intelligent document processing ends with data: verified fields saved in an index and passed to accounting, with a history of who confirmed what.
The scope is not limited to purchase invoices. The same application usually handles corrective invoices, pro forma invoices, debit and credit notes, purchase orders, goods issued and goods received notes (known in Poland as WZ and PZ documents), contracts, bank statements and customs documents. Each type has its own set of fields and its own control rules. The mechanisms are shared: the job queue, verification, the index and the audit trail.
What stages does an accounting document application consist of?
An accounting document application consists of seven stages: intake, classification, extraction, verification, the exception queue, indexing, and export with archiving. The table shows what happens at each stage and what it produces.
| Stage | What the application does | What it produces |
|---|---|---|
| 1. Intake | Collects documents from e-mail, the scanner, an upload form, an API and KSeF, Poland’s national e-invoicing system | The original with an identifier, its source and the time of receipt |
| 2. Classification | Identifies the document type and splits combined files | Single documents, each with an assigned type |
| 3. Extraction | Reads the header fields and the line items | Data in a defined structure, with a pointer to the place on the page |
| 4. Verification | Checks every field with rules, master data and a second reading | A status for each field: confirmed or uncertain |
| 5. Exception queue | Shows the employee the uncertain fields together with the document fragment | A human decision recorded in the history |
| 6. Indexing | Saves confirmed fields only | An index record linked to the original |
| 7. Export and archive | Passes the data to the ERP system and archives the document | An entry in the accounting system, an acknowledgement of receipt, an audit trail |
A job queue connects the stages. Every document has an unambiguous status in it, so at any moment you know how many documents are waiting to be read, how many are waiting for a human decision and how many have been exported. A failure at one stage, for example a temporary outage of the ERP system, does not lose any documents. The job returns to the queue and is retried, and once the agreed number of attempts has been used up, the application notifies the administrator.
Intake, classification and extraction: where the application gets its data
Input channels: e-mail, scan, file and XML from KSeF
Documents reach a company by several routes at once, and the application should handle all of them in one place:
- an e-mail inbox dedicated to cost documents, from which the application takes the attachments and keeps the message body as context,
- a scanner that saves files to a designated folder,
- a form in the web or mobile application, which an employee in the field uses to send a photo of a receipt or a delivery document,
- an API for other systems, for example a procurement platform,
- KSeF, Poland’s National e-Invoicing System (Krajowy System e-Faktur), as the source of structured invoices.
The last channel differs from the others. An invoice in KSeF is an XML file in the logical structure known as FA(3) and carries a unique number assigned by the system, so its data does not have to be recognised; it only has to be loaded. Receiving invoices through KSeF has been mandatory in Poland since 1 February 2026, and the dates on which the obligation to issue invoices applies to each group of taxpayers are given by the Polish Ministry of Finance on its page about the legal basis and key dates of KSeF (in Polish). The documents that stay outside the system include invoices from foreign suppliers, pro forma invoices, debit and credit notes and internal documents, as the page on the scope of mandatory KSeF (in Polish) explains. A KSeF invoice also goes through verification, but of the business kind: the application matches it to a purchase order, assigns a cost centre and checks whether the same document arrived earlier as a PDF. The principle is the same for any structured e-invoice: data that arrives as a structured file is loaded, not read from an image. We discuss the mixed inflow in the article on documents outside KSeF.
At intake the application performs a few housekeeping tasks that save a lot of work later. It stores the original unchanged and gives it an identifier. It computes a hash of the file, so the same attachment sent twice is recognised immediately. It records the source, the sender and the time of receipt. It assesses image quality and sends pages that cannot be read back for rescanning instead of passing them on.
Classification
Classification answers two questions: what type of document this is, and where in the file the document begins and ends. One PDF may contain an invoice, a specification and an acceptance report, or several invoices scanned in one run. The document type determines which fields will be read and which rules will apply. For that reason an unrecognised document goes to a person, not to the “nearest” category.
Data extraction
The reading method depends on what the document is. An XML file is loaded. From a PDF with a text layer the application extracts the text without any character recognition. An image, that is a scan or a photo, has to be read by OCR, by an AI model, or by both methods independently. We compare the strengths and weaknesses of these methods in the article on why classic OCR gets invoices wrong and what AI changes.
Whatever the method, the result has the same form: a set of fields with defined names and types, and next to each value a pointer to the page and the place it comes from. That pointer lets the employee see the source at a glance, and it lets the application reject a value the model cannot locate on the document. We choose models and tools to fit the project, because they depend on the type of documents, the volume and the confidentiality requirements. One rule applies at this stage: a reading is a hypothesis that still has to be confirmed.
What is multi-layer verification?
Multi-layer verification means that every extracted field has to pass several independent checks before the application treats it as confirmed. The layers complement each other, because each one detects a different kind of mistake.
| Layer | What it checks | What it will not detect alone |
|---|---|---|
| Format and schema | Field type and length, permitted values: a date is a date, the VAT rate comes from a list, the currency has a valid code | A value that is formally valid but differs from the one on the document |
| Checksums | Check digits of the tax identification number (in Poland, the NIP) and of the IBAN bank account number | A valid number that belongs to a different entity |
| Arithmetic | Net plus VAT equals gross, the line items add up to the summary, the tax matches the rate | An error in fields that take part in no calculation |
| Master data | Tax ID, name and bank account consistent with the supplier master data; the buyer’s tax ID is your company’s number | A mistake concerning a supplier that is not yet in the master data |
| Duplicates | The same supplier, number, date and amount; the same file; a scan of an invoice that has already arrived from KSeF | A duplicate with a misread number, unless similar numbers are searched for |
| Comparison with other sources | Consistency with the purchase order, the goods received note, the contract and KSeF data | An error in a document that has no counterpart in another system |
| Second independent reading | Agreement with a reading made by a different method, field by field | A mistake made identically by both methods, which is why it does not replace the other layers |
| Company rules | Process requirements, for example a mandatory order number or a list of permitted cost centres | A reading error in a field that no rule applies to |
After the layers, every field has a status. A confirmed field has passed all the checks that can be applied to it. An uncertain field failed one of them, or had no check that could confirm it. The second condition matters: “uncertain” does not only mean “the model reported doubt”. Having no way to check a value is also a reason for a person to see it. Tolerances, such as the acceptable rounding difference, are set with the accounting team, not inside the development team.
Illustrative scenario. An e-mail arrives in the cost inbox with a three-page PDF: an invoice for maintenance services from a foreign supplier the company has not worked with before, plus a work completion report. The application splits the file into the invoice and the attachment. The reading returns a full set of fields. The bank account checksum is correct, so is the arithmetic of the amounts, and there is no duplicate. The supplier, however, is not in the master data, so there is nothing to compare the account with. The order number read from the invoice exists in the purchasing system, but the order is for a lower amount. Three matters go to the queue: creating the supplier record, confirming the bank account and the difference against the order. The remaining fields are confirmed and need no attention.
The same patterns, namely output in a defined structure, a reference to the source, cross-checks and refusing instead of guessing, work in any application built on a language model. We describe them in the article on how to prevent AI hallucinations in a business application.
How do the exception queue and human-in-the-loop work?
The exception queue works like this: the application shows the employee only the fields it could not confirm, together with the document fragment and the reason for doubt, and the employee approves the value, corrects it or rejects the document. This is the human-in-the-loop principle in its practical form. The comfort and pace of the work depend on the details of the screen:
- the document image and the fields are visible side by side, and the place the value comes from is highlighted,
- the reason is shown next to the field, for example “the sum of line items differs from the summary” or “the bank account is not in the supplier’s master record”,
- the employee can approve, correct, reject the document with a message to the sender, or pass the matter to a supervisor,
- after a correction the checks run again, because a person can also make a mistake when typing,
- sensitive changes, such as a new bank account or a new supplier, require confirmation by a second person.
Corrections from the queue are also a source of knowledge. A recurring reason for doubt usually points to a missing master data entry, a tolerance that is too strict, or a supplier who needs to be told about the quality of its documents. Rule changes are made deliberately and checked on a test set. The application does not quietly “learn” from individual decisions.
There is a trade-off here that should be stated openly. The stricter the rules, the more fields go to the queue and the more work people have. The share of documents that need a decision is the price of certainty, and it depends on the quality of the inflow. The goal is not an empty queue but a queue that contains only matters that really need a person.
Who is responsible for what
| Role | Responsibility |
|---|---|
| People who submit documents | Complete and legible files, rescanning when the application asks for it |
| Queue operator (accounting) | Resolving uncertain fields, reporting recurring problems |
| Chief accountant or CFO | Approving the rules, tolerances and acceptance criteria; the go-live decision after the pilot |
| Process owner on the company side | Supplier and cost centre master data, user permissions |
| The company’s IT department | Access to the ERP system and e-mail, a test environment for the integration |
| Application supplier | Development, testing, monitoring, implementing agreed rule changes |
Document indexing: what goes into the index?
The index holds a set of verified fields by which a document can be unambiguously found, linked to other documents and posted. For a purchase invoice these are usually:
- the supplier: tax identification number and name as in the master data,
- the document type and number, and for structured invoices in Poland also the KSeF number,
- dates: issue date, sale or delivery date, due date, date of receipt,
- amounts: net, tax broken down by rate, gross, currency,
- the cost centre, project or contract,
- the purchase order number and related warehouse documents,
- a link to the original in the archive.
An index is not the same thing as full-text search. Full-text search helps you find a document by any word and tolerates minor typos. The index contains the data on which postings, payments and reports rely, so an error in the index is an error in the process. A document with a wrong number, or one assigned to the wrong supplier, becomes impossible to find in practice, and its amount ends up in the wrong supplier account.
The set of index fields is agreed at the start of the project, together with the accounting and controlling teams. This decision sets the scope of the whole application: every field in the index must have a defined reading method, at least one check, and a rule for what happens in case of doubt. Line items are indexed when they are needed for cost allocation or for comparison with the purchase order, because they significantly increase the number of fields to verify.
Export to the ERP system, the archive and the audit trail
An indexed document is passed to the ERP system or accounting software through an API or by file exchange, depending on what that system offers. Three properties of the export matter. It should be idempotent, which means that sending the same document again must not create a second entry. It should end with an acknowledgement, which the application stores with the document. It should also be reconcilable: a report shows how many documents were sent, how many were accepted and which are waiting for a retry. We describe master data mapping, queues and error handling in the article on integrating an application with ERP, accounting software and KSeF.
The archive stores the original, the index record and the history of the document. The retention period follows from regulations and from company policy, and it has to be confirmed with accounting or an adviser before it is set in the application. Backups of the archive and the database, and regular restore tests, are part of maintenance, as with any financial system. You can read more on our data backup service page.
The audit trail answers the question of where a given value came from. For each field the application records the reading method, the result of each check, the person who confirmed or corrected the field, the time of that decision and the version of the rules in force on that day. As a result, a question asked a year later by a statutory auditor or an inspector has a concrete answer, and a dispute with a supplier over an amount is settled on the basis of the record, not of employees’ memory.
What does 100% indexing accuracy mean and how is it measured?
An indexing accuracy of 100% means that every field saved in the index matches the source document, because it was confirmed by control rules or by a person. It does not mean that the AI model reads every document flawlessly the first time, nor that no document ever goes to the exception queue.
In one of our deployments, an AI application indexes very large volumes of accounting documents in this way with 100% accuracy, where classic OCR still makes mistakes. The result comes from the three features described above. The application does not trust a single reading. It sets the reading against control rules: tax ID and IBAN checksums (in the Polish case, the NIP check digit), net, VAT and gross arithmetic, the supplier master data, duplicate detection, and comparison with the purchase order and KSeF data. It sends every uncertain field to a person, so nothing unverified enters the accounting system.
Any conversation about accuracy has to separate two measures that often blur together:
- Index correctness says whether what was saved matches the document. There is no room for compromise here, because this is data in the books.
- Automation rate says what share of fields and documents passed without human involvement. This is an economic parameter: it depends on the quality of the documents and can be improved step by step.
How errors are counted
Measurement needs a reference set: a collection of documents with the correct field values, prepared and checked by the accounting team. The application’s output is compared with the reference field by field. An error is any indexed field that differs from the reference: a value different from the one on the document, a value omitted although it appears on the document, and a value entered where the document contains none. Normalisation rules are agreed before the measurement, for example whether spaces in an account number or letter case in a document number matter. A person analyses every discrepancy, because sometimes it is the reference that is wrong, not the application. The analysis ends with a change to a rule, to the master data or to the reading method, after which the whole set is processed again.
A pilot on your company’s documents
The result depends on the documents and on the control rules that can be built for them. We therefore do not treat it as a universal promise: in every project we measure accuracy on the client’s own documents during a pilot, before the system goes into production. A pilot usually runs in the following steps:
- Scope. Choosing the document types and index fields to start with.
- Sample. Collecting documents that reflect the real inflow, including the difficult ones: scans, photos, multi-page documents and foreign documents.
- Reference. Accounting staff prepare the correct field values.
- Rules. Configuring the checks, master data and tolerances agreed with the chief accountant or the CFO.
- Run. Processing the sample and comparing the output with the reference.
- Analysis. Reviewing every discrepancy, making corrections and running the sample again.
- Decision. An assessment against acceptance criteria written down before the pilot began: index correctness, automation rate and time spent working in the queue.
Measurement does not end at go-live. The pilot set becomes a test set that is run after every change to the rules or to the model version. On top of that come spot checks of documents that passed automatically, and observation of the queue: a sudden rise in the number of exceptions usually means a new supplier, a change of document layout or a problem with the scanner.
Where does the AI model run and how is the data protected?
The AI model can run on your own or a leased server in Poland, or through an external provider’s API, and the data is protected as in any financial system: with permissions, encryption, access logging and a data processing agreement wherever an external party processes it. In the first arrangement an open model runs, for example, on our GPU servers in Poland, so the documents do not leave the country. The second arrangement is chosen by clients who prefer to use a model through an API. We discuss the selection criteria in the article on whether to run an AI model in the cloud or on your own server.
Accounting documents contain personal data: of sole traders, of employees and of the people who sign documents. The GDPR therefore applies to the application, in particular the data minimisation principle (Article 5), the requirement for a data processing agreement when an external provider processes the data (Article 28), and the obligation to ensure the security of processing (Article 32). Typical back-office automation, such as reading invoices and classifying documents, is as a rule not a high-risk use within the meaning of the EU AI Act, but the classification is checked for each specific use case. We cover this in more depth in the article on AI and company data under GDPR, the AI Act, NIS2 and DORA.
The application treats the content of documents as data, not as commands for the model, because a file from an unknown sender may contain text written to influence the reading. Before go-live it is advisable to commission penetration testing, which at Remote Admin is carried out by our own penetration testers. After launch the application needs care: monitoring, updates and incident response, which we provide as part of 24/7 server administration.
When does AI accounting automation pay off?
AI accounting automation pays off when the inflow of documents is large or varied, manual data entry takes up the time of qualified people, and mistakes are costly. Automated invoice processing delivers less where there are few documents, where nearly all of them arrive as structured invoices (in Poland, from KSeF) and where the existing accounting system handles them well. It will not help a process that is itself disorganised either: without purchase orders, a list of cost centres and agreed approval rules, the application has nothing to compare documents with. The article on how to calculate the return on an AI deployment helps to structure the cost and benefit calculation.
The cost of such an application is driven mainly by the number of document types, the number of index fields, the scope of the control rules, the number of integrations, the way the model is run, and the volume. We do not quote amounts, because each of these factors looks different in every company. A few mistakes, however, recur in projects of this kind:
- starting with the choice of model instead of the definition of the index and the control rules,
- having no reference set, so that nobody knows whether a change improved the result or made it worse,
- judging only how many documents “went through”, without checking that the fields are correct,
- launching all document types at once instead of starting with one stream,
- having nobody on the company side who is responsible for the rules and the master data,
- treating the exception queue as a failure, which tempts people to relax the checks.
FAQ: frequently asked questions
What is intelligent document processing (IDP)?
Intelligent document processing (IDP) is a process in which an application receives a document, recognises its type, reads the data, verifies it and passes it to the target system. It differs from OCR alone in that it ends with checked data, not with text. It also includes exception handling by a person and an audit trail.
What is the difference between document indexing and digitisation of accounting documents?
Digitisation, that is scanning, creates an image of the document. Document indexing attaches data to that image, such as the supplier, number, dates, amounts and cost centre, by which the document can be found and posted. Without an index, a digital archive has to be browsed just like a paper one.
Can AI post invoices without human involvement?
An application can process by itself those documents in which every field has passed the checks. Documents with uncertain fields should go to an employee, and the rules for posting and approving costs remain the company’s decision. A well-designed system limits human work to exceptions, but it does not eliminate it.
Can 100% invoice indexing accuracy be achieved in every company?
We do not promise that in advance. In one of our deployments, an AI application indexes accounting documents with 100% accuracy by combining AI reading with control rules and human verification of uncertain fields. The result depends on the documents and the rules, which is why we measure it on the client’s own documents during a pilot, before go-live.
How long does it take to implement automated invoice processing?
The time depends on the number of document types, the scope of the index, the control rules and the integration with the accounting system. A project starts with an analysis and a pilot on one stream of documents, and further streams are added in stages. We present the schedule for a specific company in the free quote.
Does accounting document automation still make sense in Poland now that KSeF is mandatory?
Yes. KSeF delivers domestic invoices as structured data, but it does not cover, among others, invoices from foreign suppliers, pro forma invoices, debit and credit notes, contracts, purchase orders or warehouse documents. The application combines both streams and matches KSeF invoices to purchase orders and delivery documents.
Can accounting documents be processed by AI without sending them abroad?
Yes. An open model can run on a GPU server in a Polish data centre or on the company’s own infrastructure. The documents then stay in the country, and the company keeps control over who has access to them.
A free quote for an accounting document application
We design and build applications for automated invoice processing and for other accounting documents: from document intake, through AI reading and multi-layer verification, to the index, export to the ERP system and the archive. We also take care of hosting in Polish data centres or on the client’s infrastructure, maintenance and security testing, and the client receives the source code and documentation on the terms set out in the contract. The quote is free and without obligation. We start with a conversation about the process and the documents, then present an estimate of scope, schedule and budget, and we begin larger projects with an analysis and a pilot on your documents. You will find the details on the web and mobile app development page. You can also write to us straight away and describe which documents you want to automate.
