Prepare Custom XML Invoice Files
Prepare custom XML invoice files for processing by Payables Agent. Review supported file formats, required and recommended invoice elements, schema and mapping recommendations, and validation requirements to help ensure exact invoice creation.
Supported XML File Formats
Prepare a Single XML File with Header and Line Data. Use this format when invoice header and line information are included in the same XML document.
Guidelines:
-
Structure the XML using a clear parent-child hierarchy.
-
Represent invoice header information at the invoice level.
-
Represent invoice lines as child elements of the corresponding invoice.
-
Ensure that all invoice lines are nested under the correct invoice header.
-
Use meaningful and consistent element names across all invoice files.
Example structure:
<Invoice>
<InvoiceNumber>INV1001</InvoiceNumber>
<InvoiceDate>2025-01-15</InvoiceDate>
<SupplierName>ABC Supplier</SupplierName>
<InvoiceLines>
<InvoiceLine>
<LineNumber>1</LineNumber>
<Description>Item A</Description>
<Quantity>10</Quantity>
<UnitPrice>100</UnitPrice>
</InvoiceLine>
</InvoiceLines>
</Invoice>
Minimum Required Invoice Data
Each invoice must include the minimum information required for invoice creation:
-
Invoice Number
-
Invoice Date
-
Invoice Amount
-
Currency
-
Supplier
-
Invoice Line Amount
For purchase order (PO)-matched invoices, include a valid Purchase Order Number to support successful matching.
Recommended Invoice Header Attributes
To improve invoice processing accuracy and reduce validation errors, include these header elements whenever available:
-
Business Unit
-
Supplier Name or Supplier Number
-
Supplier Site
-
Invoice Number
-
Invoice Date
-
Invoice Amount
-
Currency
-
Payment Terms
-
Purchase Order Number (if applicable)
Example:
<Invoice>
<BusinessUnit>Vision Operations</BusinessUnit>
<SupplierNumber>1001</SupplierNumber>
<InvoiceNumber>INV1001</InvoiceNumber>
<InvoiceDate>2025-01-15</InvoiceDate>
<InvoiceAmount>1000.00</InvoiceAmount>
<Currency>USD</Currency>
</Invoice>
Recommended Invoice Line Attributes
Include these line-level elements whenever available:
-
Invoice Line Number
-
Item Description
-
Purchase Order Number (if applicable)
-
Purchase Order Line Number (if applicable)
-
Quantity
-
Unit Price
-
Line Amount
-
Tax Amount (if applicable)
-
Distribution or Charge Account (if applicable)
Example:
<InvoiceLine>
<LineNumber>1</LineNumber>
<Description>Consulting Services</Description>
<Quantity>10</Quantity>
<UnitPrice>100.00</UnitPrice>
<LineAmount>1000.00</LineAmount>
</InvoiceLine>
XML File Design Best Practices
To maximize automation accuracy and simplify data mapping:
-
Use descriptive element names.
-
Maintain a consistent XML structure across all files from the same source.
-
Use a single XML schema design for each supplier integration whenever possible.
-
Avoid deeply nested or overly complex structures unless required by the business process.
-
Ensure that each XML element contains only one logical data value.
-
Use standardized formats for dates, currencies, quantities, and monetary amounts.
-
Use UTF-8 character encoding to support international characters and special symbols.
-
Avoid special characters in element names.
-
Ensure that opening and closing tags match.
-
Remove unused, empty, or redundant elements whenever possible.
-
Avoid duplicate invoice records within the same XML document.
-
Ensure invoice numbers uniquely identify invoices within a file.
-
For PO-matched invoices, ensure that all referenced purchase orders exist and are valid.
XML Schema and Mapping Recommendations
When designing XML integrations:
-
Define and document the XML structure clearly.
-
Use a consistent schema definition (XSD) where possible.
-
Keep element names stable across versions to minimize mapping changes.
-
Clearly distinguish between invoice header elements and invoice line elements.
-
Use unique invoice identifiers to establish relationships between invoice data and related business records.
-
Validate XML documents against the expected schema before processing.
Validation Recommendations
Before invoice creation, validate these:
-
XML is well-formed and can be parsed successfully.
-
XML conforms to the expected schema definition, if applicable.
-
Required invoice elements are present.
-
Every invoice contains at least one invoice line.
-
Invoice amounts and line amounts are valid and properly formatted.
-
Invoice line totals reconcile with invoice header totals where applicable.
-
Supplier and supplier site information is valid.
-
Currency codes are valid and supported.
-
Purchase order references are valid for PO-matched invoices.
-
Invoice numbers are unique within the document.
Follow XML File Design Principles
A custom XML file should have clear element names, consistent hierarchical relationships, and a well-defined schema. These practices improve invoice processing accuracy, reduce validation failures, and minimize manual intervention during invoice creation.