HaloITSM Guides
Documentation to assist with the setup and configuration of the HaloITSM platform
Embed XML Attachments to Invoice PDFs
This functionality is available as of v2.170+
eInvoicing
Commencing January 1st 2025, the European Union will begin to implement eInvoicing.
Compliance for this will be optional for 1 year.
Commencing January 1st 2026, eInvoicing will be made mandatory for all customers in the EU. This will be any clients hosted on our DE server group.
More information can be found on the EU official eInvoicing page: https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing
This functionality will be available on all Stable builds by January 1st 2026 to comply with the regulations.
Clients that wish to begin eInvoicing before the next Stable release can request to be upgraded to the Beta version to begin using it. Please contact your Account Manager to do this.
In this guide we will cover:
- How to embed an XML Attachment to an invoice PDF
This functionality can be used when you are required to have invoice details in an XML format embedded into your PDF invoices.
The XML template we provide is based on the EN16931 specification's 'Basic' template. Please note that you may need to adjust this template to match your required specification.
Customising the XML template
To customise the template that is is used for the invoice head to configuration > reporting > PDF templates > change the entity to 'Invoice XMLs'.
Here, you will see the default XML Template, you can either edit this template, or create a new one. Select the template you would like to edit, head to the 'XML attachments' tab and edit the line in the table.
Fig 1. Edit XML invoice template
Now you will be able to see the XML for the template. This already includes variables such as $-INVOICEDATE, $-INVOICETOTAL, $invoiceaddress1 to pull through the key details of the invoice , but additional variables can be added in here to pull though more data if required. To see a list of available variables select the 'View $-variables' button on the template configuration page.
Fig 2. XML for template
XML for invoice lines can be set under the 'Invoice line XML' section of the editor. The variable $-INVOICEXMLLINES can be used to pull through this XML.
XML for Tax codes can be set under the 'Tax detail XML' section of the editor. The variable $-TAXXMLDETAIL can be used to pull through this XML.
Once you are happy with your template save the editor screen and save the overall template.
Apply an XML template to an invoice PDF
In order for an invoice PDF to have the invoice details in XML format embedded against it, an XML template must be set against the invoice template being used.
Head to configuration > reporting > PDF templates > change the entity to invoices > select a template, edit the page and under the details tab you will see the setting 'XML Attachment Template'.
Fig 3. Assign XML template to invoice PDF template
Here, set the XML template you would like to use, hit save.
Now, when you generate an invoice PDF (using this PDF template) it will automatically have the XML template added as an embedded XML attachment.
Note: only specific PDF readers can show attachments embedded in a PDF. For example, you can see them in Adobe, but you cannot in native readers in browsers.
Display a warning when there is a discrepancy between the Total tax or Revenue on the PDF and XML (recommended)
This can be used for additional monitoring, we recommend this is enabled.
Head to Configuration > Billing > General settings> Invoice Creation Settings, enable the setting 'Enable XML Attachment generation warnings'
Fig 4. Enable XML Attachment generation warnings
Once enabled, a pop up message will appear if there is a discrepancy between the total tax or revenue on the invoice PDF and the invoice XML. This will be checked each time an invoice PDF is generated.
Fig 5. Pop up warning for discrepancy between the total tax or revenue
Popular Guides
- Asset Import - CSV/XLS/Spreadsheet Method
- Call Management in Halo
- Creating a New Application for API Connections
- Creating Agents and Editing Agent Details
- Departments, Teams and Roles
- Halo Integrator
- Importing Data
- Multiple New Portals with different branding for one customer [Hosted]
- NHServer Deprecation User Guide
- Organisation Basics
- Organising Teams of Agents
- Step-by-Step Configuration Walk Through
- Suppliers