Specify the sales agent’s country

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

ram:CountryID does not occur exactly once in PostalTradeAddress. The element is missing or occurs more than once.

What the rule means

The postal address requires exactly one country entry so that the sales agent’s country is stated unambiguously.

Please specify the country in the sales agent’s postal address

The sales agent’s postal address is missing ram:CountryID or contains it more than once. Include it exactly once there.

What to do
  1. Locate the sales agent’s postal address under ram:PostalTradeAddress.
  2. Make sure ram:CountryID occurs exactly once there.
  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 rule checks that there is exactly one direct ram:CountryID element in ram:PostalTradeAddress.

Where the rule applies

The rule applies to the sales agent’s postal address in SalesAgentTradeParty.

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