Provide the issuer identifier exactly once

Error FX-SCH-A-000557 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 does not occur exactly once in the applicable AdditionalReferencedDocument. It is either missing or appears more than once.

What the rule means

ram:IssuerAssignedID contains the identifier assigned to the referenced document by its issuer. Exactly one value is required.

Please provide the referenced document’s issuer identifier exactly once

For the referenced document with ram:TypeCode 130, ram:IssuerAssignedID is missing or appears more than once. Provide the identifier there exactly once.

What to do
  1. Find the AdditionalReferencedDocument with ram:TypeCode 130 in ApplicableHeaderTradeAgreement.
  2. Make sure it contains exactly one ram:IssuerAssignedID.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:AdditionalReferencedDocument>
  <ram:TypeCode>130</ram:TypeCode>
  <ram:IssuerAssignedID>...</ram:IssuerAssignedID>
  <ram:IssuerAssignedID>...</ram:IssuerAssignedID>
</ram:AdditionalReferencedDocument>
✓ Correct
<ram:AdditionalReferencedDocument>
  <ram:TypeCode>130</ram:TypeCode>
  <ram:IssuerAssignedID>...</ram:IssuerAssignedID>
</ram:AdditionalReferencedDocument>
Technical details

For AdditionalReferencedDocument with ram:TypeCode equal to 130, the test checks that exactly one direct ram:IssuerAssignedID element is present.

Where the rule applies

The rule applies to AdditionalReferencedDocument in ApplicableHeaderTradeAgreement when its ram:TypeCode has the value 130.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:AdditionalReferencedDocument[ram:TypeCode="130"]
Test expression (assert/@test)
count(ram:IssuerAssignedID)=1