Pricat ID Validator
Validates Pricat ID consistency for pre-order carts.
Overview
The Pricat ID Validator ensures that pre-order carts have a valid Pricat ID and that the products in the cart share consistent Pricat IDs. This validator only runs for carts with the PreOrder order type and is skipped for all other order types.
Identifier
| Property | Value |
|---|---|
| Connector ID | priCatIdValidator |
| Validation Type | General |
Behavior
- Only runs for carts where
OrderTypeisPreOrder; all other order types pass automatically - Checks if the cart has a
PricatIdproperty:- If missing, adds a blank
PricatIdproperty to the cart and returns a warning
- If missing, adds a blank
- Looks up all products in the cart and collects their
PricatIdproperties - Groups the Pricat IDs by frequency to find the most common one
- Validates consistency:
- If all products share the same Pricat ID(s) but the cart's Pricat ID doesn't match, returns an error listing the valid options
- If products have different Pricat IDs (not all matching), returns a warning indicating the mismatch
- If the cart's Pricat ID matches the products, validation passes
Error messages
| Condition | Type | Message |
|---|---|---|
| Cart missing Pricat ID property | Warning | "Pricat ID is missing" |
| Cart Pricat ID doesn't match products | Error | Lists possible valid Pricat IDs |
| Products have inconsistent Pricat IDs | Warning | Indicates mismatch count |
Configuration
No additional properties required.
