defineSegment.
Define a segment
segments/us-icp.ts
The server derives the segment’s own slug from its
name (which defaults to
the title-cased code slug), and the segment is state-tracked and adopted by
name — so re-deploying the same definition reattaches rather than duplicates.segmentRef("<segment-uuid>") — see Referencing existing resources.
Use a segment
Run a play across a segment as a batch, or export its records:Next steps
Plays
Trigger automations over the rows a segment tracks.
Querying data
SQL over the models behind your segments.

