Build and publish a reusable audience segment
This task produces a named, saved audience definition that can be reused across campaigns, activation destinations, and reporting queries without being rebuilt from scratch each time. The output is a segment record with a unique ID, a PQL or equivalent query definition, an estimated size, and (once evaluated) a population of profile IDs that can be activated or inspected. Segment definitions are the primary abstraction that separates data modeling from campaign execution: a marketer references a segment by name without needing to know the underlying data structure.
Combining attribute and event criteria. Segment definitions that combine profile attributes (demographic, preference) with behavioral events (product viewed, page visited, purchase made) produce more precise audiences than attribute-only or event-only definitions. The key design decision is the time window on event criteria: "viewed product X in the last 7 days" is a very different audience from "has ever viewed product X." Most platforms express event-time windows in relative terms (last N days) rather than absolute dates, making segment definitions portable across calendar periods.
PQL and equivalent query languages. AEP's Segment Builder generates Profile Query Language (PQL) under the hood. PQL is a declarative query language that operates on the unified profile store, supports chaining of event conditions (CHAIN(xEvent, timestamp, [C0: WHAT(...)])), and produces a boolean membership result for each profile. Equivalent languages exist in other platforms: Segment's Trait Builder uses a subset of SQL-like predicates; Hightouch uses a visual audience builder that compiles to SQL against the CDW.
Streaming vs. batch evaluation. Edge Segmentation evaluates segment membership in milliseconds at the edge network as events arrive, enabling personalization at the moment of interaction. Batch segmentation evaluates segment membership on a schedule (typically daily), producing a snapshot suitable for email campaigns or offline reporting. The segment definition syntax is the same in both modes; evaluation mode is configured at the datastream level and per-segment.
Parallel viability (high). Audience building exists in every CDP and data activation platform. The craft skill — choosing the right attribute/event combination, setting appropriate time windows, estimating and validating audience size — is vendor-neutral. Phase 3 will document Segment Audience definitions and Hightouch audience builder configuration as parallel implementations.