Rule reference

BR-CL-13 Classification 1 on line 1 declares the scheme "NOPE" (BT-158-1), which is not in UNTDID 7143 (185 codes)

Classification 1 on line 1 declares the scheme "NOPE" (BT-158-1), which is not in UNTDID 7143 (185 codes). The scheme is carried as @listID on cbc:ItemClassificationCode and it is what turns the code into a lookup: customs, spend analysis and product-compliance checks all branch on it before reading the code. A scheme name invented for internal use — "UNSPSC", "eCl@ss", "internal" — is exactly the kind of value that fails here while looking entirely reasonable.

This rule is implemented and its error payload below is real, but the long-form write-up — normative text, worked example, divergence note — is not written yet. Everything the library knows about this rule is on this page. Ask and we will prioritise it.

Business term
BT-158
Severity
fatal

What the library returns

The exact object in result.errors when this rule fires. Generated by running @attestwire/en16931, not transcribed:

TeachingError
{
  "rule": "BR-CL-13",
  "field": "BT-158",
  "severity": "fatal",
  "message": "Classification 1 on line 1 declares the scheme \"NOPE\" (BT-158-1), which is not in UNTDID 7143 (185 codes). The scheme is carried as @listID on cbc:ItemClassificationCode and it is what turns the code into a lookup: customs, spend analysis and product-compliance checks all branch on it before reading the code. A scheme name invented for internal use — \"UNSPSC\", \"eCl@ss\", \"internal\" — is exactly the kind of value that fails here while looking entirely reasonable.",
  "fix": "Set line.itemClassifications[].schemeId to a UNTDID 7143 code: \"HS\" harmonised system, \"MP\" product/service identification number, \"SRV\" GS1 product classification, \"TST\" test specification, \"ZZZ\" mutually defined. Use \"ZZZ\" when the classification is one you and the buyer agreed bilaterally.",
  "example": "\"itemClassifications\": [{ \"code\": \"43211508\", \"schemeId\": \"MP\" }]",
  "xpath": "/ubl:Invoice/cac:InvoiceLine[1]/cac:Item/cac:CommodityClassification[1]/cbc:ItemClassificationCode/@listID",
  "docsUrl": "https://attestwire.com/rules/BR-CL-13"
}

xpath locates the element in the generated UBL document, which is where a KoSIT or Peppol validator will report the same problem.

A passing value

the shape this field expects
"itemClassifications": [{ "code": "43211508", "schemeId": "MP" }]

The fix

Set line.itemClassifications[].schemeId to a UNTDID 7143 code: "HS" harmonised system, "MP" product/service identification number, "SRV" GS1 product classification, "TST" test specification, "ZZZ" mutually defined. Use "ZZZ" when the classification is one you and the buyer agreed bilaterally.

Arrived from a stack trace? The docsUrl on every error links straight here. Something wrong on this page — tell us.