Skip to main content
A segment is a query that resolves to a set of users. Its membership reflects matching user data when the segment is evaluated. You do not maintain it by hand.

What you can segment on

Spotzee rules operate over two groups:
  • User attributes: any standard or custom field on a user, including nested data.* fields (data.plan, data.lifetime_value, etc.).
  • Events: any tracked event, optionally combined with a frequency window.
Anything you want to segment on must be one of the two. Sync external state into data.* if you need it as a filter input.

Operators by field type

Each rule node has a typed comparison. Operators are scoped to the rule type. The API also recognises shopify_purchase rules for synced Shopify product or collection IDs. The segment builder does not currently expose that rule type.

Event frequency

Event rules express “happened how often, when” via an optional frequency block:
  • count: how many times the event occurred, with a comparison operator (=, <, <=, >, >=).
  • period: the window the count applies to. Either a rolling window (unit: hour | minute | day | week | month | year, value: N) or a fixed range (start_date, optional end_date).
Use the rolling window for “in the last 30 days”-style rules. Use the fixed range for “between Black Friday and Cyber Monday”-style cohorts.

Build a segment

1

Pick a base

Start from all users or from another segment.
2

Add filters

Combine conditions with AND / OR. Group conditions with parentheses for complex logic.
3

Preview

The segment editor shows live count and a sample of matched users.
4

Save and use

Reference the segment from any journey entrance, campaign audience, or send step.

Common patterns

  • Engaged in last 30 days: email_opened or email_clicked event with frequency count >= 1, rolling 30-day window.
  • At-risk: email_opened last occurrence > 60 days ago AND data.lifetime_value > 500.
  • High-intent: page_viewed with data.path = "/pricing", frequency count >= 1 over rolling 7 days, AND data.is_customer = false.
  • Renewal due (financial-services attribute): data.policy_renewal_date within the next 30 days.

Reference

Segments are exposed as dynamic Lists in the API:

Next

Build a journey

Use a segment as the audience.

Send events from your backend

Get behavioural data into Spotzee so segments can react to it.