Testing a segment
Preview before you save
Section titled “Preview before you save”POST /v1/segments/preview runs a definition that does not exist yet over one app’s existing profiles, and answers with the match count and a small sample of members:
cow segments preview --app-id app_website \ --definition '{"match": "all", "predicates": [{"kind": "trait", "name": "plan", "op": "eq", "value": "free"}]}'The app is the one the segment would belong to, so the count is the count you get when you save it. The scan is bounded: 1,000 profiles per call, rate-limited per organization. When it hits the cap the count comes back truncated, which is a floor rather than the exact number. A saved segment’s memberCount is always exact.
The dashboard runs the same preview as you build a definition, so the count under the form is the count you will get.
Widening a rule reaches nobody
Section titled “Widening a rule reaches nobody”Editing a definition recomputes membership across the app the segment belongs to, and so does a push that changes a journey’s inlined segment. Every entry and exit that finds is real and lands on the person’s timeline.
The people already inside a segment enter its journey at one moment only: when somebody turns that journey on and ticks the box, with the count in front of them. See Enable, disable, observe.
Where next
Section titled “Where next”- Predicate reference: what you can express.
- Testing journeys: the same question one step later, for the journey a segment starts.