Home · Solutions · Finance & accounting
Solution · Finance & accountingEvery sales invoice in KSeF, every UPO back in the ERP, every rejection on a desk by nine
E‑invoicing (KSeF) submission and status reconciliation
A control layer around your ERP's KSeF connectors: validation before submission, KSeF numbers and UPOs reconciled back, rejections and corrections as Teams tasks, all entities on one dashboard.
Executive summary
Your ERP sends invoices to KSeF. Who checks that each one came back with a UPO, and who fixes the ones that did not?
The ERP connectors stay.
Rejections are fixed the same morning instead of after two days of decoding.
KSeF 2.0 API; SAP S/4HANA status fields; the two other ERPs
Business problem
E‑invoicing compliance
Since 2026 a sales invoice in Poland is issued through the Krajowy System e-Faktur: it counts once the system has accepted it and assigned a KSeF number, and the offline modes only delay that moment. A rejected file is not an invoice with a mistake but, under the Ministry of Finance handbook, an invoice that was never issued; the only remedy is to fix it and send it again. ERP connectors handle the happy path: build the FA(3) XML, open a session, send, collect the UPO, the official receipt. What happens when the answer is no, or when the receipt never arrives, is left to people.
Billing clerks decode messages written for developers. The tax manager needs the KSeF number and the UPO reference per invoice and finds them in connector folders and email threads. Accounts payable learns that purchase invoices now wait in KSeF, one login per entity.
Scale turns the irritation into a control gap. Invoices issued in offline24 mode during an outage must still reach KSeF within the statutory deadline. Since 1 February 2026 correction notes no longer exist; every customer change becomes a corrective invoice referencing the original KSeF number, and an unsent one is as invisible as an unsent original.
How it works today
- SystemEach ERP's KSeF connector builds the FA(3) XML after the nightly billing run and sends it in a batch session
- PersonA billing clerk opens each connector log in the morning and copies the counts into a tracker
- WaitingRejected files wait until someone has time to decode the error, two or three days during the close
- PersonThe clerk fixes the master data or the document in the ERP, re-issues, resubmits and checks again the next morning
- Risk of errorSessions without a UPO, offline24 invoices and unsent corrective invoices surface only when the tax manager asks for evidence
- PersonPurchase e‑invoices are downloaded from the Taxpayer Application entity by entity and forwarded to accounts payable
Why the current process costs more than it appears
The bill that never reaches the budget.
- The 2% of exceptions hide a fixed routine: every connector log is reviewed every morning, per entity and per system, whether or not there is anything to fix.
- One missed invoice costs more than all the others together: a rejected file never resent leaves the customer nothing to pay against and the VAT position wrong by that amount.
- KSeF error messages are technical, and what each one means in each ERP lives in one or two heads; when those people are on leave, the rejections wait.
- Evidence sits in UPO files, screenshots and a tracker, so proving that a month's invoices all exist in KSeF is a small project each time somebody asks.
Cost of inaction
Until 2026 the transition reliefs hold. After that an invoice that quietly stayed outside KSeF is a tax finding, not a technicality, while the morning log review stays a fixed cost per entity and the exception share stays where the master data leaves it.
The quieter risk is dependency: the few people who can read a KSeF error and know which ERP field to fix carry knowledge that is not written down and cannot be handed over or audited.
A plausible organisation with realistic proportions. The figures are there to be recalculated on your data; they are not a client result.
A wholesale distributor in Poland with three legal entities, the parent on SAP S/4HANA and two acquired companies on their own ERPs; 900 employees, Microsoft 365 E3, one shared-services team for billing and accounts payable.
18,000 sales invoices a month across the three entities in nightly billing runs; about 2%, roughly 360 a month, come back rejected, finish without a UPO or need a corrective invoice.
Each connector sends the invoices; one clerk per entity reviews the logs, decodes rejections, fixes and resubmits; the UPO check is a Friday spot-check; offline24 invoices live in an email thread.
About 15 minutes per rejected or corrected invoice to locate, diagnose, correct, resubmit and verify, plus the unmeasured daily log review.
A deterministic UiPath control layer around the connectors: validation before submission, status and UPO reconciliation per invoice and entity, rejection and correction tasks in Microsoft Teams, an offline24 watchdog, one Power BI view of all entities.
In the modelled case the 90 hours a month spent on exceptions shrink to the minutes needed for the actual fix, and every invoice carries a KSeF number and a UPO reference in the ERP by the next morning. That is the model's target state, not a measured outcome.
Proposed solution
The ERP connectors stay. Mientha does not replace what your SAP or ERP vendor built for the FA(3) format; we put a control layer around it that checks before, reconciles after, and routes what fails to the right person with the cause already worked out. It runs on the UiPath Platform and your Microsoft 365 tenant, one queue per legal entity.
Before submission, a robot validates every invoice from the billing run against the FA(3) schema, buyer NIP, VAT codes, mandatory fields, duplicates and the rules your tax team adds; what fails becomes a task before anything leaves the company. Entities with a working connector keep sending through it; for the others, an API workflow sends the validated batch through a custom connector for the KSeF 2.0 API built with Integration Service Connector Builder, using each entity's credentials from Azure Key Vault. After submission, the reconciliation robot polls the session status, downloads the UPO and writes KSeF number, UPO reference and timestamp back into SAP through BAPI or OData and into the other ERPs through their APIs; the UPO XML goes to SharePoint and a ledger in Azure SQL keeps one row per invoice. Anything without a KSeF number by the cut-off is an exception.
Exceptions reach people as UiPath Action Center tasks in Microsoft Teams, with the error in plain language, the invoice and the likely fix proposed by rule. A watchdog lists every invoice issued in offline24 mode, resubmits it when the connection is back and alerts the team before the statutory deadline. Purchase e‑invoices are retrieved from KSeF each morning and handed to accounts payable. A Power BI semantic model on the ledger shows all entities on one page; a daily summary per entity goes to a Teams channel. No AI is involved: every rule is explicit and every decision is a person's.
UiPath Orchestrator queues, triggers, folders and Azure Key Vault credential store; UiPath Integration Service Connector Builder, Microsoft Teams and Microsoft OneDrive & SharePoint connectors; UiPath API workflows; UiPath Action Center actionable notifications in Microsoft Teams; Power BI semantic models and data alerts
The validation rules, the submission and polling workflows per entity, the UPO write-back, the offline24 watchdog, the Teams tasks, the hand-off to accounts payable, the ledger, the dashboard and the runbook
The KSeF 2.0 REST API as a custom connector; SAP S/4HANA through the UiPath SAP BAPI and SAP OData connectors; the other ERPs through their APIs or, where none exists, their user interfaces
How the automated process works
- AutomationAfter each billing run a queue trigger starts the pre-submission check: FA(3) schema, buyer NIP, VAT codes, mandatory fields, duplicates
- SystemValidated invoices go through the ERP connector where one exists, otherwise through the custom KSeF 2.0 connector in a batch session
- AutomationThe reconciliation robot polls the session status for every entity, downloads the UPO, writes KSeF number, UPO reference and timestamp back to the ERP and the ledger
- PersonThe billing specialist receives each exception as an Action Center task in Teams with the error in plain language, the invoice and the proposed fix; she corrects the ERP and closes the task
- AutomationCorrected invoices are resubmitted; corrective invoices issued after a customer request follow the same path, carrying the original KSeF number
- AutomationThe offline24 watchdog lists invoices issued outside KSeF, sends them once the connection returns and alerts the team before the statutory deadline
- AutomationEach morning purchase e‑invoices for all three buyers are retrieved from KSeF and handed to accounts payable; a summary per entity is posted to the Teams channel
Human-in-the-loop model
Automation handles
- Validation of every invoice against the FA(3) schema and the master-data and tax rules
- Submission, status polling, UPO retrieval and write-back for every entity, every night
- Detection of rejections, timeouts, missing receipts and expiring credentials, with the cause attached
People decide
- The fix for every rejected or disputed invoice: master data, document content, or cancellation of the billing document
- Whether a customer's request becomes a corrective invoice and what it says
- Rule changes, cut-off times and assignment per entity, which stay with billing and tax
Before and after
Systems and integrations
Everything below runs on licences and systems you already hold, or would need anyway.
Inputs
- SAP S/4HANA billing documents
- invoice exports of the two other ERPs
- KSeF session status, UPO and invoice query responses
Automation layer
- UiPath Orchestrator
- UiPath Robots
- UiPath API workflows
- UiPath Integration Service
- UiPath Action Center
Target systems
- KSeF 2.0 API
- SAP S/4HANA status fields
- the two other ERPs
- SharePoint UPO archive
- Azure SQL ledger
- Power BI semantic model
Human touchpoints: Action Center tasks in Microsoft Teams; daily summary per entity in a Teams channel; Power BI dashboard and alerts
Technologies used
one queue per entity, triggers, retries, folder-level access, audit log
Aserverless session handling, status polling and UPO download
Acustom connector for the KSeF 2.0 REST API; Teams and SharePoint connectors
Arejection and correction tasks completed inside Teams, with due dates
Aper-entity KSeF credentials via the Orchestrator credential store; the reconciliation ledger
Adashboard per entity and data alerts on the ledger, embedded in Teams
Abilling-document reads and status write-back
AIllustrative economic model
A model, not a promise.
Exception work is all that is counted here, from illustrative ranges rather than a client measurement: 2% of 18,000 invoices a month at 15 minutes each; €28 is a fully loaded hourly cost for a billing or tax specialist in a Polish shared-services centre. The daily log review, the month-end evidence search and the VAT effect of an invoice that never reached KSeF are left out, so the model understates the total.
Run the numbers on your data
An illustrative estimate from your own inputs. It models released capacity; it is not a promise of savings.
Business benefits
- Rejections are fixed the same morning instead of after two days of decoding
- Every invoice carries its KSeF number and UPO reference in the ERP; reminders, customer queries and tax evidence start from that fact
- Three entities on three ERPs are handled by one routine and one team
- Offline24 invoices stop depending on memory; a robot holds the list and watches the deadline
The management view
- One dashboard answers the compliance question for all entities: issued, in KSeF, not in KSeF, and why
- Evidence for a tax inspection or an audit exists by construction: every invoice, its UPO and its timeline in one ledger
- Exception statistics by cause show where master data or billing rules need repair, so the exception share falls instead of being absorbed
Board-level KPIs
Security and governance
The automation holds exactly the rights it needs, and not one more.
- Each legal entity authenticates to KSeF with its own credentials, stored in Azure Key Vault and read through the Orchestrator credential store
- Orchestrator folders separate the entities; a billing team sees only its own queues and tasks
- Invoice XML, UPO files and the ledger stay in your Microsoft 365 tenant and Azure subscription; the automation runs in the UiPath Automation Cloud EU region
- Robots never change the content of an invoice; every correction is made by a person in the ERP, and every step is logged with a timestamp, so the ledger is the audit trail
Why now
An invoice that quietly stays outside KSeF is the exposure no model captures; the handling around it runs at the modelled €2,520 of capacity a month
The mandate is fully in force: KSeF 2.0 has been mandatory for the largest taxpayers since 1 February 2026 and for the remaining businesses since 1 April 2026; the smallest firms follow on 1 January 2027 and the transition reliefs end with 2026
API workflows, Connector Builder and Action Center tasks in Teams are generally available on the UiPath Platform; the control layer is rules and configuration, not a bespoke application
Relevant executive roles
The VAT position and the receivables ledger rest on invoices that provably exist in KSeF; the proof is a report, not a search
Every invoice has its KSeF number and UPO reference where an inspector would look, and corrective invoices are tracked to the original
Credentials, connectors and API changes are managed in one place with an audit trail
Common questions and objections
Keep it as the sender for that entity. The layer adds what the connector does not: validation before sending, a nightly check that every invoice has a KSeF number and a UPO, tasks for the rejections, and the same routine for the entities without SAP.
The schema and API rules sit in one connector and one rule set, tested against the KSeF test environment before each change; a change in FA(3) or an endpoint is an update in one place, not in three ERPs.
By design it does not. A rejected invoice is not issued and its replacement must be right; the robot diagnoses the cause, proposes the fix and resubmits after a person has corrected the ERP.
When this is not the right solution
- A single entity on one ERP whose connector already reports, retries and stores the UPO, with a handful of rejections a month
- Billing is not stable: numbering, customer master data or the ERP itself are mid-change; the layer would only report the disorder faster
- Sales invoicing is outsourced to a provider that already guarantees KSeF delivery and per-invoice evidence under contract
A question for the next management meeting
For each legal entity, how many of last month's sales invoices can we prove today exist in KSeF with a UPO?
Implementation approach
The first week looks the same at every client: we look at the data.
We deliver
- Connector logs from three months per entity, read for rejection causes, timeouts, UPO gaps and offline events
- The validation rule set for FA(3) and your master data, agreed with billing and tax
- The KSeF 2.0 custom connector, the workflows per entity and the write-back to SAP and the other ERPs
- Rejection and correction tasks in Teams, the offline24 watchdog, the hand-off to accounts payable
- The ledger, the Power BI dashboard, the daily summary and a runbook for billing and IT
We need from you
- Access to the KSeF test environment and each entity's credentials through IT
- A billing process owner, a tax owner for the rules and an IT contact per ERP
- Three months of connector logs with billing documents, and test systems for the ERPs
Stages
Discovery
Log analysis per entity, error taxonomy, volumes, master-data causes
Design
Validation rules, cut-off times, task routing, security model per entity
Build
Connector, workflows, ERP write-back, Teams tasks, ledger, dashboard
Validation
Parallel run against the KSeF test environment and historical rejections; acceptance by billing and tax
Go-live
Entity by entity, starting with the highest rejection rate, with hypercare
Departmental. Effort follows the number of ERPs and connectors, the quality of customer master data and the number of legal entities; no fixed duration is promised.
Two invoices in a hundred come back from KSeF, and somebody has to find them.
Send us one month of connector logs per entity: counts of sent, accepted and rejected invoices with their error codes. We return an error taxonomy and a one-page estimate of the automatable share.
Classify your KSeF rejectionsThe neighbouring process usually has the same problem
Stop paying your finance team to move numbers from PDFs into the ERP.
View solution Finance & accountingInvoices from KSeF booked to the right budget lineA structured invoice states the amount. It does not state which unit ordered the work.
View solution Supply chainCustomer orders from PDFs and emails straight into the ERPCustomer POs still get retyped from PDFs into SAP and confirmed hours later. Stop paying your order desk to type.
View solutionIndustries we deliver this in most oftenManufacturing & industryRetail & e‑commerceServices & IT