Home > widget-integration > ConditionType
ConditionType interface
Condition type for rule-based recommendations. Defines the "IF" part of a rule - what criteria must be met.
Signature:
export interface ConditionType
Remarks
The value field is polymorphic based on the option: - 'productId': Array (raw) or Array (transformed by backend) - 'collectionId': Array (always with label) - 'vendor'/'tag'/'product-type': Array (raw) or Array<{label, value}> (UI-friendly) - 'price': number or Array with first element
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
"equal" | "not_equal" | "greater_than" | "greater_equal_than" | "less_than" | "less_equal_than" | "contains" | "equal_collection" | "not_equal_collection" | "equal_product_category" | "not_equal_product_category" | "equal_product_type" | "not_equal_product_type" | "equal_vendor" | "not_equal_vendor" | "contains_all_tags" | "contains_matched_tags" |
(Optional) | ||
|
"all-products" | "all-collections" | "algorithm" | "reviewsio-rating" | "total-reviewsio-rating" | "productId" | "vendor" | "product-category" | "collectionId" | "price" | "tag" | "product-type" | |||
|
string | number | string[] | { label: string; value: string; }[] | number[] | ProductResponseType[] | CollectionResponseType[] |
(Optional) |