Provide exactly one product for the invoice line

Error FX-SCH-A-000267 Factur-X

Element 'ram:SpecifiedTradeProduct' 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:SpecifiedTradeProduct does not occur exactly once in the invoice line. The element is either missing or occurs more than once.

What the rule means

ram:SpecifiedTradeProduct contains the product information for the invoice line and must occur exactly once in each line.

Please provide exactly one product for the invoice line

The invoice line is missing ram:SpecifiedTradeProduct, or the element occurs more than once. It must occur exactly once per invoice line.

What to do
  1. Locate the affected ram:IncludedSupplyChainTradeLineItem.
  2. Ensure that it contains ram:SpecifiedTradeProduct exactly once.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:IncludedSupplyChainTradeLineItem/>
✓ Correct
<ram:IncludedSupplyChainTradeLineItem>
  <ram:SpecifiedTradeProduct/>
</ram:IncludedSupplyChainTradeLineItem>
Technical details

In the context of ram:IncludedSupplyChainTradeLineItem, the expression checks whether exactly one ram:SpecifiedTradeProduct element occurs.

Where the rule applies

Applies to ram:SpecifiedTradeProduct within each ram:IncludedSupplyChainTradeLineItem.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem
Test expression (assert/@test)
count(ram:SpecifiedTradeProduct)=1