How contextual conditions work
Contextual conditions are evaluated at request time against session context data including:- Geographic data: Country, state/province, city
- Market data: Market ID, market handle, market countries
- Customer attributes: Customer tags, account status, purchase history
- UTM parameters: Marketing source, medium, campaign
- Device information: Device type, operating system
- Shopping channel: Online store, mobile app, etc.
Condition examples
The contextual conditions form in the dashboard lets you build these targeting rules without writing code. Below are common examples of what you can set up. Target US visitors:| Field | Operator | Value |
|---|---|---|
| Country | equals | US |
| Field | Operator | Value |
|---|---|---|
| State | equals | CA |
| Device | equals | mobile |
| Field | Operator | Value |
|---|---|---|
| Marketing campaign | is in list | summer-sale, holiday-promo |
| Field | Operator | Value |
|---|---|---|
| Klaviyo: Campaign | equals | Summer Sale (SMS) |
| Field | Operator | Value |
|---|---|---|
| Customer tags | contains | vip |
| Field | Operator | Value |
|---|---|---|
| Market handle | equals | ca |
| Field | Operator | Value |
|---|---|---|
| Market countries | contains | US |
Case sensitivity
String-based condition operators are case-insensitive. A condition matching “klaviyo” also matches “Klaviyo” or “KLAVIYO”. This coversequals, does not equal, in, not in, contains, does not contain, begins with, does not begin with, ends with, and does not end with whenever the value is a string. Numeric and boolean equality stays exact.
Case-insensitive matching applies wherever contextual conditions are evaluated, including merchandising rules, request transforms, sort orders, and block rules.