Provide exactly one country identifier

Error FX-SCH-A-000627 Factur-X

Element 'ram:ID' must occur exactly 1 times.

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

ram:ID does not occur exactly once in ram:OriginTradeCountry. The element is either missing or appears more than once.

What the rule means

The country of origin requires exactly one country identifier so that the origin can be determined unambiguously.

Please provide exactly one country identifier for the country of origin

The country of origin does not contain exactly one ram:ID element. You can resolve this by correcting the number of country identifiers.

What to do
  1. Make sure ram:OriginTradeCountry contains exactly one ram:ID element.
  2. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:OriginTradeCountry/>
✓ Correct
<ram:OriginTradeCountry>
  <ram:ID>...</ram:ID>
</ram:OriginTradeCountry>
Technical details

The XPath test requires the number of direct ram:ID elements in ram:OriginTradeCountry to equal one.

Where the rule applies

The rule applies to ram:OriginTradeCountry in the product information of an invoice line.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedTradeProduct/ram:OriginTradeCountry
Test expression (assert/@test)
count(ram:ID)=1