At most one URI communication for the buyer agent

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

URIUniversalCommunication occurs more than once in BuyerAgentTradeParty. This element may appear there at most once.

What the rule means

The XML structure allows at most one URI communication element for the buyer agent. Multiple occurrences do not conform to this structure.

Please use at most one URI communication for the buyer agent

The invoice contains multiple URIUniversalCommunication elements for the buyer agent. You can resolve this by limiting the number of these elements to one.

What to do
  1. Find URIUniversalCommunication within BuyerAgentTradeParty.
  2. Remove the extra occurrences so that no more than one element remains.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:BuyerAgentTradeParty>
  <ram:URIUniversalCommunication/>
  <ram:URIUniversalCommunication/>
</ram:BuyerAgentTradeParty>
✓ Correct
<ram:BuyerAgentTradeParty>
  <ram:URIUniversalCommunication/>
</ram:BuyerAgentTradeParty>
Technical details

The test counts the direct URIUniversalCommunication child elements of BuyerAgentTradeParty and requires the count to be less than or equal to one.

Where the rule applies

The rule applies to the URIUniversalCommunication element within BuyerAgentTradeParty.

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