The ship-from party’s postal address requires exactly one country identifier

Error FX-SCH-A-000803 Factur-X

Element 'ram:CountryID' 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

The ship-from party’s ram:PostalTradeAddress does not contain exactly one ram:CountryID. The element is either missing or occurs more than once.

What the rule means

ram:CountryID identifies the country of the postal address. Exactly one element is required so that the address country is clearly specified.

Please provide exactly one country identifier in the ship-from party’s postal address

The country identifier is missing from the ship-from party’s postal address or appears more than once. You can complete the entry with exactly one ram:CountryID.

What to do
  1. Find ram:PostalTradeAddress within ram:ShipFromTradeParty.
  2. Make sure the postal address contains exactly one ram:CountryID element.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress/>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountryID/>
</ram:PostalTradeAddress>
Technical details

The check counts the direct ram:CountryID elements in ram:PostalTradeAddress and requires exactly one.

Where the rule applies

The rule applies to ram:CountryID within the ram:PostalTradeAddress of ram:ShipFromTradeParty.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ ram:ShipFromTradeParty/ram:PostalTradeAddress
Test expression (assert/@test)
count(ram:CountryID)=1