Comparison operators
Use comparison operators to build simple conditions that check if a datapoint or attribute matches a given value.
The available operators are:
| Operator | Description | Example |
|---|---|---|
| = | Equal to | Customer email = "[email protected]" |
| != | Not equal to | Customer ID != "c1234567" |
| < | Less than | Transaction amount < 9.99 |
| <= | Less than or equal to | Transaction amount <= 39.99 |
| > | Greater than | Email velocity (1 day) > 10 |
| >= | Greater than or equal to | FRG score >= 70 |
| =~ | Matches a POSIX regular expression pattern. | Shipping address postal code =~ \UB[0-9]+\ |
| !=~ | Does not match a POSIX regular expression pattern. | Device version !=~ \v32.*\ |
| in | The attribute value matches one or more of the given values. | BIN country [in] DE, FR |
| not in | The attribute value does not match any of the given values. | BIN country [not in] IT, UK |
| contains | Contains the value of the string provided. | Customer email [contains] @example.com |
| not contains | Does not contain the value of the string provided. | Customer email [not contains] @fraugster.com |
The availability of comparison operators depends on the type of variable you select. Use the following compatibility table as guidance:
| Operator | string | enum | int/float | boolean | date/timestamp |
|---|---|---|---|---|---|
| = | + | + | + | + | + |
| != | + | + | + | + | + |
| < | + | + | |||
| <= | + | + | |||
| > | + | + | |||
| >= | + | + | |||
| =~ | + | ||||
| !=~ | + | ||||
| in | + | ||||
| not in | + | ||||
| contains | + | + | |||
| not contains | + | + |