Buyer legal organization: exactly one ID

Error FX-SCH-A-000408 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 SpecifiedLegalOrganization or occurs more than once. It must occur exactly once.

What the rule means

The ID identifies the buyer’s legal organization. Having exactly one ID gives this information an unambiguous structure.

Please provide exactly one ID for the buyer’s legal organization

The buyer’s legal organization has no ID or has more than one. You can resolve this by providing exactly one ram:ID element.

What to do
  1. Find SpecifiedLegalOrganization in the buyer details.
  2. Check that it contains exactly one ram:ID element.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:SpecifiedLegalOrganization/>
✓ Correct
<ram:SpecifiedLegalOrganization>
  <ram:ID>ORG-123</ram:ID>
</ram:SpecifiedLegalOrganization>
Technical details

The rule counts the direct ram:ID elements in SpecifiedLegalOrganization and requires a count of 1.

Where the rule applies

The rule applies to SpecifiedLegalOrganization within the buyer details.

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