Provide the country of the sales agent’s address

Error FX-SCH-A-000743 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 sales agent’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 specifies the country of the postal address. The rule requires exactly one country designation.

Please provide the country of the sales agent’s address

The sales agent’s postal address is missing ram:CountryID, or the element occurs more than once. You can resolve this by providing exactly one such element.

What to do
  1. Locate ram:PostalTradeAddress for the sales agent.
  2. Provide exactly one ram:CountryID element inside it.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress/>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountryID>DE</ram:CountryID>
</ram:PostalTradeAddress>
Technical details

The check counts the ram:CountryID elements directly contained in ram:PostalTradeAddress and requires the count to be one.

Where the rule applies

In the sales agent’s postal address.

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