Product Supplier Order Amount Validator
Warns when the line items belonging to a secondary supplier fall outside that supplier's minimum or maximum order amount.
Overview
The Product Supplier Order Amount Validator checks order amount limits for the other suppliers represented on a purchase order. A purchase order has one supplier of its own, but individual line items can carry their own SupplierId — for example when products are sourced from several suppliers and later split into separate orders. This validator groups those line items by supplier and compares each group's total against that supplier's minimum and maximum order amount.
Violations are reported as warnings, so the purchase order can still be saved and processed. Each warning references the supplier it applies to, which lets the UI show the problem next to the relevant supplier group.
The purchase order's own supplier is handled by the Purchase Order Amount Validator; this validator deliberately skips it to avoid duplicate warnings.
Identifier
| Property | Value |
|---|---|
| Connector ID | productSupplierOrderAmountValidator |
| Validation Type | Amount |
| Validation Scope | Order, grouped per line item supplier |
Behavior
- Removes any existing
ProductSupplierOrderAmountOutOfRangeerrors from the purchase order, so the result always reflects the current line items - Skips validation when the purchase order has no line items
- Groups line items by
SupplierId, ignoring lines that have no supplier and lines whose supplier is the purchase order's own supplier - For each supplier group, looks up the supplier and skips it when the supplier cannot be found or when neither
MinimumOrderAmountnorMaximumOrderAmountis set - If the supplier has a
PreferredCurrencyand it differs from the order currency, converts the limits to the order currency before comparing. The order currency is the purchase order'sBillingCurrency, falling back to the first currency found on the group's line items. When either currency is missing, the limits are compared as they are - Sums
ExtendedPriceacross the group's line items to get the supplier total - If the supplier total is below the minimum, adds a warning referencing that supplier
- Otherwise, if the supplier total is above the maximum, adds a warning referencing that supplier
Error messages
| Condition | Severity | Error Key | Translation Key |
|---|---|---|---|
| Supplier group total below the minimum order amount | Warning | ProductSupplierOrderAmountOutOfRange | SupplierOrderAmountBelowMinimum |
| Supplier group total above the maximum order amount | Warning | ProductSupplierOrderAmountOutOfRange | SupplierOrderAmountAboveMaximum |
Both messages include the supplier name, the limit that was breached, and the currency the limit was compared in.
Configuration
No additional connector properties are required. The limits are configured per supplier through MinimumOrderAmount, MaximumOrderAmount, and PreferredCurrency.
Related
- Purchase Order Amount Validator — the equivalent check for the purchase order's own supplier
- Supplier Configuration — supplier setup in Omnium
- Purchase Order Validation — how validation runs and how errors are attached