Segments
A segment selects the end users who see an experience. It is set up once on the tab "Segments" and used by many experiences. An author writes segments.
Rules
A segment is a rule. The rule is a group of conditions:
- "All of:": every condition must hold.
- "any of:": at least one condition must hold.
- "not:": the condition must not hold.
Groups can be nested. A condition is on one of the following subjects:
- A user attribute, such as
segment_codesorplan, as the application or its job writes them through the tenant API. - A company attribute, such as
employees. - An event, with a number of times within a number of days, such as
import.completedat least once in the last 30 days. - An experience, completed or not.
The operators are "equals", "differs from", "contains", "is one of", "more than", "less than", "at least", "at most", "exists" and "does not exist". The page counts the end users in the segment.
"Rule as JSON" shows the same rule as the tenant API takes it:
{ "all":
[ { "user_attribute": "segment_codes", "contains": "s.paid" }
, { "any":
[ { "user_attribute": "segment_codes", "contains": "r.admin" }
, { "account_attribute": "employees", "at_least": 50 }
]
}
, { "event": "import.completed", "at_least": 1, "within_days": 30 }
, { "not": { "experience": "foreign-currency-modal", "completed": true } }
]
}
In JSON the operators are eq, ne, gt, ge, lt, le, in, contains, exists, not_exists, at_least, at_most, within_days and, for an experience, completed. A rule is nested at most a few levels deep; a rule that cannot be read is refused with itgenwpt219.
A rule is evaluated by Waypoint in memory when an end user opens a page, on the attributes that were written last. The same grammar is used by the rules "Skip when" and "Also done when" of a step; see Experiences.
Delete a Segment
A segment that is the audience of an experience cannot be deleted (itgenwpt232). Give those experiences another segment first.