The Segment feature groups app users based on different parameters.
You can use segments in Push notifications to target the relevant users out of all available users.
Segments can include multiple parameters of different types:
...
- name - for example, "Active Users".
- description - for example, "Users who opened the app at least once".
rule(s) – each segment is defined by one or more rules. A rule consists of a field, an operator and an operand.
The following example shows a segment rule that targets users who activated the app at least once:{ "field": " numActivations ", "operator": ">=", "operand": [1] })
The following section, "Creating a Segment Rule", describes the available segment fields, operators and operands you can use to create segment rules.
...
Request URL
POST
' https://saas.appoxee.com/api/segment'.
...
Name | Value |
---|---|
X-ACCOUNT_CODE | Your Appoxee account code. In case you don't have an account code add your Appoxee user name here as well |
X-USERNAME | Your Appoxee user name. |
X-PASSWORD | Your Appoxee password. |
...
Creating a Segment Rule
To create a segment rule, use the fields, operators and operands listed in the following table:
Field | Operator(s) | Example Operand(s) | Type | Comments |
---|---|---|---|---|
alias | = | ["aliasA","aliasB","aliasC"] | string | The user's unique alias, shared by all the user's devices. |
numActivations | != | ["2"] | integer | The number of times you app was activated (opened) on this device. |
numPurchases | != | ["2"] | integer | The number of purchases made through your app on this device. |
appVersion | != | ["1.0"] | double | The version number of your app installed on the device. |
tags | != | ["tagA","tagB","tagC"] | string | The local tag list, which is specific to each device. |
osNumber | >=< | ["1.5","2.2"] | range | The version number of the Operating System installed on the device. |
size | != | ["1","4","3"] | integer | The size of the devices running your app. Possible sizes are:
|
clientVersion | >=< | ["2.0","3.0"] | range | The client version. |
country | != | [["US","IL","Chicago"]] | array | The device location, in any of the following formats:
|
locale (Also applies to | != | ["en"] | string | The device locale. |
timeZone | != | ["America/New_York"] | string | The device time zone. For a complete list of time zones, see Time Zones. |
regAt | <= > | ["30"] | integer | The number of days that passed since your app was registered on this device. |
lastActiv (Also applies to | <= > | ["30"] | integer | The number of days that passed since your app was last opened on this device. |
Example Request : App version = (android and (osNumber is 3.0 or 2.0)
Code Block | ||
---|---|---|
| ||
{ "application_id":"103542", "name": "My Segment", "description": "My first segment", "rules": [ { "field": "appVersion", "operator": "=", "operand": [ "android" ], "case_sensitive": 1 }, { "field": "osNumber", "operator": ">", "operand": [ "3.0", "2.0" ] } ] } |
Example : Where alias = yotam or mor
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "application_id": "1234", "name":"Segment alias is mor or yotam", "rules":[ { "field": "alias ", "operator": "=", "operand": ["mor","yotam"] } ] } |
Info | ||
---|---|---|
| ||
Please note that we support up to 1000 aliases in a single call |