Delivery note reference: issuer identifier

Error FX-SCH-A-000787 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:DeliveryNoteReferencedDocument or occurs more than once. It must occur exactly once.

What the rule means

The identifier links the reference to the delivery note identifier assigned by its issuer.

Please include the delivery note issuer identifier exactly once

The delivery note reference does not contain the issuer identifier exactly once. You can adjust the XML entry to resolve this.

What to do
  1. Locate ram:DeliveryNoteReferencedDocument in the delivery information.
  2. Check that it contains ram:IssuerAssignedID exactly once.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:DeliveryNoteReferencedDocument/>
✓ Correct
<ram:DeliveryNoteReferencedDocument>
  <ram:IssuerAssignedID>DN-123</ram:IssuerAssignedID>
</ram:DeliveryNoteReferencedDocument>
Technical details

The XPath counts the direct ram:IssuerAssignedID elements in ram:DeliveryNoteReferencedDocument; the count must equal 1.

Where the rule applies

The rule applies to the delivery note reference document in the invoice’s delivery information.

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