Exactly one ram:IssuerAssignedID

Error FX-SCH-A-001015 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:AdditionalReferencedDocument or occurs more than once.

What the rule means

Each ram:AdditionalReferencedDocument at this location must contain exactly one identifier assigned by the issuer.

Please provide exactly one issuer identifier for the referenced document

The issuer identifier for a referenced document on an invoice line is missing or appears more than once. You can adjust the XML so that exactly one ram:IssuerAssignedID is present.

What to do
  1. Check ram:AdditionalReferencedDocument in the invoice line agreement.
  2. Ensure that it contains exactly one ram:IssuerAssignedID.
  3. Regenerate the invoice and check it again.
What it looks like
✗ Triggers the message
<ram:AdditionalReferencedDocument>
  <ram:TypeCode>Code</ram:TypeCode>
</ram:AdditionalReferencedDocument>
✓ Correct
<ram:AdditionalReferencedDocument>
  <ram:IssuerAssignedID>REF-1</ram:IssuerAssignedID>
</ram:AdditionalReferencedDocument>
Technical details

The Schematron check counts the direct ram:IssuerAssignedID elements within ram:AdditionalReferencedDocument and requires exactly one.

Where the rule applies

The rule applies to ram:AdditionalReferencedDocument in the agreement for an invoice line.

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