Exactly one telephone number

Error FX-SCH-A-000800 Factur-X

Element 'ram:CompleteNumber' 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:CompleteNumber is missing from ram:TelephoneUniversalCommunication or appears more than once. The test requires exactly one ram:CompleteNumber element.

What the rule means

The ram:CompleteNumber element contains the telephone number. The rule ensures that exactly one number value is present for the telephone communication detail.

Please provide exactly one `ram:CompleteNumber` for the telephone contact

ram:CompleteNumber is missing or appears more than once for the consignor contact’s telephone communication. Exactly one such element is required in this section.

What to do
  1. Find ram:TelephoneUniversalCommunication for the consignor’s contact.
  2. Make sure this element contains exactly one ram:CompleteNumber.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:TelephoneUniversalCommunication/>
✓ Correct
<ram:TelephoneUniversalCommunication>
  <ram:CompleteNumber>+33123456789</ram:CompleteNumber>
</ram:TelephoneUniversalCommunication>
Technical details

The XPath test counts the direct ram:CompleteNumber elements within ram:TelephoneUniversalCommunication and requires exactly one.

Where the rule applies

The rule applies to ram:CompleteNumber within ram:TelephoneUniversalCommunication for the consignor’s contact.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ ram:ShipFromTradeParty/ram:DefinedTradeContact/ram:TelephoneUniversalCommunication
Test expression (assert/@test)
count(ram:CompleteNumber)=1