Use an allowed schemeID for the buyer agent’s global identifier

Error FX-SCH-A-000657 Factur-X

Value of '@schemeID' is not allowed.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

The value of schemeID on GlobalID is not included in the code list defined for this attribute. An empty value is exempt from this test.

What the rule means

The identification scheme for a global identifier must use a value defined in the code list for schemeID, unless the value is empty.

Please use an allowed schemeID for the buyer agent’s global identifier

The schemeID value on the buyer agent’s global identifier is not included in the code list for this attribute. Using a value listed there resolves this issue.

What to do
  1. Find GlobalID in BuyerAgentTradeParty.
  2. Check the schemeID attribute value against the code list defined for it.
  3. Replace a value that is not listed with an allowed value.
  4. Generate the invoice again and validate it once more.
Technical details

The test accepts an empty $codeValue11 value or a value included in the enumeration of code list ID 11.

Where the rule applies

The rule applies to the schemeID attribute of the GlobalID element in BuyerAgentTradeParty.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:BuyerAgentTradeParty/ram:GlobalID
Test expression (assert/@test)
string-length($codeValue11)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=11]/enumeration[@value=$codeValue11]