Security change on December 1, 2026: TLS 1.2 will become the minimum standard for 365 business Print Agent. Details and system requirements
365 business development
365 business E-Invoice

ZUGFeRD XML Mapping Reference

This document lists all XML node mappings used when generating ZUGFeRD 2.3 / Factur-X (Cross Industry Invoice, CII) documents from Microsoft Dynamics 365 Business Central posted sales invoices and credit memos.

The XML paths below are relative to CrossIndustryInvoice/SupplyChainTradeTransaction/ (or CrossIndustryInvoice/ExchangedDocument/ where noted). BT numbers follow EN 16931-1:2017 and the ZUGFeRD 2.3 EXTENDED profile.


Document Information (ExchangedDocument)

Paths are relative to CrossIndustryInvoice/ExchangedDocument/.

XML NodeBT FieldDescription
IDBT-1Invoice number — Sales Invoice / Credit Memo No.
TypeCodeBT-3Invoice type code (UNTDID 1001): 380 = Commercial Invoice, 381 = Credit Note, 386 = Prepayment Invoice
IssueDateTime/DateTimeStringBT-2Invoice issue date — Sales Invoice / Credit Memo Document Date
IncludedNote/Content (SubjectCode AAB)BT-22Payment terms note — text derived from the Payment Terms Code of the document (language-aware)
IncludedNote/Content (SubjectCode ACB)BT-22Invoice pre-text — concatenated descriptions from sales lines of type blank (text lines) placed before the first item line
IncludedNote/Content (SubjectCode REG)BT-22Seller company information block written for regulatory (Impressum) purposes; contains seller name, address, GLN (if enabled), and Leitweg-ID (if set)

Trade Agreement (ApplicableHeaderTradeAgreement)

Paths are relative to SupplyChainTradeTransaction/ApplicableHeaderTradeAgreement/.

XML NodeBT FieldDescription
BuyerReferenceBT-10Buyer routing reference — Sales Invoice External Document No. (used as the buyer's internal routing reference, e.g. Leitweg-ID of the buyer; omitted when blank)
SellerTradeParty/IDBT-29Seller identifier — Company Information GLN (only written when Use GLN in Electronic Document is enabled on Company Information)
SellerTradeParty/GlobalID[@schemeID='0088']BT-29Seller global identifier (GLN, scheme code 0088) — Company Information GLN (only written when Use GLN in Electronic Document is enabled)
SellerTradeParty/NameBT-27Seller name — Company Information Name + Name 2 (or the Responsibility Center name if one is assigned to the document)
SellerTradeParty/DefinedTradeContact/PersonNameBT-41Seller contact person name — Salesperson/Purchaser record Name for the salesperson assigned to the document
SellerTradeParty/DefinedTradeContact/TelephoneUniversalCommunication/CompleteNumberBT-42Seller contact telephone — Salesperson/Purchaser Phone No. (omitted when blank)
SellerTradeParty/DefinedTradeContact/EmailURIUniversalCommunication/URIIDBT-43Seller contact email address — Salesperson/Purchaser E-Mail (omitted when blank)
SellerTradeParty/PostalTradeAddress/PostcodeCodeBT-38Seller post code — Company Information / Responsibility Center Post Code
SellerTradeParty/PostalTradeAddress/LineOneBT-35Seller address line 1 — Company Information / Responsibility Center Address
SellerTradeParty/PostalTradeAddress/LineTwoBT-36Seller address line 2 — Company Information / Responsibility Center Address 2 (omitted when blank)
SellerTradeParty/PostalTradeAddress/LineThreeBT-162Seller address line 3 — available via integration event; not populated from standard BC fields
SellerTradeParty/PostalTradeAddress/CityNameBT-37Seller city — Company Information / Responsibility Center City
SellerTradeParty/PostalTradeAddress/CountryIDBT-40Seller country code (ISO 3166-1 alpha-2) — Company Information / Responsibility Center Country/Region Code
SellerTradeParty/SpecifiedTaxRegistration/ID[@schemeID='VA']BT-31Seller VAT identifier — Company Information VAT Registration No. (omitted when blank)
SellerTradeParty/SpecifiedTaxRegistration/ID[@schemeID='FC']BT-32Seller tax registration identifier — Company Information Registration No. (omitted when blank)
BuyerTradeParty/IDBT-46Buyer identifier — Service Participant ID of the customer (E-Document Service Participant); falls back to Customer GLN when no routing ID is present and GLN is enabled
BuyerTradeParty/GlobalID[@schemeID='0088']BT-56Buyer global identifier (GLN, scheme code 0088) — Customer GLN (only written when Use GLN in Electronic Document is enabled on the customer record)
BuyerTradeParty/NameBT-44Buyer name — Sales Invoice / Credit Memo Bill-to Name + Bill-to Name 2
BuyerTradeParty/PostalTradeAddress/PostcodeCodeBT-53Buyer post code — Sales Invoice / Credit Memo Bill-to Post Code
BuyerTradeParty/PostalTradeAddress/LineOneBT-50Buyer address line 1 — Sales Invoice / Credit Memo Bill-to Address
BuyerTradeParty/PostalTradeAddress/LineTwoBT-51Buyer address line 2 — Sales Invoice / Credit Memo Bill-to Address 2 (omitted when blank)
BuyerTradeParty/PostalTradeAddress/LineThreeBT-163Buyer address line 3 — available via integration event; not populated from standard BC fields
BuyerTradeParty/PostalTradeAddress/CityNameBT-52Buyer city — Sales Invoice / Credit Memo Bill-to City
BuyerTradeParty/PostalTradeAddress/CountryIDBT-55Buyer country code (ISO 3166-1 alpha-2) — Sales Invoice / Credit Memo Bill-to Country/Region Code
BuyerOrderReferencedDocument/IssuerAssignedIDBT-13Purchase order reference — Sales Invoice External Document No. (the customer's purchase order number)

Trade Delivery (ApplicableHeaderTradeDelivery)

Paths are relative to SupplyChainTradeTransaction/ApplicableHeaderTradeDelivery/.

XML NodeBT FieldDescription
ShipToTradeParty/NameBT-70Deliver-to party name — Sales Invoice / Credit Memo Ship-to Name + Ship-to Name 2
ShipToTradeParty/PostalTradeAddress/PostcodeCodeBT-78Deliver-to post code — Sales Invoice / Credit Memo Ship-to Post Code
ShipToTradeParty/PostalTradeAddress/LineOneBT-75Deliver-to address line 1 — Sales Invoice / Credit Memo Ship-to Address
ShipToTradeParty/PostalTradeAddress/LineTwoBT-76Deliver-to address line 2 — Sales Invoice / Credit Memo Ship-to Address 2 (omitted when blank)
ShipToTradeParty/PostalTradeAddress/LineThreeBT-165Deliver-to address line 3 — available via integration event; not populated from standard BC fields
ShipToTradeParty/PostalTradeAddress/CityNameBT-77Deliver-to city — Sales Invoice / Credit Memo Ship-to City
ShipToTradeParty/PostalTradeAddress/CountryIDBT-80Deliver-to country code (ISO 3166-1 alpha-2) — Sales Invoice / Credit Memo Ship-to Country/Region Code
ActualDeliverySupplyChainEvent/OccurrenceDateTime/DateTimeStringBT-72Actual delivery / shipment date — Sales Invoice / Credit Memo Shipment Date (omitted when blank)

Trade Settlement (ApplicableHeaderTradeSettlement)

Paths are relative to SupplyChainTradeTransaction/ApplicableHeaderTradeSettlement/.

Currency & Payment Means

XML NodeBT FieldDescription
InvoiceCurrencyCodeBT-5Invoice currency code (ISO 4217) — Sales Invoice Currency Code; defaults to the LCY code from General Ledger Setup when no foreign currency is used
SpecifiedTradeSettlementPaymentMeans/TypeCodeBT-81Payment means type code (UNTDID 4461) — read from Payment Method record field bdev.EInv ZUGFeRD Pmt. Method; defaults to 58 (SEPA Credit Transfer / BankTransfer) when not configured
SpecifiedTradeSettlementPaymentMeans/PayeePartyCreditorFinancialAccount/IBANIDBT-84Payment account IBAN — Bank Account IBAN identified by the Company Bank Account Code on the document; falls back to Company Information IBAN when no specific bank account is set
SpecifiedTradeSettlementPaymentMeans/PayeePartyCreditorFinancialAccount/AccountNameBT-85Payment account name — Company Information Name
SpecifiedTradeSettlementPaymentMeans/PayeeSpecifiedCreditorFinancialInstitution/BICIDBT-86Payment service provider BIC/SWIFT — Bank Account SWIFT Code; falls back to Company Information SWIFT Code

Billing Period

XML NodeBT FieldDescription
BillingSpecifiedPeriod/StartDateTime/DateTimeStringBT-73Invoice period start date — Header Model BillingPeriodFrom (omitted when not set; must be populated via integration event)
BillingSpecifiedPeriod/EndDateTime/DateTimeStringBT-74Invoice period end date — Header Model BillingPeriodTo (omitted when not set; must be populated via integration event)

Document-Level Allowances and Charges (BG-20 / BG-21)

Sourced from posted sales lines of type Charge (Item). A negative Amount produces an allowance (ChargeIndicator = false); a positive Amount produces a charge (ChargeIndicator = true).

XML NodeBT FieldDescription
SpecifiedTradeAllowanceCharge/ChargeIndicator/IndicatorBT-92 / BT-99Charge or allowance indicator — false for document-level allowance (BG-20), true for document-level charge (BG-21)
SpecifiedTradeAllowanceCharge/ActualAmountBT-92 / BT-99Allowance / charge amount (absolute value) — Sales Line Amount (absolute) for lines of type Charge (Item)
SpecifiedTradeAllowanceCharge/ReasonBT-97 / BT-104Allowance / charge reason text — Sales Line Description
SpecifiedTradeAllowanceCharge/CategoryTradeTax/TypeCode—Tax type code — always VAT
SpecifiedTradeAllowanceCharge/CategoryTradeTax/CategoryCodeBT-95 / BT-102VAT category code — VAT Posting Setup Tax Category for the sales line
SpecifiedTradeAllowanceCharge/CategoryTradeTax/RateApplicablePercentBT-96 / BT-103VAT rate — Sales Line VAT %

VAT Breakdown (BG-23)

One group per unique combination of VAT category code and rate, aggregated from all invoice lines.

XML NodeBT FieldDescription
ApplicableTradeTax/CalculatedAmountBT-117VAT category tax amount — sum of VAT Amount for the VAT group
ApplicableTradeTax/TypeCode—Tax type code — always VAT
ApplicableTradeTax/BasisAmountBT-116VAT category taxable amount — sum of VAT Base for the VAT group
ApplicableTradeTax/CategoryCodeBT-118VAT category code — from the VAT Amount Line Tax Category
ApplicableTradeTax/ExemptionReasonCodeBT-121VAT exemption reason code — VAT Posting Setup field bdev.EInv ZUGFeRD TaxCatReason (omitted when blank)
ApplicableTradeTax/RateApplicablePercentBT-119VAT category rate — VAT % for the VAT group

Payment Terms

XML NodeBT FieldDescription
SpecifiedTradePaymentTerms/DescriptionBT-20Payment terms description — text generated from the Payment Terms Code (language-aware)
SpecifiedTradePaymentTerms/DueDateDateTime/DateTimeStringBT-9Payment due date — Sales Invoice / Credit Memo Due Date (always written; output is 00000000 when the date is not set)
SpecifiedTradePaymentTerms/ApplicableTradePaymentDiscountTerms/BasisPeriodMeasure[@unitCode='DAY']—Cash discount period in days — derived from Payment Terms record field Discount Date Calculation (converted to number of days; omitted when no discount applies)
SpecifiedTradePaymentTerms/ApplicableTradePaymentDiscountTerms/CalculationPercent—Cash discount percentage — Sales Invoice Payment Discount % (omitted when zero)

Monetary Summation (BG-22)

XML NodeBT FieldDescription
SpecifiedTradeSettlementHeaderMonetarySummation/LineTotalAmountBT-106Sum of invoice line net amounts
SpecifiedTradeSettlementHeaderMonetarySummation/ChargeTotalAmountBT-108Sum of document-level charges
SpecifiedTradeSettlementHeaderMonetarySummation/AllowanceTotalAmountBT-107Sum of document-level allowances
SpecifiedTradeSettlementHeaderMonetarySummation/TaxBasisTotalAmountBT-109Invoice total amount without VAT
SpecifiedTradeSettlementHeaderMonetarySummation/TaxTotalAmount[@currencyID]BT-110Invoice total VAT amount in invoice currency
SpecifiedTradeSettlementHeaderMonetarySummation/GrandTotalAmountBT-112Invoice total amount with VAT
SpecifiedTradeSettlementHeaderMonetarySummation/DuePayableAmountBT-115Amount due for payment

Invoice Lines (IncludedSupplyChainTradeLineItem)

Paths are relative to SupplyChainTradeTransaction/IncludedSupplyChainTradeLineItem/. One element per posted sales line. Lines of type Charge (Item) and lines with zero quantity are excluded (charges are handled as document-level allowances/charges).

Line Identification

XML NodeBT FieldDescription
AssociatedDocumentLineDocument/LineIDBT-126Invoice line identifier — Sales Line Line No.

Product / Item Information (BG-31)

XML NodeBT FieldDescription
SpecifiedTradeProduct/SellerAssignedIDBT-155Seller's item identifier — Sales Line No. (item or resource number; omitted for G/L Account lines and when blank)
SpecifiedTradeProduct/BuyerAssignedIDBT-156Buyer's item identifier — Sales Line Item Reference No. when the reference type is Customer (omitted otherwise)
SpecifiedTradeProduct/GlobalID[@schemeID='0160']BT-157Item standard identifier (GTIN, scheme code 0160) — Item GTIN (omitted when blank)
SpecifiedTradeProduct/NameBT-153Item name — Sales Line Description
SpecifiedTradeProduct/DescriptionBT-154Item description — concatenated descriptions from blank-type (text) sales lines that immediately follow this line, up to the next non-text line or first empty line (omitted when no text lines are present)
SpecifiedTradeProduct/OriginTradeCountry/IDBT-159Item country of origin (ISO 3166-1 alpha-2) — Item Country/Region of Origin Code (omitted when blank)

Line Price (BG-29)

XML NodeBT FieldDescription
SpecifiedLineTradeAgreement/NetPriceProductTradePrice/ChargeAmountBT-146Item net price — Sales Line Unit Price (net of VAT; automatically converted from gross when Prices Including VAT is enabled on the sales document)

Line Delivery (BG-25 — quantity)

XML NodeBT FieldDescription
SpecifiedLineTradeDelivery/BilledQuantityBT-129Billed quantity — Sales Line Quantity
SpecifiedLineTradeDelivery/BilledQuantity/@unitCodeBT-130Unit of measure code (UN/ECE Recommendation 20) — mapped from Sales Line Unit of Measure Code via the International Standard Code on the Unit of Measure record; defaults to EA (each) when not set

Line Settlement

Line VAT Information (BG-30)

XML NodeBT FieldDescription
SpecifiedLineTradeSettlement/ApplicableTradeTax/TypeCode—Tax type code — always VAT
SpecifiedLineTradeSettlement/ApplicableTradeTax/CategoryCodeBT-151Invoiced item VAT category code — VAT Posting Setup Tax Category; defaults to S (standard rate) when blank
SpecifiedLineTradeSettlement/ApplicableTradeTax/ExemptionReasonCodeBT-164Tax exemption reason code — VAT Posting Setup field bdev.EInv ZUGFeRD TaxCatReason (omitted when blank)
SpecifiedLineTradeSettlement/ApplicableTradeTax/RateApplicablePercentBT-152Invoiced item VAT rate — Sales Line VAT %

Line Billing Period

Note: BT-134 / BT-135 fields exist in the internal Line Model and import XPath definitions, but are not written to XML during export by the current implementation. They are import-only fields.

XML NodeBT FieldDescription
SpecifiedLineTradeSettlement/BillingSpecifiedPeriod/StartDateTime/DateTimeStringBT-134Invoice line period start date — Line Model BillingPeriodFrom (import only; not exported)
SpecifiedLineTradeSettlement/BillingSpecifiedPeriod/EndDateTime/DateTimeStringBT-135Invoice line period end date — Line Model BillingPeriodTo (import only; not exported)

Line Allowances (BG-27)

Line discounts are written as line-level allowances (ChargeIndicator = false). Both a line discount and an invoice discount can be written for the same line.

XML NodeBT FieldDescription
SpecifiedLineTradeSettlement/SpecifiedTradeAllowanceCharge/ChargeIndicator/Indicator—Allowance indicator — always false (line-level allowance)
SpecifiedLineTradeSettlement/SpecifiedTradeAllowanceCharge/BasisAmountBT-137Invoice line allowance base amount — Sales Line Line Discount Amount
SpecifiedLineTradeSettlement/SpecifiedTradeAllowanceCharge/ActualAmountBT-136Invoice line allowance amount — Sales Line Line Discount Amount (line discount) or Inv. Discount Amount (invoice discount)
SpecifiedLineTradeSettlement/SpecifiedTradeAllowanceCharge/ReasonBT-139Invoice line allowance reason — Line Discount or Invoice Discount (translated label)

Line Net Amount

XML NodeBT FieldDescription
SpecifiedLineTradeSettlement/SpecifiedTradeSettlementLineMonetarySummation/LineTotalAmountBT-131Invoice line net amount — Sales Line Amount (net of VAT and discounts)

Notes

  • BT-39 / BT-54 (County/State): The seller county (Company Information / Responsibility Center "County") and buyer county (Bill-to County) are stored in the internal model but are not written to the XML output. CountrySubDivisionName is omitted from all PostalTradeAddress elements.
  • BT-29 / GLN: When Use GLN in Electronic Document is disabled on Company Information, neither SellerTradeParty/ID nor SellerTradeParty/GlobalID is written. The Seller Leitweg-ID (BT-29) field exists in the model but is not yet sourced from a standard BC field (planned extension).
  • BT-10 / BuyerReference: The BuyerReference element receives the Sales Invoice External Document No.. The same value is also written to BuyerOrderReferencedDocument/IssuerAssignedID (BT-13). The buyer's routing identifier (Service Participant ID / Leitweg-ID) is written to BuyerTradeParty/ID (BT-46).
  • BT-48 (Buyer VAT identifier): The buyer's VAT Registration No. is stored in the internal model (BuyerVATRegistrationNo) but is not written to the XML output (BuyerTradeParty/SpecifiedTaxRegistration is omitted).
  • Integration events: The model exposes OnBeforeInsertSalesInvoiceCrMemoHeaderToModel and OnBeforeInsertSalesInvoiceCrMemoLineToModel integration events that allow partner extensions to populate or override any model field before the XML is generated.
  • Profile identifier: The ExchangedDocumentContext/GuidelineSpecifiedDocumentContextParameter/ID element is hardcoded to urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended (ZUGFeRD 2.3 EXTENDED / Factur-X 1.0 EXTENDED profile). This value is not user-configurable.
Last modified on