Conditions
Every condition have a type which defines allowed operators.
number allowed operators: eq, not_eq, gt, gte, lt, lte string allowed operators: eq, not_eq, contains, not_contains, start_with, not_start_with, regex boolean allowed operators: eq, not_eq enum allowed operators: eq bool allowed operators: and, or
Date Conditions
Account's timezone is applied when conditions are evaluated.
| Name | Type | Description |
| hour_of_day | number | 0 for time range 0:00 and 0:59, etc. Similar to new Date().getHour(). |
| day_of_week | number | 0 for Sunday, 1 for Monday, etc. Similar to new Date().getDay(). |
| month_of_year | number | 0 for January, etc. Similar to new Date().getMonth(). |
| time_of_day | string[2] | Two strings in format ['21:20', '22:30']. |
Page Conditions
| Name | Type | Description |
| page_title | string | Current browser's page title. |
| page_url | string | Current browser's page url. |
Location Conditions
| Name | Type | Description |
| country_code | string | County by standard ISO 3166-1 alpha-2. Value can be put in lower or uppercase format. |
| city | string | Visitor's city detected by ip. |
| ip | string | Visitor's ip address. |
Device Conditions
Device is detected by library express-useragent (opens new window) and values you can find in specific functions.
| Name | Type | Description |
| browser | string | Detected as result of function getBrowser(). |
| os | string | Detected as result of function getOs(). |
| platform | string | Detected as result of function getPlatform(). |
| referer | string | Url which from visitor came to web. |
device_type | enum | Valid values are mobile, desktop |
Visitor Conditions
| Name | Type | Description |
| account_status | enum | Valid values are online, offline and any. |
| visitor_group | string | Visitor's group set by api smartsupp('group', 'key');. Empty string matching visitors without group. |
| visitor_language | string | Visitor's language set in settings or by api smartsupp('language', 'pl');. |
| visits_count | number | Number of visits. 1 for first visit, 2 for second (returning visitor), etc... |
Special Conditions
| Name | Type | Description |
| condition_group | bool | Value must be array of conditions |
condition_group
- On root level can be multiple
condition_group conditions. condition_group can have nested condition_group, which allows combine AND with OR together.