Include ID exactly once

Error FX-SCH-A-000689 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 is missing from ram:SpecifiedTaxRegistration or occurs more than once.

What the rule means

The rule requires exactly one identifier element in the buyer’s tax representative’s tax registration.

Please include the tax representative’s identifier exactly once

ram:ID is missing or repeated in ram:SpecifiedTaxRegistration. You can adjust the entry so that exactly one element is present.

What to do
  1. Look for ram:ID in the buyer’s tax representative’s ram:SpecifiedTaxRegistration.
  2. Add the element if it is missing, or remove duplicates so that exactly one remains.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:SpecifiedTaxRegistration/>
✓ Correct
<ram:SpecifiedTaxRegistration>
  <ram:ID>123</ram:ID>
</ram:SpecifiedTaxRegistration>
Technical details

In the ram:SpecifiedTaxRegistration context, the number of direct ram:ID elements is checked and must equal one.

Where the rule applies

The rule applies to ram:SpecifiedTaxRegistration of the buyer’s tax representative.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:BuyerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration
Test expression (assert/@test)
count(ram:ID)=1