Syntax

CII (UN/CEFACT Cross Industry Invoice)

Definition

CII stands for Cross Industry Invoice and is the UN/CEFACT XML document format for invoices. It is one of the two syntaxes permitted by EN 16931 alongside UBL and forms the basis of ZUGFeRD and Factur-X. CII documents use the namespace `urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100`.

Background & context

The Cross Industry Invoice (CII) is the invoice format of UN/CEFACT (United Nations Centre for Trade Facilitation and Electronic Business) and belongs to the broader family of UN/CEFACT standards for cross-industry data exchange. Alongside UBL, CII is one of the two syntaxes permitted by EN 16931. Unlike UBL, CII structures an invoice into three main areas: the `ExchangedDocumentContext` (profile/conformance details), the `ExchangedDocument` (header data such as invoice number and date), and the `SupplyChainTradeTransaction` (lines, parties, delivery, payment and tax data in the substructures ApplicableHeaderTradeAgreement, -Delivery and -Settlement). CII documents use the namespace `urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100`. In practice, CII is most significant as the basis of ZUGFeRD and Factur-X — the `factur-x.xml` embedded in PDF/A-3 is a CII file. XRechnung can also be generated as CII.

In practice — a worked example

In a CII invoice, the invoice number (BT-1) sits in the `ExchangedDocument` as `<ram:ID>`, while amounts and tax breakdowns reside in `ApplicableHeaderTradeSettlement` within the `SupplyChainTradeTransaction`. A ZUGFeRD generator writes exactly this CII structure, validates it against the CII XSD and embeds it as `factur-x.xml` in the PDF/A-3. Because CII and UBL both represent the same Business Terms, the same invoice can be converted between the syntaxes without loss of content.

Common mistakes

  • CII uses the prefixes ram:, rsm: and udt: — confusing them with the UBL prefixes cbc:/cac: breaks schema validation.
  • The three CII main areas must appear in the correct order; a wrong arrangement violates the XSD schema.
  • In ZUGFeRD the embedded CII file must be named exactly `factur-x.xml` (or the profile-appropriate name), otherwise recipient systems cannot find the XML.

Frequently asked questions

Does ZUGFeRD use UBL or CII?

ZUGFeRD (from 2.0) and Factur-X use CII as their XML syntax. The factur-x.xml embedded in the PDF/A-3 is a CII file. UBL is not used here.

Can XRechnung be in CII?

Yes. XRechnung permits both UBL 2.1 and CII. Both variants are equally valid towards the public receiving platforms.

What namespaces does CII have?

The root element is in the namespace urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100 (prefix rsm:); business structures use ram: (ReusableAggregate) and udt: (UnqualifiedDataType).

Related terms

UBL (Universal Business Language)UBL (Universal Business Language) is an OASIS-standardised XML vocabulary for business documents, including invoices, orders, and delivery notes. UBL 2.1 is one of the two permitted syntaxes for EN 16931-compliant invoices and is used for XRechnung as well as Peppol BIS Billing 3.0, among others. UBL invoices use the namespace `urn:oasis:names:specification:ubl:schema:xsd:Invoice-2`.EN 16931EN 16931 is the European standard that defines the semantic data model of a core invoice. It specifies the mandatory and optional fields (Business Terms), their meaning, and the validation rules that apply to all conforming electronic invoices in the EU. Nationally implemented standards such as XRechnung, ZUGFeRD (EN 16931 profile), and Factur-X must comply with this standard.ZUGFeRDZUGFeRD (Zentraler User Guide des Forums elektronische Rechnung Deutschland) is a hybrid invoice format that combines a human-readable PDF/A-3 file with embedded machine-readable XML data. The format is maintained by the Forum elektronische Rechnung Deutschland (FeRD) and exists in several profiles (MINIMUM, BASIC, EN 16931, EXTENDED). It is technically identical to the European Factur-X standard.Factur-XFactur-X is the Franco-German standard for hybrid electronic invoices, jointly developed by the French association FNFE-MPE and the German FeRD. Technically, Factur-X is identical to ZUGFeRD from version 2.0 onwards and uses UN/CEFACT CII as its XML syntax. The format is recognised across the European Union as a de facto standard for hybrid B2B invoices.XRechnungXRechnung is the German standard for structured electronic invoices in public sector procurement (B2G). It is based on the European standard EN 16931 and is available in two syntaxes: UBL 2.1 and UN/CEFACT CII. Since 27 November 2020, federal public buyers have been required to accept electronic invoices in XRechnung format, and state and municipal authorities have been progressively included.SchematronSchematron is a rule-based validation language for XML documents, based on XPath expressions. In the context of XRechnung and EN 16931, Schematron rules are used to perform content-level plausibility checks that go beyond pure schema validation (XSD). The official Schematron rules for XRechnung are maintained by KoSIT and are part of the open-source Validator.