XML Invoice Generation for E-invoicing

XML Invoice Generation for E-invoicing

With version 2.178, ADvendio introduces a robust solution for generating and managing XML file compliant with the UBL 2.1 standard which can be used for electronic invoices.

How does it work?

  • ADvendio generates an XML file in UBL 2.1 format containing all relevant invoice data.

  • This XML file will be available for download from ADvendio.

  • ADvendio does not generate or submit the e-invoice directly to tax authorities or external platforms.

  • The standardized UBL 2.1 XML format allows seamless integration with your selected provider, ensuring compliance and accuracy.

Customer’s Responsibility & Integration Requirements:

  • You need to engage with a third-party e-invoicing provider to process the XML and generate the actual e-invoice to meet the Peppol requirement.

  • Your provider must support UBL 2.1 XML to ensure compatibility.

  • Any additional formatting or validation required by your provider must be handled externally.

1. Activating XML Invoice Generation

1.1 Enable XML Invoice at Legal Entity Level

To initiate XML generation during a Billing Run, a new checkbox field is added to the Legal Entity object:

  • Field Label: Enable XML Invoice

  • API Name: EnableEInvoicing__c

  • Type: Checkbox

  • Purpose: Controls whether XML invoice files should be generated for invoices associated with this legal entity.

Screenshot 2025-07-14 at 10.01.32.png

Only invoices from media campaigns linked to legal entities with this field enabled will be considered for XML generation during the Billing Run.

2. Billing Run XML Generation Process

2.1 New Phase in Billing Run

  • A new Billing Run phase CREATE_INVOICE_XML is introduced.

  • XML generation occurs after the assignment of invoice numbers.

  • This phase is independent of other billing run phases like PDF creation.

2.2 XML Invoice Status Field

A new XML Invoice Status Field has been introduced into the billing run object which reflects the outcome of XML generation into the billing run

  • Object: Billing Run

  • Field Label: XML Invoice Status

This field is not part of default billing run layout

Screenshot 2025-07-14 at 10.09.44.png

2.3 XML File Handling

  • Files are created only if the associated Legal Entity has the field Enable XML Invoice checked

  • If the XML file is generated successfully, it gets stored as attachments in the Notes & Attachments section of the related Invoice record.

  • The file description includes the tag "ADvendio XML Invoice".

2.4 Error Reporting

  • If XML generation fails:

    • XML Invoice Status is set to Error

    • A result file is generated and posted to Chatter or sent via email.

    • The file contains detailed information about failed invoices.

3. XML Status Lightning Component

A Lightning component is introduced to monitor and manage the XML generation phase.

3.1 Features:

The detail overview of the XML Success or Failure can be reviewed from the new component called XML Invoice Status and the failed invoices could then be re run again from this component

Screenshot 2025-07-14 at 10.11.14.png

This components shows the detail overview of Ready or Failed Invoices and also allows to re run the generation of failed invoices

Screenshot 2025-07-14 at 10.13.49.png

3.2 Functionality:

  • Invoices are displayed with the following info:

    • Invoice Number (link to record)

    • Status (Ready / Failed)

    • Invoice Date

  • When the process re-runs, the component skips invoices that were already successfully processed.

  • The process does not affect other billing run phases.

4. Email Notification Option

A new checkbox is available on the XML Status Component to send emails upon successful reprocessing of XML files.

  • Checkbox Label: Send Email Notification

  • If selected, users will receive an email summary after the retry process completes.

This is particularly useful when reprocessing multiple failed invoices.