Specify exactly one business process identifier

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

Within ram:BusinessProcessSpecifiedDocumentContextParameter, ram:ID does not occur exactly once. The element is missing or appears more than once.

What the rule means

The identifier associates the document context with a business process. Exactly one ram:ID element is required in this context.

Please include exactly one business process identifier

ram:ID is missing from the business process context, or the element appears there more than once. Exactly one entry makes this information unambiguous.

What to do
  1. Find ram:ID in ram:BusinessProcessSpecifiedDocumentContextParameter.
  2. Add the element if it is missing, or remove duplicates so that it occurs exactly once.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:BusinessProcessSpecifiedDocumentContextParameter/>
✓ Correct
<ram:BusinessProcessSpecifiedDocumentContextParameter>
  <ram:ID/>
</ram:BusinessProcessSpecifiedDocumentContextParameter>
Technical details

The XPath test counts the direct child elements ram:ID and requires the count to be 1.

Where the rule applies

The rule applies within ram:BusinessProcessSpecifiedDocumentContextParameter in the document context.

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