FilterCondition
A single filter condition used in a recommendation query request to narrow results.
Declaration
object RecommendationFilterConditionProperties
| Name | Type | Description |
|---|---|---|
field Required | string | The name of the field to filter on. Must match a field name on the recommendation object being queried, for example |
operator Required | RecommendationFilterOperator | The comparison operator to apply. See FilterOperator. |
value Required | [string] | An array of one or more filter values. Always supplied as an array, even when filtering with a single value, for example |
ignoreCase | boolean | When |
Discussion
The FilterCondition object is the building block of query filters in the Recommendations API. The API combines multiple conditions in the filters array with AND logic. All conditions must match for a recommendation to appear in results.
Every query request requires two filters:
Field | Operator | Description |
|---|---|---|
|
| The ID of the promoted object. Interpreted in combination with |
|
| The type of promoted object, for example |
Which operators are valid for a given field depends on that field’s underlying type.
Field Type | Supported Operators |
|---|---|
String |
|
Numeric |
|
Date |
|
Enum |
|
List |
|
Always pass value as an array.
Example
{
"field": "state",
"operator": "EQUALS",
"value": [
"AVAILABLE"
],
"ignoreCase": false
}