Application available for:
Implementation time frame:


App features:
  • security
  • integration
  • data exchange
  • automation
  • optimization

KSeF - National System of E-Invoices

Integrating Microsoft Dynamics 365/ AX systems with the National e-Invoice System enables the User to handle outgoing and incoming structured invoices based on the FA(1) invoice logical structure template published by the Polish Ministry of Finance as of April 26, 2022.

KSeF Module Functionalities

  • Outgoing invoices – export to KSeF system.

    • Data to create structured invoices are generated based on the fields and functions of the standard version of Microsoft Dynamics 365/ AX.
    • Structured invoices are created for independent and sales invoices, advance and billing invoices for sales orders, and adjustment invoices for documents with KSeF ID.
    • The appropriate parameterization in the recipients’ file determines whether KSeF handles invoices for a given recipient and whether a KSeF ID is required on the invoice printout. By selecting the “Procedure in KSeF” tag, all invoices issued for the recipient are exported to the KSeF system.
    • During the invoice posting process in Microsoft Dynamics 365/ AX, an XML file is generated that conforms to the applicable logical structure of the FA(1) structured invoice.
    • Generated invoice files are sent via API to the National e-Invoice System after prior authorization with a token.
    • KSeF assigns each invoice it receives a number identifying it in its system with a date and time stamp. Microsoft Dynamics 365/ AX periodically queries, automatically retrieves, and updates the KSeF ID and invoice processing status feedback.
  • Incoming invoices – import from KSeF system.

    • As part of the integration with KSeF, the Microsoft Dynamics 365/ AX system periodically downloads structured invoices in XML format issued through the KSeF system for the User. The files are automatically registered in the newly created incoming invoice form, where they undergo initial data validation and are assigned to the respective supplier’s account in Microsoft Dynamics 365/ AX based on the VAT number.
    • The user can verify the data on the incoming invoice and manually set the fields necessary to save the invoice in the appropriate place in the system – such as an expense invoice, advance payment invoice, or purchase invoice associated with a purchase order.
  • Versioning – updating the schema of a structured invoice.

    • The KSeF functionality allows you to add future versions of the structured invoice schema published by the Polish Ministry of Finance.
  • KSeF data History.

    • All generated and received structured invoice files in XML format are archived. Information on the history and status of outgoing and incoming invoices is visible on dedicated Microsoft Dynamics 365/ AX forms.

Benefits of KSeF integration:

  • support integration with KSeF in one place, in an environment familiar to the user
  • no need to use and pay for additional external applications
  • security resulting from the lack of intermediary services
  • reduce the processing time of incoming and outgoing invoices
  • automation of the invoicing process
  • guarantee of compliance with obligations to ensure the authenticity of origin, integrity of content, and legibility of invoices
  • No possibility of losing documents, the certainty of the arrival of documents to the contractor
  • eliminating costs associated with OCR tools
  • eliminating costs associated with additional invoice archiving
  • no need to issue duplicate invoices
  • independent dispatch of individual invoices to KSeF, which, in the event of a possible error of one or more invoices, eliminates the risk of the remaining sales documents not being sent to KSeF

Structured invoices in Microsoft Dynamics

Microsoft D365/AX integration with KSEF – Sales

sales invoice
in D365 / AX


generation of
XML file


correctness of
XML file


XML file foes
into the queue
dispatches to KSeF


uploading the file
in an interactive


KSeF Invoice ID
to D365 / AX

Microsoft D365/AX integration with KSEF – Purchase

Periodic querying of KSeF by
D365 / AX for purchase


downloading the XML file
width the purchase invoice
from KSeF


assigning an invoice to a
supplier and registering
in the dedicated incoming
invoice form in
D365 / AX

Are you looking for tried-and-tested solutions?

Read about our other products