Provide the business process identifier exactly once

Error FX-SCH-A-000406 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 does not occur exactly once in BusinessProcessSpecifiedDocumentContextParameter. It is either missing or appears more than once.

What the rule means

ram:ID contains the identifier of the specified business process context. Exactly one element is required to state that context unambiguously.

Please provide the business process identifier exactly once

ram:ID is missing or appears more than once in the business process context parameter. You can resolve this by providing it once.

What to do
  1. Check BusinessProcessSpecifiedDocumentContextParameter for ram:ID.
  2. Make sure it contains exactly one ram:ID element.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:BusinessProcessSpecifiedDocumentContextParameter/>
✓ Correct
<ram:BusinessProcessSpecifiedDocumentContextParameter>
  <ram:ID>...</ram:ID>
</ram:BusinessProcessSpecifiedDocumentContextParameter>
Technical details

Within BusinessProcessSpecifiedDocumentContextParameter, the rule checks only whether the number of direct ram:ID elements is exactly 1.

Where the rule applies

The rule applies to the BusinessProcessSpecifiedDocumentContextParameter in the invoice’s document context.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram:BusinessProcessSpecifiedDocumentContextParameter
Test expression (assert/@test)
count(ram:ID)=1