Skip to main content
A segment is a saved question about a tenant’s customers: “which of this business’s customers match these conditions right now?” Segments are dynamic — customers automatically enter and leave as they meet or stop meeting the conditions — and they’re what an automation uses to decide who receives a message. The fields a segment can ask about come from the data you share. If you haven’t yet, read How Reach models your data to see how contacts, transactions, locations, and your custom schemas become segmentable.
The customer-centric rule. A segment always returns a list of people, never a list of things or events. A condition can reach through a customer’s related records — their bookings, invoices, appointments, route stops — but the answer is always the customers those records belong to. There is no “60 days before a tournament” segment, because a tournament on its own is not a customer. If you can phrase your audience as “a customer who satisfies these conditions right now,” you can build it as a segment. The Planning Engage Automations guide walks through how to reframe a business event as a question about customers.

Structure

A segment consists of:
  • Name and Description — what it’s called and what it’s for.
  • Conditions — the criteria that define membership (see below).
  • Status — active or deactivated.
  • Tenant scope — which of your tenants the segment applies to. A partner-defined segment can target a single tenant, a subset, or all of them.
Segments are almost always created in the partner dashboard — by you when you set up segments for your tenants, or by tenants themselves in the embedded segment builder (including the AI builder). The API is for reading and managing segments programmatically, not the usual way they’re created. See the Segments API reference for the request and response shapes.

What a condition can ask about

Each condition targets one field. Fields come from two places:

Built-in customer fields

Available for every tenant out of the box:
  • Email, phone, first name, last name, user ID
  • Email and SMS opt-in / opt-out status

Custom fields you expose

Any field from your schema definitions that you’ve exposed to segmentation becomes conditionable. You control this through the fields_to_expose configuration on your partner resource schema definitions — each exposed field carries a friendly name, a description, a JSON path into your data, and an exposure target. Only fields exposed to segments appear in the segment builder. See Exposing fields to tenants for how to configure them.
The friendly name and description you give an exposed field are what your tenants see in the builder — and they’re also what the AI segment builder reads when a tenant describes an audience in plain language. Write them for a human.

Operators

The operator you can use on a condition depends on the field’s type. The type comes from the field’s JSON Schema definition (string, number, integer, boolean, array, a date / date-time string, or a reference to another schema). What each does:
Supplying multiple values behaves differently per operator. equals and contains combine multiple values with OR (match any). But greater_than and less_than combine them with AND — so passing two values to greater_than means “greater than both,” i.e. a lower bound of the larger value. Use this deliberately when you want a range.

Date-window operators (Date / DateTime fields)

These are what make per-customer relative timing possible — “30 days before renewal,” “birthday is today,” “serviced within a window.” A date field’s value can be compared against:
  • A fixed date using greater_than / less_than / equals (e.g. service_date is after 2026-01-01).
  • A relative date — N days before or after today — using greater_than / less_than. This is how you express “within the last 30 days” or “7 days from now.” (Relative dates support only the greater_than / less_than and month/day operators; relative equals / not_equals isn’t supported.)
  • equals_month_day — matches the same month and day regardless of year (birthdays, anniversaries).
  • equals_month_day_year — matches an exact month, day, and year.
  • between_month_day — the field’s month-and-day falls within a start–end window (handles windows that span a year boundary).
  • between_month_day_year — the field falls within an absolute start–end date window.
The most powerful condition type reaches through a customer’s related records and asks a count question about them. This is how you express “customers with 4 or more invoices” or “customers with a location that has no route stop scheduled this week.” A related-record condition specifies:
  • which related schema to look at and the field on it that points back to the customer,
  • a count operator (eq, gt, gte, lt, lte) and a count value, and
  • optional inner conditions on the related records (AND-combined), using the same operators above.
Two common shapes:
  • “Has at least N …” — count operator gte (or gt 0 for “has any”). “Customers who have at least 1 invoice paid more than 30 days ago.”
  • “Has zero …” — count operator eq 0 (or lt 1). “Customers who have no cleaning scheduled in the future.” Combine an at-least condition with a has-zero condition to get an at-risk cohort — see the pool-cleaning winback example.
Because the condition still evaluates per customer, the result is still a list of people — the related records only decide which people qualify.

Condition structure

A simple field condition:
Conditions are grouped with and / or logic, and groups can nest. A related-record condition references the related schema and its own inner conditions:
In practice, tenants build these in the segment builder UI rather than authoring JSON by hand — the shapes above are for understanding what the builder produces and what the API accepts.

Usage in automations

Segments define who an automation targets. An automation can use a segment to:
  1. Include users — the target audience for a communication.
  2. Exclude users — people who should not receive it.
See Automations for how segments drive triggers and sends.