To access segment navigate to Engage > Segments. Segments are used for targeting a specific set of users. It is important to note the following:
Users can be targeted based on values of System User Fields and Custom User Fields. The segment criteria can be 'Include/Exclude' and the values range can be one of the following:
There can be several segment criteria to target specific user groups. The criteria can be link by 'OR' allowing selecting criteria that includes/excludes, for example, users from US or CA. The 'AND' criteria will impose that user groups satisfy the first criteria AND the following criteria.
This would target users from US/CA that have spend money in the application. Please note that any changes to Segment definition will generally be applied within 1-5 minutes.
When using Channel API calls with custom segmentation (Segments defined using Custom User Fields), the time between the reception of the event and the update of the user property may take milliseconds to become effective. Synchronous calls to the Channel API may be affected by the time it takes to update an user property. In these cases, calls to the Channel API depends on the data of the immediate previous event. To avoid implementing waiting times between Event API and Channel API calls Omniata provides a way to override segment rules within the Channel API calls.
In our test organization we have defined cuf_level as a Custom User Field (CUF) for storing the level of the user. A common definition of a CUF formula for tracking user level will look like this:
(event_kvp['level'] or user_vars['cuf_level'] or '')
Every time the user levels up in the game, we request a level-depending content. The order of events are:
The calls are not processed synchronously per user, this means that the Channel API might return 19 instead of 20. Since we know in-game that the level of the user is 20 prior to requesting the level-depending content we can tell Engager that it should return the content for that level. Then the calls will look like this:
In this way we can guarantee that the returned content is that of level 20.
Segments are not overridable by default, Engager allows only defined fields within a segment to be overwritten by Channel API calls. The field should use the channel_request qualifier to request the value of the Channel API call.
A modified version of the CUF that accepts channel requests parameters will look like:
(event_kvp['level'] or channel_request['level'] or user_vars['cuf_level'] or '')
The CUF will then either read the event parameter, the channel request parameter (if available) or read the stored value in the user property. Remember to add the channel_request qualifier in the field used in the segmentation rules in order to enable overridable parameters.
Note: Overriding segment parameters will NOT update the stored value in the corresponding CUF under any circumstance. That is, the actual stored value of the CUF is still set and updated only by event data. Overriding simply allows Channel API to use the value of the channel request for targeting instead of the value of the CUF.
Tip: Once defined, if the channel request does not include an explicit value for the field, Channel API will use the stored value from the user variables.