Segments
Create & Edit a Segment
This guide describes the creation & editing workflow based on the live drawer UI.
Opening the Drawer
| Action | How | 
|---|---|
| New Segment | Click [New Segment] top-left | 
| Edit Existing | Click pencil icon in row | 
| Close | X icon (confirmation dialog if unsaved changes) | 
1. Basic Info Section
| Field | Required | Input | Description | Example | 
|---|---|---|---|---|
| Segment Name | Yes | Single-line | Unique, purpose-revealing identifier | Age20_30_Female_iOS | 
| Description | No | Textarea | Internal operational memo | Retention Test Cohort A | 
Validation: Missing name triggers an inline error at save (e.g., “Enter a name”).
2. Condition Builder Structure
Initial state: Group 1 containing one empty condition row.
| Element | Role | 
|---|---|
| Group header (e.g. Group 1) | Identifies group | 
| Event/Attribute select button | Choose event or attribute (can type new custom event) | 
| Add Parameter button | Add event parameter key/value filters | 
| OR button | Convert single condition into OR group (add alternate) | 
| AND button | Add another single condition within same group | 
| Add Group button | Add a new top-level AND group | 
| X icon | Delete condition or group (minimum one retained) | 
2-1. Adding an Event Condition
- Click selector → popover opens with tabs
- Tabs:
- Event Log (system events: page_view, purchase, etc.)
- Custom Events (captured non-system names)
- User Attributes / Device Info / Date & Time (switch to attribute mode)
 
- Type to filter or create a new custom event name
- Select event → row label updates
- (Optional) Add parameter filters
2-2. Adding an Attribute Condition
- Selector → choose tab (User Attributes / Device Info / Date & Time)
- Pick field (e.g., user.country, device.category, date.hour)
- Row enters attribute state; [Add Condition] button appears
- Click [Add Condition] → operator/value popover
- Choose operator (EQUALS, NOT_EQUALS, GREATER_THAN, LESS_THAN, CONTAINS, IN, NOT_IN)
- IN/NOT_IN: multi-values via Enter/comma → tag accumulation
- Applied criteria show as removable badges
2-3. Adding Event Parameter Conditions
- Click [Add Parameter]
- Select or type Key
- Select operator (same list)
- Enter value(s)
- Result appears as key operator valuebadge (multiple allowed)
2-4. Building an OR Group
| Scenario | Result | 
|---|---|
| Click OR on single condition | Converts to OR group + adds blank alternate | 
| Last condition in OR group | (+) role adds another alternate | 
| Between conditions | “OR” label visually separates items | 
2-5. Adding Additional Groups
Use [Add Group] to append another top-level AND-connected group.
2-6. Deleting & Constraints
| Target | Constraint | 
|---|---|
| Condition delete | At least one remains in group | 
| Group delete | At least one group overall | 
| Drawer close | Confirmation if unsaved changes | 
3. Saving
Top-right primary button states:
| Mode | Label | Loading | 
|---|---|---|
| Create | Create Segment | Creating... spinner | 
| Edit | Save Changes | Updating... spinner | 
Success → drawer closes & list refreshes.
4. Best Practices
- Avoid overly generic event names (button_clickvspurchase_button_click)
- Use OR only for semantic alternates (page_view OR screen_view)
- Mix event + attribute to sharpen targeting precision
- Limit IN lists to top impactful values to avoid dilution

