Skip to content

E-Invoice Data Mapping

JustOn Billing & Invoice Management generates electronic invoices on the basis of a standard mapping that aligns invoice data with the EN 16931 Semantic Model. The standard mapping covers the most common use cases for XRechnung UBL, Peppol BIS Billing UBL and ZUGFeRD CII output. For cases where the standard output does not match your specific business or tenant requirements, you can define custom field mappings without any code change.

In addition, you can control how invoice line items that reduce the invoiced amount are represented – either as itemized invoice lines or as document-level allowances and charges.

Default Mapping

The following table lists the e-invoice fields that JustOn Billing & Invoice Management sets by default in Peppol BIS Billing, XRechnung and ZUGFeRD files (see E-Invoice Formats), as well as their corresponding source objects and fields.

Info

Be aware that specific use cases may require additional information, which you will then have to provide in corresponding fields.

ID E-Invoice Target Area Data Source
Object > Field
BT-1 Invoice Number General Invoice > Invoice No
BT-2 Invoice Issue Date General Invoice > Date
BT-9 Payment Due Date General Invoice > Payment Due Date
BT-10 Buyer Reference General Invoice > Buyer Reference
BT-13 Purchase Order Reference General Invoice > Purchase Order No
BT-20 Payment Terms General Invoice > Payment Info + Discount Rate + Discount Payment Due
BT-22 Invoice Note General Invoice > Text 1
BT-25 Preceding Invoice Reference General Invoice > Related With
BT-27 Seller Name Seller identification Business Entity > Company
BT-29 Seller Identifier Seller identification Invoice > Seller Id
BT-30 Seller Legal Registration Identifier Seller identification Business Entity > E-Invoice Sender Legal Identifier
BT-30-1 Seller Legal Registration Identifier Identification Scheme Identifier Seller identification Business Entity > E-Invoice Sender Legal ID Scheme
BT-31 Seller VAT Identifier Seller identification Business Entity > Tax ID
BT-34 Seller Electronic Address Seller identification Business Entity > E-Invoice Sender Address
BT-34-1 Seller Electronic Address Identification Scheme Identifier Seller identification Business Entity > E-Invoice Sender Scheme Id
BT-35 Seller address Line 1 Seller address Business Entity > Street
BT-37 Seller City Seller address Business Entity > City
BT-38 Seller Post Code Seller address Business Entity > Postal Code
BT-39 Seller Country Subdivision Seller address Business Entity > State Code
BT-40 Seller Country Code Seller address Business Entity > Country Code
BT-41 Seller Contact Point Seller address Business Entity > Company
BT-42 Seller Contact Telephone Number Seller address Business Entity > Phone
BT-43 Seller Contact Email Address Seller address Business Entity > Email Sender
BT-44 Buyer Name Buyer identification Invoice > Account Name
BT-47 Buyer Legal Registration Identifier Buyer identification Invoice > E-Invoice Recipient Legal Identifier
BT-47-1 Buyer Legal Registration Identifier Identification Scheme Identifier Buyer identification Invoice > E-Invoice Recipient Legal ID Scheme
BT-48 Buyer VAT Identifier Buyer identification Account > ON_VATNumber
Account > VATIN
BT-49 Buyer Electronic Address Buyer identification Invoice > E-Invoice Recipient Address
BT-49-1 Buyer Electronic Address Identification Scheme Identifier Buyer identification Invoice > E-Invoice Recipient Scheme Id
BT-50 Buyer address Line 1 Buyer address Invoice > Billing Street
BT-52 Buyer City Buyer address Invoice > Billing City
BT-53 Buyer Post Code Buyer address Invoice > Billing PostalCode
BT-54 Buyer Country Subdivision Buyer address Invoice > Billing State
BT-55 Buyer Country Code Buyer address Invoice > Billing CountryCode
BT-56 Buyer Contact Point Buyer address Invoice > Contact > Name
BT-57 Buyer Contact Telephone Number Buyer address Invoice > Contact > Phone
BT-58 Buyer Contact Email Adress Buyer address Invoice > Contact > Email
BT-73 Invoicing Period Start Date Invoice period Invoice > Service Period Start
BT-74 Invoicing Period End Date Invoice period Invoice > Service Period End
BT-75 Deliver to Address Line 1 Shipping address Invoice > Shipping Street
BT-77 Deliver to City Shipping address Invoice > Shipping City
BT-78 Deliver to Post Code Shipping address Invoice > Shipping Postal Code
BT-79 Deliver to Country Subdivision Shipping address Invoice > Shipping State Code
BT-80 Deliver to Country Code Shipping address Invoice > Shipping Country Code
BT-82 Payment Means Text Payment information Invoice > Payment Method
BT-83 Remittance Information Payment information Invoice > Payment Reference
BT-84 Payment Account Identifier Payment information Business Entity > IBAN
BT-89 Mandate Reference Identifier Payment information Invoice > Direct Debit Mandate Reference
BT-90 Bank Assigned Creditor Identifier Payment information Business Entity > SEPA Creditor ID
BT-91 Debited Account Identifier Payment information Invoice > Requested Payment Instrument > IBAN
Invoice > Account > Current SEPA Mandate > IBAN
Invoice > Bank Account
BT-106 Sum of Invoice Line Net Amount Invoice totals Invoice > Total (net)
BT-109 Invoice Total Amount Without VAT Invoice totals Invoice > Total (net)
BT-110 Invoice Total VAT Amount Invoice totals Invoice > Total (tax)
BT-112 Invoice Total Amount With VAT Invoice totals Invoice > Grand Total
BT-113 Paid Amount Invoice totals Invoice > Balance Difference
BT-115 Amount Due for Payment Invoice totals Invoice > Balance
BT-122 Supporting Document Reference General Content Document > Title
BT-123 Supporting Document Description General Content Document > Description
BT-125 Supporting Document General Content Document > Title + File Extension + Base64-encoded content
BT-126 Invoice Line Identifier Invoice line item information Invoice Line Item > Sequence
BT-127 Invoice Line Note Invoice line item information Invoice Line Item > Title + Description
BT-129 Invoiced Quantity Invoice line item information Invoice Line Item > Display Quantity
BT-130 Invoiced Quantity Unit of Measure Invoice line item information Invoice Line Item > Unit Code
BT-131 Invoice Line Net Amount Invoice line item information Invoice Line Item > Pos. Total (net)
BT-134 Invoice Line Period Start Date Invoice line item period Invoice Line Item > Service Period Start
BT-135 Invoice Line Period End Date Invoice line item period Invoice Line Item > Service Period End
BT-136 Invoice Line Allowance Amount Invoice line item discount Invoice Line Item > Calculated Net Discount
BT-151 Invoiced Item VAT Category Code Invoice line item information Invoice Line Item > VAT Category Code
BT-152 Invoiced Item VAT Rate Invoice line item information Invoice Line Item > Tax Rate
BT-153 Item Name Invoice line item information Invoice Line Item > Title
BT-154 Item Description Invoice line item information Invoice Line Item > Description

Info

The table above shows the mapping of itemized invoice lines, which is the default. If you have enabled document-level allowances and charges, offsetting positions are mapped to BG-20 or BG-21 instead, and the invoice totals are calculated accordingly.

Custom Mapping

In some scenarios the standard mapping is not sufficient – for example, when a recipient requires additional business terms, when invoice data is stored in custom fields, or when a business term must hold a different static value than the one provided by JustOn Billing & Invoice Management. Custom e-invoice field mapping lets you override the standard mapping per business term, per format and per business entity, without any code change.

Custom field mappings let you override how JustOn Billing & Invoice Management fills individual fields in the outgoing e-invoice XML. Each override is addressed by its EN 16931 business term – for example, BT-22 for the invoice note or BT-20 for the payment terms – so you work with the e-invoice standard rather than with JustOn's internal data model.

For details on managing custom field mappings, see Configuring Custom E-Invoice Field Mappings.

Supported E-Invoice Formats

Custom field mapping is available for the following output formats:

  • XRechnung UBL
  • Peppol BIS Billing UBL
  • ZUGFeRD

Implementation Details

When JustOn Billing & Invoice Management generates an e-invoice, it first produces the standard output and then applies the active custom mapping on top: each active override replaces the value of the corresponding business term with either a Salesforce field value or a static value from the mapping configuration.

A mapping configuration is always scoped to a combination of business entity and e-invoice format. Only one mapping configuration can be active at a time per combination, so activating a new configuration automatically supersedes the previous one for that pair.

Within a configuration, there can be multiple configuration entries. Each configuration entry holds one business term override setting, which is uniquely identified by its business term and target element. The same business term can therefore appear more than once in a configuration, but only when it targets different elements. Each configuration entry (within the mapping configuration) can be activated or deactivated indidiidually.

Info

Custom e-invoice field mapping does not add new business terms to the EN 16931 catalog and does not change the e-invoice formats that JustOn Billing & Invoice Management can produce. It is a configuration layer applied on top of the standard data mapping when an e-invoice is generated.

Document-Level Allowances and Charges

Invoices may include offsetting positions, like bonuses or surcharges – invoice line items with a negative amount on invoices, invoice line items with a positive amount on credits. These invoice line items are balanced against the invoice amount.

By default, JustOn Billing & Invoice Management writes every invoice line item as an itemized invoice line (BG-25), including offsetting positions. As of v2.121, you can optionally have offsetting positions written as document-level allowances or charges instead. This may be necessary for specific target markets, because some mandates reject invoices whose invoice lines mix positive and negative amounts.

Info

The option is disabled by default. Existing configurations that do not specify it keep the itemized representation, which leaves the produced e-invoice files unchanged.

Data Mapping and Total Recalculation

With the option enabled, JustOn Billing & Invoice Management applies the following rules:

  • Each offsetting position produces one dedicated allowance or charge.

    Invoice Class Offsetting Position Represented As
    Invoice invoice line item with a negative net amount BG-20 (DOCUMENT LEVEL ALLOWANCES)
    Credit invoice line item with a positive net amount BG-21 (DOCUMENT LEVEL CHARGES)
  • All other invoice line items remain itemized invoice lines (BG-25).

  • Allowance and charge amounts are always positive. The direction is expressed by the allowance/charge distinction alone, never by the sign of the amount.
  • Each allowance or charge carries the VAT category code and the tax rate of the invoice line item it originates from.
  • Invoice line items with a net amount of zero always remain invoice lines.

The offsetting positions are mapped as follows:

ID E-Invoice Target Area Data Source
Object > Field
BT-92 Document Level Allowance Amount Document level allowance Invoice Line Item > Pos. Total (net)
Written as an absolute value.
BT-95 Document Level Allowance VAT Category Code Document level allowance Invoice Line Item > VAT Category Code
BT-96 Document Level Allowance VAT Rate Document level allowance Invoice Line Item > Tax Rate
BT-97 Document Level Allowance Reason Document level allowance Invoice Line Item > Title
If empty, falls back to Title + Description, then to Sequence, then to the fixed text Offsetting position.
BT-99 Document Level Charge Amount Document level charge Invoice Line Item > Pos. Total (net)
Written as an absolute value.
BT-102 Document Level Charge VAT Category Code Document level charge Invoice Line Item > VAT Category Code
BT-103 Document Level Charge VAT Rate Document level charge Invoice Line Item > Tax Rate
BT-104 Document Level Charge Reason Document level charge Invoice Line Item > Title
If empty, falls back to Title + Description, then to Sequence, then to the fixed text Offsetting position.

Moving offsetting positions out of the invoice lines will change the invoice totals (BG-22) and the VAT breakdown (BG-23). JustOn Billing & Invoice Management recalculates them so that the produced e-invoice remains arithmetically consistent:

ID E-Invoice Target Calculation
BT-106 Sum of Invoice Line Net Amount Sum of the net amounts of the remaining invoice lines
BT-107 Sum of Allowances on Document Level Sum of all document-level allowance amounts (BT-92)
Omitted if there are no allowances.
BT-108 Sum of Charges on Document Level Sum of all document-level charge amounts (BT-99)
Omitted if there are no charges.
BT-109 Invoice Total Amount Without VAT BT-106 – BT-107 + BT-108
BT-110 Invoice Total VAT Amount Sum of the VAT category tax amounts of the recalculated VAT breakdown
BT-112 Invoice Total Amount With VAT BT-109 + BT-110
BT-115 Amount Due for Payment BT-112

In addition, the VAT breakdown (BG-23) is recalculated per combination of VAT category code and tax rate, so that the relocated amounts are accounted for in the correct tax category.

Note

With the option enabled, BT-106 and BT-115 no longer correspond to the invoice fields listed in the default mapping – they are calculated as shown above.

Configuring the Option

The option is set per e-invoice format and per business entity, which lets you use it for one format while others keep the itemized representation. Where you set it depends on the format:

Format Configuration
XRechnung UBL
Peppol BIS Billing UBL
ZUGFeRD
Using a toggle on the custom mapping configuration, see Enabling Document-Level Allowances and Charges
Avalara ELR country mandates Using a key in the mandate configuration, see Enabling Document-Level Allowances and Charges

Info

Both options control the same behavior, so the produced allowances and charges are identical for all formats.