Michał Bartosiński from Aider Poland shows how implementing KSeF can become a wider programme of process improvement. He describes an independent integration layer, the benefits of structured invoice data and the opportunities for automated accounting, explaining how cooperation between IT and finance teams can turn compliance into operational value.

Michał Bartosiński

Compliance projects rarely inspire enthusiasm. They have an externally imposed deadline, a budget treated as a necessary cost, and one objective: to avoid exposing the company to sanctions. The implementation of the national e-invoicing system (Krajowy System eFaktur or KSeF) in our organisation – a provider of outsourced accounting services – has nevertheless shown that regulation can become a catalyst for changes that, under normal circumstances, would be difficult to pursue. There is one condition: from the outset, the project must be defined more broadly than merely “meeting the requirement”.

Starting point: multiple systems, one process
A defining feature of accounting outsourcing is that we do not work in a single system. We support clients using various financial and accounting applications and ERP systems, each with its own integration logic. If we treated KSeF as a “function within the accounting system”, we would have to implement, test and maintain a dozen or so separate integrations – each dependent on the software provider’s schedule and quality of work.

We therefore decided to build our own KSeF handling layer, independent of the accounting system. It is a central component that retrieves purchase invoices and submits sales invoices, and then distributes the documents to wherever they are needed: electronic document workflow systems, accounting software or – in the simplest scenario – a designated email address. The client does not need to change its ERP system, while we are not dependent on any external provider for the pace of implementation.

From an IT perspective, this was the most important architectural decision of the entire project. Separating KSeF communication from the accounting layer gave us control over the process and the ability to develop it at our own pace.

Compliance as an opportunity to redefine the process
At the analysis stage, we adopted the assumption that KSeF was intended not only to ensure compliance, but also to genuinely improve the efficiency of processing and accounting for purchase and sales invoices. Instead of asking “what do we have to do?”, we asked “what can we simplify?”.

For years, the basis of invoice workflow automation in our organisation was OCR tools, initially supported by neural networks and later by AI models. They achieved accuracy above 90%, which sounds good, but in practice meant that every tenth invoice required human verification – and we did not know in advance which one. The risk of error was too high to allow posting without employee involvement. Automation stopped at the stage of “assisting”, rather than “replacing”.

A structured invoice changes this fundamentally. KSeF data are not an interpretation of an image, but a source of truth: the counterparty, amounts, VAT rates and line items are exactly as the issuer submitted them to the system. This delivers 100% accuracy and – more importantly – makes it possible to design processes without human involvement or with human involvement limited to exceptions. Today, KSeF has already replaced approximately 75% of the previous solution based on OCR and AI. The remaining part consists of documents that, by their nature, are not submitted to the system, e.g. foreign invoices or receipts.

Benefits visible to clients

  • Speed. The invoice enters our process at the moment it is issued, not after several days in the post or after someone forwards an email. The client receives it for approval earlier.
  • Completeness. No document is lost in KSeF. There are no invoices forgotten in an inbox, delivered to the wrong person or simply lost. Completeness control has, to a significant extent, become a matter of system verification rather than manual follow-up.
  • Quality of accounting records. Because documents reach us on an ongoing basis, clients’ accounting records are maintained closer to real time. Liabilities become visible earlier, so they are more often settled on time.
  • Risk reduction. Eliminating data capture errors means fewer corrections, fewer discrepancies with counterparties and less control work.

The next step ahead of us is to use the KSeF number in payments. Once the invoice identifier starts appearing in payment references, reconciliation of receivables and payables – currently one of the more time-consuming tasks – will be able to take place automatically.

Structured data as fuel for AI
Paradoxically, KSeF did not end our journey with artificial intelligence; rather, it took it to a higher level. When AI does not have to guess what is on an invoice, it can focus on what genuinely requires accounting knowledge: proposing account coding. We built and further trained a model which, based on structured data, proposes the analytical allocation of an invoice – assignment to accounts, cost centres and projects – and consequently enables the invoice to be posted automatically and correctly.

Training the model on KSeF data was significantly easier than on OCR outputs because the “noise” resulting from recognition errors disappeared. This illustrates a broader principle: the quality of automation depends on the quality of input data, and regulations that require data standardisation are a gift to IT, not a burden.

How to transform compliance into an improvement programme – conclusions

  1. Define the objective more broadly than required by the regulator. Compliance is the minimum. As early as the analysis stage, set measurable indicators: processing time, the proportion of documents posted without human involvement, and payment timeliness.
  2. Design the architecture around your own needs, not the vendor. An independent integration layer costs more at the outset, but gives you control over development and makes you independent of other parties’ schedules.
  3. Treat structured data as an asset. Any regulation that standardises data opens the way to automation that was previously unprofitable or too risky.
  4. Involve the business from day one. Accountants and tax department staff knew best where the process had weaknesses. Their involvement turned an IT project into an organisation-wide project.
  5. Plan subsequent waves. KSeF was the first step; automated reconciliation and AI-assisted account coding are natural next steps. The improvement programme does not end when the compliance project is closed.

Further regulations will follow KSeF. The difference between companies that merely survive them and those that benefit from them comes down to one question asked at the outset: what else can we learn in the process?