Provide the despatch advice identifier exactly once

Error FX-SCH-A-000450 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

ram:IssuerAssignedID is missing from ram:DespatchAdviceReferencedDocument or occurs more than once.

What the rule means

The identifier assigned by the issuer identifies the referenced despatch advice. Requiring exactly one occurrence ensures the reference contains a single identifier.

Please provide the despatch advice identifier exactly once

The identifier is missing from the referenced despatch advice or appears more than once. Adjust the XML so that exactly one ram:IssuerAssignedID is present.

What to do
  1. Find ram:DespatchAdviceReferencedDocument in the XML.
  2. Make sure it contains exactly one ram:IssuerAssignedID.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:DespatchAdviceReferencedDocument/>
✓ Correct
<ram:DespatchAdviceReferencedDocument>
  <ram:IssuerAssignedID/>
</ram:DespatchAdviceReferencedDocument>
Technical details

The test checks whether the number of direct ram:IssuerAssignedID elements in ram:DespatchAdviceReferencedDocument is one.

Where the rule applies

The rule applies within the referenced despatch advice element ram:DespatchAdviceReferencedDocument.

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