Include ram:URIUniversalCommunication no more than once

Error FX-SCH-A-000711 Factur-X

Element 'ram:URIUniversalCommunication' may occur at maximum 1 times.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

The ram:ProductEndUserTradeParty contains more than one ram:URIUniversalCommunication element.

What the rule means

ram:URIUniversalCommunication is optional in this party element but may occur only once. Multiple communication elements of this kind do not conform to the required structure.

Please include the product end user’s URI communication no more than once

ram:URIUniversalCommunication appears multiple times in ram:ProductEndUserTradeParty. This element may appear there at most once.

What to do
  1. Find the relevant ram:ProductEndUserTradeParty.
  2. Remove any extra ram:URIUniversalCommunication elements there, or omit the element if no URI communication is to be provided.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:ProductEndUserTradeParty>
  <ram:URIUniversalCommunication/>
  <ram:URIUniversalCommunication/>
</ram:ProductEndUserTradeParty>
✓ Correct
<ram:ProductEndUserTradeParty>
  <ram:URIUniversalCommunication/>
</ram:ProductEndUserTradeParty>
Technical details

The test counts the direct ram:URIUniversalCommunication elements in the current ram:ProductEndUserTradeParty and allows no more than one.

Where the rule applies

The rule applies to ram:URIUniversalCommunication within ram:ProductEndUserTradeParty in the invoice agreement.

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