At most one buyer agent identifier

Error FX-SCH-A-000649 Factur-X

Element 'ram:ID' 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

ram:BuyerAgentTradeParty contains more than one ram:ID. This element may occur at most once there.

What the rule means

The rule limits the buyer agent identifier to a single ram:ID, preventing multiple identifiers within this party element.

Please provide no more than one identifier for the buyer agent

Several ram:ID elements are present in ram:BuyerAgentTradeParty. The rule allows at most one there; an identifier is not required.

What to do
  1. Locate ram:BuyerAgentTradeParty in the invoice agreement section.
  2. Remove any extra ram:ID elements so that no more than one remains.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:BuyerAgentTradeParty>
  <ram:ID>A</ram:ID>
  <ram:ID>B</ram:ID>
</ram:BuyerAgentTradeParty>
✓ Correct
<ram:BuyerAgentTradeParty>
  <ram:ID>A</ram:ID>
</ram:BuyerAgentTradeParty>
Technical details

The test counts the direct ram:ID elements under ram:BuyerAgentTradeParty and requires no more than 1; the element may be absent.

Where the rule applies

The rule applies to ram:ID within ram:BuyerAgentTradeParty in the document-level agreement section.

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