Skip to main content
Goal: define an audience, check its size before saving it, and save it for reuse.

The rules

  • Each condition is one field, one operator and one value.
  • All conditions must hold — they are combined with AND.
  • Three fields compare numbers (totalAmountSpent, totalTransactions, lastActivityDays) and accept gt, lt or eq.
  • country compares text and accepts eq only: there is no meaningful ordering of country names, so the contract, the builder and the API all reject anything else with a validation_failed problem.

In the app

From the API

Count an audience first:
Then save it:
The saved segment carries its conditions, so it stays readable and editable later.

Notes

A segment with no conditions is refused. An empty audience is almost always a mistake, and a segment that matches everything is rarely what was meant.
The stored audience size is a snapshot. It was true when the segment was written; customer activity changes. The composer re-counts when you preview.
Deleting a segment does not touch campaigns generated from it. Each campaign keeps its own copy of the segment name, so past work stays legible.
Last modified on October 6, 2026