XML designer overview
This section describes how XML files are generated, or parsed. Due to the complexity of the XML structure and the international context of Sage X3, managing XML files is not hard coded. Instead, you can define them to meet your specific business needs to facilitate maintenance and other customizations.
Usually you do not need to work with these functions, except to specify the Crystal Report printouts used when an e-invoice is generated. By default, the standard printouts SBONFAC and BPCINV are used.
XSD file upload
Open: Declarations > E-invoicing > Setup > XSD file upload (GESEINVMAPX)
Use this function to upload XSD files (XML schema definition) that describe the XML format standard for XSD files or extensions that could be required depending on the legislation and the type of e-invoice to generate.
This function is part of the activation process and not something you would need to do as part of the standard e-invoicing process.
XML mapping rules
Open: Declarations > E-invoicing > Setup > XML mapping rules (GESEINVMAP)
Use this function to map the content of the XML file toSage X3 data. This function is part of the activation process and not something you would need to do as part of the standard e-invoicing process.
Customer (outbound) invoices
The XML mapping rules, UBL21, that you define is associated with your customers so that the correct e-invoice format is generated for each customer as needed.
The XML mapping rules cover 3 main areas:
- UBLBG0000: The representation that defines the Sage X3 data structure and source to use when generating the XML file and driven by classes that begin with UBLBG.
- UBL21: The XSD files beginning with this code that define the structure of the XML file to be generated.
- Settings that populate the XML file from the Sage X3 data source. For each tag defined in the XSD file, you need to associate the correct property in the representation.
You can decide which PDF to submit in the electronic flow with the XML file, depending on the originating module, Sales or A/P-A/R accounting. By default, the standard printouts SBONFAC and BPCINV are used, but you can change them.
Important considerations
- This type of document should be optional in the logic of electronic invoicing and be replaced by a human-readable file generated by the platform from the XML.
- Until Sage Network can generate this readable from the XML flow, Sage Network requires a PDF for the outgoing invoice. You can immediately associate your existing printouts, without any changes, but at the cost of degraded performance. Creating this PDF by Crystal Reports consumes a lot of resources and time.
Supplier (inbound) invoices
Parsing the inbound XML file is managed using a simplified mapping rule, UBLINB. It will be available in the 2025 R1 release so you can receive e-invoices from Sage Network.
Additional information
When you enter a customer invoice, the transaction is stored in a set of tables according to the module you use, like Sales (AR invoices). When you generate the corresponding e-invoice, a single step transforms and stores the data in a different set of tables that begin with ESINV.
The benefits of dedicated tables:
-
Transform and/or restructure the data to facilitate mapping.
-
Manage a unique mapping with a unique set of tables.
-
Improve the performance by transforming data using scripts rather than complex formulas. Entry points will be added to manage specific needs.
-
Make the data unchangeable.
Classes and representations used in the XML mapping rules are linked to these tables, which contain only the data required to generate the XML. For specific purposes, you could link these tables to the origin tables.