> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/administration-and-setup/settings/global-settings/document-types/edi/zugferd.md).

# ZUGFeRD Overview

## Einführung

ZUGFeRD (Zentraler User Guide des Forums elektronische Rechnung Deutschland) ist ein deutscher E-Invoicing-Standard, der auf der UN/CEFACT Cross Industry Invoice (CII) und dem ISO-Standard 19005-3 (PDF/A-3) basiert. Er ermöglicht den Austausch strukturierter Rechnungsdaten in einer PDF-Datei.

DocBits extrahiert Felder aus ZUGFeRD-Dokumenten und gleicht sie mit Infor ERP-Systemen (M3, LN) unter Verwendung von OAGIS BOD-Standards ab.

## Unterstützte ZUGFeRD-Versionen

DocBits unterstützt mehrere Versionen des ZUGFeRD-Standards:

* [ZUGFeRD 1.0](/administration-and-setup/settings/global-settings/document-types/edi/zugferd/zugferd-1-0.md)
* [ZUGFeRD 2.0](/administration-and-setup/settings/global-settings/document-types/edi/zugferd/zugferd-2-0.md)
* [ZUGFeRD 2.1 (Factur-X 1.0)](/administration-and-setup/settings/global-settings/document-types/edi/zugferd/zugferd-2-1.md)
* [ZUGFeRD 2.2](/administration-and-setup/settings/global-settings/document-types/edi/zugferd/zugferd-2-2.md)
* [ZUGFeRD 2.3](/administration-and-setup/settings/global-settings/document-types/edi/zugferd/zugferd-2-3.md)
* [ZUGFeRD 2.3.2](/administration-and-setup/settings/global-settings/document-types/edi/zugferd/zugferd-2-3-2.md)

## Vollständige Header-Feldzuordnung

### Invoice Identification

| ZUGFeRD CII Path                  | DocBits Field       | Infor BOD Field    | Type   | Description        |
| --------------------------------- | ------------------- | ------------------ | ------ | ------------------ |
| `ExchangedDocument/ID`            | `INVOICE_NUMBER`    | `DocumentID`       | STRING | Invoice number     |
| `ExchangedDocument/TypeCode`      | `INVOICE_TYPE_CODE` | `DocumentType`     | STRING | Invoice type code  |
| `ExchangedDocument/IssueDateTime` | `INVOICE_DATE`      | `DocumentDateTime` | DATE   | Invoice issue date |
| `ExchangedDocument/IncludedNote`  | `INVOICE_NOTE`      | `Note`             | STRING | Invoice notes      |

### Document Type & Sub-Type (TRA-driven)

> Same logic applies to **Factur-X** — Factur-X 1.x uses the same CII vocabulary as ZUGFeRD 2.x, so the dynamic block below is emitted for both.

In addition to the raw `INVOICE_TYPE_CODE`, the default TRANSFORMATION XSLT emits a canonical `<INVOICE>` tree with two derived fields:

| DocBits Field      | Source                                                                                                                                                    | Logic                                                                    |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| `INVOICE_TYPE`     | `ExchangedDocument/TypeCode` (or `HeaderExchangedDocument/TypeCode` for ZUGFeRD 1.0)                                                                      | UNCL 1001 `381` or `261` → **Credit Note**; any other code → **Invoice** |
| `INVOICE_SUB_TYPE` | `BuyerOrderReferencedDocument/IssuerAssignedID` presence (under `ApplicableHeaderTradeAgreement` for 2.x / `ApplicableSupplyChainTradeAgreement` for 1.0) | Non-empty → **Purchase Invoice**; empty/missing → **Cost Invoice**       |

`INVOICE_SUB_TYPE` discriminates PO-linked invoices from direct cost invoices for AP routing.

### Document References

| ZUGFeRD CII Path                      | DocBits Field     | Infor BOD Field   | Type   | Description             |
| ------------------------------------- | ----------------- | ----------------- | ------ | ----------------------- |
| `BuyerOrderReferencedDocument/ID`     | `PURCHASE_ORDER`  | `CustomerOrderID` | STRING | Purchase order number   |
| `ContractReferencedDocument/ID`       | `CONTRACT_NUMBER` | `ContractID`      | STRING | Contract reference      |
| `DespatchAdviceReferencedDocument/ID` | `DELIVERY_NOTE`   | `ShipmentID`      | STRING | Delivery note reference |

### Dates

| ZUGFeRD CII Path                                    | DocBits Field          | Infor BOD Field      | Type | Description          |
| --------------------------------------------------- | ---------------------- | -------------------- | ---- | -------------------- |
| `ExchangedDocument/IssueDateTime`                   | `INVOICE_DATE`         | `DocumentDateTime`   | DATE | Invoice date         |
| `ActualDeliverySupplyChainEvent/OccurrenceDateTime` | `DELIVERY_DATE`        | `ActualShipDateTime` | DATE | Delivery/ship date   |
| `SpecifiedTradePaymentTerms/DueDateDateTime`        | `DUE_DATE`             | `PaymentDueDateTime` | DATE | Payment due date     |
| `BillingSpecifiedPeriod/StartDateTime`              | `BILLING_PERIOD_START` | `BillingPeriodStart` | DATE | Billing period start |
| `BillingSpecifiedPeriod/EndDateTime`                | `BILLING_PERIOD_END`   | `BillingPeriodEnd`   | DATE | Billing period end   |

### Supplier (Seller) Information

| ZUGFeRD CII Path                                                       | DocBits Field        | Infor BOD Field       | Type   | Description             |
| ---------------------------------------------------------------------- | -------------------- | --------------------- | ------ | ----------------------- |
| `SellerTradeParty/ID`                                                  | `VENDOR_ID`          | `SupplierPartyID`     | STRING | Supplier ID             |
| `SellerTradeParty/GlobalID`                                            | `VENDOR_GLN`         | `SupplierPartyGLN`    | STRING | Global Location Number  |
| `SellerTradeParty/Name`                                                | `VENDOR_NAME`        | `SupplierPartyName`   | STRING | Supplier name           |
| `SellerTradeParty/PostalTradeAddress/Line1`                            | `VENDOR_ADDRESS`     | `SupplierAddress1`    | STRING | Address line 1          |
| `SellerTradeParty/PostalTradeAddress/Line2`                            | `VENDOR_ADDRESS_2`   | `SupplierAddress2`    | STRING | Address line 2          |
| `SellerTradeParty/PostalTradeAddress/PostcodeCode`                     | `VENDOR_POSTAL_CODE` | `SupplierPostalCode`  | STRING | Postal code             |
| `SellerTradeParty/PostalTradeAddress/CityName`                         | `VENDOR_CITY`        | `SupplierCity`        | STRING | City                    |
| `SellerTradeParty/PostalTradeAddress/CountryID`                        | `VENDOR_COUNTRY`     | `SupplierCountryCode` | STRING | Country code            |
| `SellerTradeParty/SpecifiedTaxRegistration/ID`                         | `VAT_NO_EXTRACTED`   | `SupplierTaxID`       | STRING | VAT registration number |
| `SellerTradeParty/DefinedTradeContact/EmailURIID`                      | `VENDOR_EMAIL`       | `SupplierEmail`       | STRING | Email                   |
| `SellerTradeParty/DefinedTradeContact/TelephoneUniversalCommunication` | `VENDOR_PHONE`       | `SupplierPhone`       | STRING | Phone                   |

### Buyer Information

| ZUGFeRD CII Path                                  | DocBits Field         | Infor BOD Field       | Type   | Description            |
| ------------------------------------------------- | --------------------- | --------------------- | ------ | ---------------------- |
| `BuyerTradeParty/ID`                              | `COMPANY_ID`          | `CustomerPartyID`     | STRING | Customer ID            |
| `BuyerTradeParty/GlobalID`                        | `COMPANY_GLN`         | `CustomerPartyGLN`    | STRING | Global Location Number |
| `BuyerTradeParty/Name`                            | `COMPANY_NAME`        | `CustomerPartyName`   | STRING | Company name           |
| `BuyerTradeParty/PostalTradeAddress/Line1`        | `COMPANY_ADDRESS`     | `CustomerAddress1`    | STRING | Address line 1         |
| `BuyerTradeParty/PostalTradeAddress/PostcodeCode` | `COMPANY_POSTAL_CODE` | `CustomerPostalCode`  | STRING | Postal code            |
| `BuyerTradeParty/PostalTradeAddress/CityName`     | `COMPANY_CITY`        | `CustomerCity`        | STRING | City                   |
| `BuyerTradeParty/PostalTradeAddress/CountryID`    | `COMPANY_COUNTRY`     | `CustomerCountryCode` | STRING | Country code           |
| `BuyerTradeParty/SpecifiedTaxRegistration/ID`     | `COMPANY_VAT_ID`      | `CustomerTaxID`       | STRING | VAT ID                 |

### Payment Information

| ZUGFeRD CII Path                                   | DocBits Field    | Infor BOD Field | Type   | Description               |
| -------------------------------------------------- | ---------------- | --------------- | ------ | ------------------------- |
| `PayeePartyCreditorFinancialAccount/IBANID`        | `IBAN_EXTRACTED` | `PayeeIBAN`     | STRING | IBAN                      |
| `PayeeSpecifiedCreditorFinancialInstitution/BICID` | `BIC`            | `PayeeBIC`      | STRING | BIC/SWIFT code            |
| `SpecifiedTradePaymentTerms/Description`           | `PAYMENT_TERMS`  | `PaymentTerms`  | STRING | Payment terms description |
| `SpecifiedTradeSettlementPaymentMeans/TypeCode`    | `PAYMENT_METHOD` | `PaymentMethod` | STRING | Payment method code       |

### Currency & Amounts (Header Level)

| ZUGFeRD CII Path       | DocBits Field      | Infor BOD Field        | Type   | Description      |
| ---------------------- | ------------------ | ---------------------- | ------ | ---------------- |
| `InvoiceCurrencyCode`  | `CURRENCY`         | `CurrencyCode`         | STRING | Invoice currency |
| `TaxBasisTotalAmount`  | `TOTAL_NET_AMOUNT` | `TaxBasisTotalAmount`  | AMOUNT | Total net amount |
| `TaxTotalAmount`       | `TOTAL_TAX_AMOUNT` | `TaxTotalAmount`       | AMOUNT | Total tax amount |
| `GrandTotalAmount`     | `TOTAL_AMOUNT`     | `GrandTotalAmount`     | AMOUNT | Grand total      |
| `DuePayableAmount`     | `AMOUNT_DUE`       | `DuePayableAmount`     | AMOUNT | Amount due       |
| `TotalPrepaidAmount`   | `PREPAID_AMOUNT`   | `TotalPrepaidAmount`   | AMOUNT | Prepaid amount   |
| `AllowanceTotalAmount` | `NEGATIVE_AMOUNT`  | `AllowanceTotalAmount` | AMOUNT | Total allowances |
| `ChargeTotalAmount`    | `CHARGES`          | `ChargeTotalAmount`    | AMOUNT | Total charges    |

### Tax Breakdown (Tier-classified)

The default TRANSFORMATION XSLT distributes `ApplicableTradeTax` blocks across three rate-based tiers rather than using positional indexes. Each block is matched to a tier by its `RateApplicablePercent`:

| Tier              | DocBits Fields                               | Selection Rule |
| ----------------- | -------------------------------------------- | -------------- |
| Tier 1 (Standard) | `TAX_RATE`, `NET_AMOUNT`, `TAX_AMOUNT`       | rate ≥ 19      |
| Tier 2 (Reduced)  | `TAX_RATE_2`, `NET_AMOUNT_2`, `TAX_AMOUNT_2` | 0 < rate < 19  |
| Tier 3 (Zero)     | `TAX_RATE_3`, `NET_AMOUNT_3`, `TAX_AMOUNT_3` | rate = 0       |

| ZUGFeRD CII Path                                    | DocBits Field  | Infor BOD Field  | Type   | Description                  |
| --------------------------------------------------- | -------------- | ---------------- | ------ | ---------------------------- |
| `ApplicableTradeTax/RateApplicablePercent` (tier 1) | `TAX_RATE`     | `TaxPercent`     | NUMBER | Standard-rate VAT percentage |
| `ApplicableTradeTax/BasisAmount` (tier 1)           | `NET_AMOUNT`   | `TaxableAmount`  | AMOUNT | Standard-rate net amount     |
| `ApplicableTradeTax/CalculatedAmount` (tier 1)      | `TAX_AMOUNT`   | `TaxAmount`      | AMOUNT | Standard-rate tax amount     |
| `ApplicableTradeTax/RateApplicablePercent` (tier 2) | `TAX_RATE_2`   | `TaxPercent2`    | NUMBER | Reduced-rate VAT percentage  |
| `ApplicableTradeTax/BasisAmount` (tier 2)           | `NET_AMOUNT_2` | `TaxableAmount2` | AMOUNT | Reduced-rate net amount      |
| `ApplicableTradeTax/CalculatedAmount` (tier 2)      | `TAX_AMOUNT_2` | `TaxAmount2`     | AMOUNT | Reduced-rate tax amount      |
| `ApplicableTradeTax/RateApplicablePercent` (tier 3) | `TAX_RATE_3`   | `TaxPercent3`    | NUMBER | Zero-rate VAT percentage     |
| `ApplicableTradeTax/BasisAmount` (tier 3)           | `NET_AMOUNT_3` | `TaxableAmount3` | AMOUNT | Zero-rated net amount        |
| `ApplicableTradeTax/CalculatedAmount` (tier 3)      | `TAX_AMOUNT_3` | `TaxAmount3`     | AMOUNT | Zero-rate tax amount         |

## Complete Line Item (Table) Field Mapping

### Line Identification

| ZUGFeRD CII Path                         | DocBits Field          | Infor BOD Field   | Type   | Description          |
| ---------------------------------------- | ---------------------- | ----------------- | ------ | -------------------- |
| `AssociatedDocumentLineDocument/LineID`  | `POSITION`             | `LineNumber`      | STRING | Line number          |
| `SpecifiedTradeProduct/BuyerAssignedID`  | `ITEM_NUMBER`          | `BuyerItemID`     | STRING | Buyer's item number  |
| `SpecifiedTradeProduct/SellerAssignedID` | `SUPPLIER_ITEM_NUMBER` | `SellerItemID`    | STRING | Seller's item number |
| `SpecifiedTradeProduct/GlobalID`         | `ITEM_CODE`            | `ItemCode`        | STRING | Global ID (GTIN/EAN) |
| `SpecifiedTradeProduct/Name`             | `DESCRIPTION`          | `ItemDescription` | STRING | Item description     |

### Line References

| ZUGFeRD CII Path                          | DocBits Field    | Infor BOD Field           | Type   | Description          |
| ----------------------------------------- | ---------------- | ------------------------- | ------ | -------------------- |
| `BuyerOrderReferencedDocument/ID`         | `PURCHASE_ORDER` | `CustomerOrderID`         | STRING | Line-level PO number |
| `BuyerOrderReferencedDocument/LineID`     | `PO_LINE_NUMBER` | `CustomerOrderLineNumber` | STRING | PO line number       |
| `DespatchAdviceReferencedDocument/ID`     | `DELIVERY_NOTE`  | `ShipmentID`              | STRING | Delivery note        |
| `DespatchAdviceReferencedDocument/LineID` | `DELIVERY_LINE`  | `ShipmentLineNumber`      | STRING | Delivery line        |

### Quantities & Units

| ZUGFeRD CII Path           | DocBits Field      | Infor BOD Field    | Type   | Description          |
| -------------------------- | ------------------ | ------------------ | ------ | -------------------- |
| `BilledQuantity`           | `QUANTITY`         | `InvoicedQuantity` | NUMBER | Billed quantity      |
| `BilledQuantity/@unitCode` | `UNIT`             | `UnitCode`         | STRING | Unit of measure code |
| `PackageQuantity`          | `PACKAGE_QUANTITY` | `PackageQuantity`  | NUMBER | Number of packages   |

### Pricing

| ZUGFeRD CII Path                           | DocBits Field             | Infor BOD Field    | Type   | Description          |
| ------------------------------------------ | ------------------------- | ------------------ | ------ | -------------------- |
| `NetPriceProductTradePrice/ChargeAmount`   | `UNIT_PRICE`              | `UnitPrice`        | AMOUNT | Net unit price       |
| `GrossPriceProductTradePrice/ChargeAmount` | `GROSS_PRICE`             | `GrossUnitPrice`   | AMOUNT | Gross unit price     |
| `NetPriceProductTradePrice/BasisQuantity`  | `UNIT_PRICE_PER_QUANTITY` | `PricePerQuantity` | NUMBER | Price basis quantity |

### Line Amounts

| ZUGFeRD CII Path             | DocBits Field  | Infor BOD Field  | Type   | Description     |
| ---------------------------- | -------------- | ---------------- | ------ | --------------- |
| `LineTotalAmount`            | `TOTAL_AMOUNT` | `ExtendedAmount` | AMOUNT | Line total      |
| `TotalAllowanceChargeAmount` | `NET_AMOUNT`   | `NetAmount`      | AMOUNT | Line net amount |

### Line Tax

| ZUGFeRD CII Path                           | DocBits Field  | Infor BOD Field   | Type   | Description   |
| ------------------------------------------ | -------------- | ----------------- | ------ | ------------- |
| `ApplicableTradeTax/RateApplicablePercent` | `VAT`          | `TaxPercent`      | NUMBER | VAT rate      |
| `ApplicableTradeTax/TypeCode`              | `TAX_CODE`     | `TaxCode`         | STRING | Tax type code |
| `ApplicableTradeTax/CategoryCode`          | `TAX_CATEGORY` | `TaxCategoryCode` | STRING | Tax category  |

### Allowances & Charges (Line Level)

| ZUGFeRD CII Path                                 | DocBits Field      | Infor BOD Field    | Type   | Description          |
| ------------------------------------------------ | ------------------ | ------------------ | ------ | -------------------- |
| `AppliedTradeAllowanceCharge/ActualAmount`       | `DISCOUNT`         | `AllowanceAmount`  | AMOUNT | Discount amount      |
| `AppliedTradeAllowanceCharge/CalculationPercent` | `DISCOUNT_PERCENT` | `AllowancePercent` | NUMBER | Discount percentage  |
| `AppliedTradeAllowanceCharge/ActualAmount`       | `SURCHARGE`        | `ChargeAmount`     | AMOUNT | Surcharge amount     |
| `AppliedTradeAllowanceCharge/Reason`             | `ALLOWANCE_REASON` | `AllowanceReason`  | STRING | Reason for allowance |

### Additional Line Fields

| ZUGFeRD CII Path                                              | DocBits Field            | Infor BOD Field         | Type   | Description            |
| ------------------------------------------------------------- | ------------------------ | ----------------------- | ------ | ---------------------- |
| `SpecifiedTradeProduct/OriginTradeCountry/ID`                 | `COUNTRY_OF_ORIGIN`      | `CountryOfOrigin`       | STRING | Country of origin      |
| `SpecifiedTradeProduct/ApplicableProductCharacteristic/Value` | `PRODUCT_CHARACTERISTIC` | `ProductCharacteristic` | STRING | Product characteristic |
| `ActualDeliverySupplyChainEvent/OccurrenceDateTime`           | `DELIVERY_DATE`          | `ActualDeliveryDate`    | DATE   | Line delivery date     |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.docbits.com/administration-and-setup/settings/global-settings/document-types/edi/zugferd.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
