Ultimate customer order reference requires exactly one identifier

Error FX-SCH-A-000783 Factur-X

Element 'ram:IssuerAssignedID' 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:UltimateCustomerOrderReferencedDocument, ram:IssuerAssignedID does not occur exactly once. The element is missing or occurs more than once.

What the rule means

The issuer-assigned identifier provides the reference to the ultimate customer’s order.

Please provide exactly one identifier for the ultimate customer’s order

The order reference for the ultimate customer is missing ram:IssuerAssignedID or contains it more than once. You can adjust the number of identifiers in the referenced document.

What to do
  1. Check ram:UltimateCustomerOrderReferencedDocument and make sure it contains exactly one ram:IssuerAssignedID.
  2. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:UltimateCustomerOrderReferencedDocument/>
✓ Correct
<ram:UltimateCustomerOrderReferencedDocument>
  <ram:IssuerAssignedID/>
</ram:UltimateCustomerOrderReferencedDocument>
Technical details

The test counts the direct ram:IssuerAssignedID elements in the referenced document and requires exactly one occurrence.

Where the rule applies

The rule applies to ram:UltimateCustomerOrderReferencedDocument in the invoice trade agreement.

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