KSeF has streamlined invoice exchange with the tax administration, but it has not solved internal company challenges. An invoice enters the system - and manual work begins: who ordered it, which department it belongs to, who should approve the cost, and whether the amount matches the budget. This article describes four recurring situations in organizations using KSeF and shows how ANEGIS Document Flow (ADF) resolves them.
Problem 1: Who does this invoice belong to?
Let’s start with the so-called “cutlet problem.” Twenty sales reps, one city, one branch. A salesperson goes to lunch with a client and asks the waiter for an invoice issued to the company. The document appears in KSeF and is then sent to accounting. Who ordered it? For what purpose? From which budget? There are no answers, because no one informed the finance team about the business meeting at a restaurant on Świdnicka Street. With ten such invoices per day, it’s a minor inconvenience. With a hundred - it becomes a daily investigation.
The solution is to link the invoice with an internal order before it even reaches KSeF. In ANEGIS Document Flow (ADF), the salesperson creates an internal order - forr example, on their phone - providing the date, estimated amount, and purpose. The order number is added to the invoice (in notes or a dedicated field), and the system automatically matches both documents when the e-invoice appears in KSeF.
What if the salesperson remembers only after the meeting, while driving? They can create the order afterward by entering the exact amount and date. The person verifying the invoice in ADF sees a list of active internal orders and assigns the correct one based on amount and date. Seconds instead of minutes.
An additional effect: once the order owner is known, the approval path is defined automatically. The invoice is routed to the salesperson’s manager - no emails, no calls.
Problem 2: An invoice from an unknown supplier
Not every document issued to a company’s tax ID is legitimate. A supplier may have entered the wrong number, or someone may have intentionally issued an invoice using чужие data. In both cases, the company receives an invoice from an entity not present in its vendor database.
The issue is not rejecting such invoices - it’s detecting them before they move forward and get paid.
ADF applies a simple rule: if the supplier’s tax ID does not match any entity in the database, the system blocks the invoice from progressing. A message appears indicating a missing supplier. Even if the reviewer overlooks it and clicks “next,” the system will not allow the document through. The invoice remains blocked until the supplier is identified and approved.
According to estimates from the Polish National Revenue Administration, over 290,000 fictitious VAT invoices were detected in Poland in 2024, illustrating the scale of irregularities. An automatic block at the workflow stage is the first line of defense before the issue reaches compliance.
Problem 3: Errors in e-invoices - technically impossible, practically common
KSeF validates the XML structure, so in theory every e-invoice should be correct. In practice, discussions with companies integrating via the KSeF API show that minor discrepancies occur regularly. Incorrect VAT mapping for mixed services, missing fields in construction invoices under reverse charge - these are niche errors, but enough to stop automatic posting.
ADF addresses this in two ways. First, the “Document Information” tab aggregates key invoice data in one view. The reviewer does not need to switch between XML files, ERP systems, and spreadsheets. Everything is visible in one place. Second, in case of critical issues (missing supplier, invalid number, amount mismatch), the system enforces correction before approval. An invoice with significant errors cannot proceed until it is fixed.
Manual verification in a single view takes a fraction of the time compared to opening XML files, comparing ERP data, identifying discrepancies, and correcting records manually.
Problem 4: The same invoice from two sources
A supplier sends an invoice by email as a PDF. At the same time, the same document appears in KSeF. The finance team faces a question: process the email version immediately or wait for KSeF?
Processing too early risks duplicate posting. Waiting for everything may delay invoices from foreign suppliers not covered by KSeF.
ADF resolves this with configurable waiting. An invoice received by email is automatically assigned the status “Waiting for KSeF,” and further processing is paused for a defined period (e.g., 24 hours). When the e-invoice from KSeF arrives, ADF compares both versions. If they differ, the KSeF version takes precedence as the official document, and the system updates the record automatically.
Foreign suppliers? Marking them as foreign in the vendor record allows their emailed invoices to be processed immediately, without waiting for KSeF.
Routing: the mechanism that decides where the invoice goes
All four scenarios raise the same question: who should handle this invoice and what should be done with it? ADF answers this through document routing - a configurable set of rules that automatically classifies each invoice.
How does it work? The system retrieves invoices from KSeF at defined intervals (e.g., hourly). Each invoice goes through four stages:
- Retrieval and queueing - Data extraction: KSeF number, supplier tax ID, amounts, line items
- Classification via routing - based on conditions (supplier ID, keywords, amount), the system assigns the invoice to a department, defines the document owner, and assigns budget responsibility
- Approval - the document is sent to designated users via Teams or email
Routing is defined separately for each company in a multi-entity organization. Conditions can be combined freely. If the word “coffee” appears on an invoice from a specific supplier, it goes to administration. If the amount exceeds a threshold, approval is routed to the CFO. For low-value invoices, approval can be fully automated.
Crucially, routing also controls access. An invoice intended only for executives will not be visible to a sales assistant. Classification happens at the start - before the document is shared.
Three sources, one workflow
KSeF is one source of invoices, but not the only one. ADF also processes PDF attachments from email (via OCR) and scanned paper documents. Regardless of origin, the process remains the same: classification, approval, export to ERP.
The system integrates with applications such as Microsoft Dynamics 365 and completes its role with an approved, validated invoice ready for posting - without manual data re-entry.
Want to see how it works in practice?
The problems described in this article are discussed in detail during the webinar “You’ve retrieved an invoice from KSeF. What next?”. You will see a live system demo: invoice queue, routing configuration, mobile internal order creation, and approval via Teams. Watch the recording.
FAQ
Does implementing ADF require replacing the current ERP system?
No. ADF operates alongside the existing financial system. The invoice goes through ADF from retrieval to approval, and is then exported to ERP.
How long does it take to configure routing?
Routing is configured via the user interface, without coding. Adding a classification rule (supplier ID, keyword, amount) takes a few clicks. Complexity depends on business rules, not technology.
What if routing does not match an invoice to any department?
The invoice remains in the queue for manual classification. Nothing is rejected or skipped. A designated user reviews and assigns it.
How does ADF handle correction invoices?
Corrections follow the same process: retrieval, extraction, routing, approval. The system automatically links them to the original invoice based on e-invoice data, supporting accurate verification.
