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).