An Invoice Without Correct XML Will Not Enter KSeF
KSeF only accepts a structured XML file in the FA schema, never a PDF or a scan. Before the invoice reaches the system, the integration must automatically generate this file from order data and verify the contractor's NIP, the sale date, and the VAT rate. An error in one field rejects the entire document, not just that line.
That's why with invoicing automation, it's not the sending that matters, but validating the source data before the invoice is even created. The exact structure of the schema and the implementation schedule for individual taxpayer groups are published by the Ministry of Finance on the KSeF website.
The Invoice Journey: From Order to KSeF Number
The entire process can be written as one chain:
- 01order
- →02CRM
- →03invoice issuance
- →04KSeF
- →05KSeF number
- →06JPK_V7
- Number
- Sends to sales system
- Buyer
- Order data, not manually transcribed
- Items and amounts
- From order
- Format
- Structured XML required by KSeF
- KSeF number
- Returns from system after acceptance
- Issued
- Sent to KSeF
- Accepted — KSeF number
Rejection returns to step 1 with error message. Not an exception — normal process state.
The salesperson confirms the order in CRM, the system generates the invoice and sends it to KSeF via the API. The National e-Invoice System returns a unique number that goes back to the CRM and to the VAT register. The same number must appear in the JPK_V7 file, otherwise the tax office will see a discrepancy.
Each link in this chain has an owner: the salesperson is responsible for order data, the accountant for correct rates, and the administrator for the integration actually working. This way, the business owner sees how many invoices are waiting for correction and makes decisions based on data, not the accountant's memory. When one link breaks, the entire chain has to be checked manually - and that's the task that automation was supposed to eliminate.
Who and What Handles This in Your Company
In a Polish company, the invoicing integration rarely rests on a single program. Invoices are usually issued in Comarch ERP Optima, enova365, wFirmie, or iFirmie, and the connection to KSeF goes through the vendor's plugin or an external API. To tie these systems together with CRM and the company email inbox, companies use n8n or Make - these ensure that an invoice generated in the ERP also reaches the client panel and the sales report.
- Order
- Subscription
- Accepted offer
- KSeF
- Accounting
- Client — email
- Issued report
The administrator is responsible for maintaining these connections, the accountant for data compliance with regulations. If neither of these people has control over the entire process, an integration failure will only be noticed when closing the month. You can read more about connecting such systems in the context of email box integration with CRM and general integrations between company systems.
How Much Does a KSeF-Connected Invoicing Integration Cost
Integrating the mailbox with the CRM is one stretch of this chain. CRM automations that tie the order to the invoice and the KSeF number are the second — and only they stop the data being retyped by hand. The admin panel, where you see the status of each invoice and every validation error in one place, is the third: without it the automation runs, but nobody knows when it stopped.
The sales and VAT dashboard and the weekly report showing the owner how many invoices KSeF rejected and why close the loop: without them there is no telling whether the earlier links are doing what they were meant to do. There is nothing here to add up — the configuration is matched to whichever link is actually missing in your company.
What Breaks When KSeF Rejects an Invoice
KSeF rejects an invoice when the contractor's NIP is incorrect, a required field is missing, or the VAT rate doesn't match the goods. The system returns an error code but doesn't suggest exactly what to fix in the ERP. If nobody monitors the rejection queue, the invoice hangs in the system as unsent, and the payment deadline passes without the salesperson's knowledge.
In practice, the accountant is the first to see the error - in the report from KSeF or in the API notification - and decides whether to fix the data manually or report the failure to the administrator. To maintain control over the rejection queue, the administrator sets an alert after each validation error. KSeF API failures also happen; the regulations provide for an offline mode in that case, but the integration must be able to recognize it and switch automatically, otherwise invoices simply won't be sent.
When It's Not Worth Automating Invoicing
A company that issues a few invoices per month manually in one accounting program doesn't need CRM integration or a separate panel. The cost of maintaining such a connection will exceed the time it was supposed to save. We don't promise that thanks to invoicing automation, the number of VAT errors will drop on its own - that depends on the quality of input data, not just the KSeF connection.
If your company is just learning the new workflow with KSeF, it makes more sense to first stabilize the manual process and then automate it. Automating an unstable process only speeds up the repetition of the same errors.
Questions and Answers
Will KSeF Completely Replace Paper Invoices?
Yes, in structured form, KSeF becomes the only recognized method for issuing invoices covered by the obligation. Exact effective dates for individual taxpayer groups are announced by the Ministry of Finance on the KSeF website. Until then, it's worth checking whether your accounting program even has a ready-made integration.
Does a Small Online Store Also Have to Connect to KSeF?
Yes, the obligation applies to entrepreneurs issuing VAT invoices, regardless of company size. The scope of exceptions and dates are worth verifying directly on the KSeF website, as they differ depending on taxpayer status.
Does Invoice Data in KSeF Need Additional Protection Under GDPR?
Yes, if the invoice contains data of a natural person running a business, the personal data protection principles described by UODO apply. The system storing invoice copies must clearly define who has access to them and how long they are kept.
Can Invoicing Automation Be Implemented Without CRM Integration?
Partially - if the ERP has a ready-made connection to KSeF, the invoice will go out correctly without the CRM. Without integration, you'll lose the automatic return of the KSeF number to the order, so the salesperson will still have to find it manually. The value of adding CRM depends on how many people in the company need to see invoice status outside of accounting.
Let's talk about how to connect your invoicing integration with KSeF before the statutory deadline catches up with you.