nevent_create_segment
Create and persist a new audience segment from a filter definition. PREREQUISITE: call nevent_segmentation_criteria first to discover valid criterion_ids and operators. MANDATORY RULES: (1) ENTITY operators (is/is_not) accept a single string OR an array of strings — e.g. value: "EVENT_ID" or value: ["E1","E2"]. (2) Omit modifiers unless the user explicitly requests frequency/recency filtering; if included, time_range.value MUST be > 0. (3) Criteria fields: only criterion_id, operator, value — omit id, timeframe, type. (4) KNOWN LIMITATION: do NOT mix attendance criteria (attended_event, ticket_type) with spending criteria (total_spent, ticket_spent, cashless_recharge_amount) in the same stanza — put them in separate stanzas. After creation, call nevent_segment_preview to count the audience, then nevent_create_campaign to send to this segment.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Human-readable name for the segment, e.g. "VIP Attendees 2025" | |
| definition | Yes | Segment DSL: stanzas are OR-combined, criteria within each stanza are AND-combined. Must have at least one stanza with at least one criterion. Use nevent_segment_preview first to validate the definition. | |
| description | No | Optional description of the segment's purpose |