One tax identifier for the buyer agent

Error FX-SCH-A-000665 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:SpecifiedTaxRegistration must contain exactly one ram:ID. The element is either missing or appears more than once.

What the rule means

ram:ID contains the tax identifier associated with the buyer agent’s tax registration.

Please provide exactly one tax identifier for the buyer agent

The buyer agent’s tax registration is missing ram:ID or contains it more than once. It must be present exactly once.

What to do
  1. Locate ram:SpecifiedTaxRegistration under the buyer agent.
  2. Ensure that it contains exactly one ram:ID.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:SpecifiedTaxRegistration/>
✓ Correct
<ram:SpecifiedTaxRegistration>
  <ram:ID>123</ram:ID>
</ram:SpecifiedTaxRegistration>
Technical details

The test counts the direct child elements ram:ID of ram:SpecifiedTaxRegistration and requires exactly one.

Where the rule applies

The rule applies to ram:SpecifiedTaxRegistration of the buyer agent.

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