Overview
Turret automatically detects which metadata fields are categorical (enums) and makes them available for segmentation. This lets you filter your dashboard and journey views by attributes like platform, language, user plan, or any other categorical metadata you send.How It Works
When you send events with metadata, Turret analyzes each field and classifies it as one of three types:| Type | Description | Example | Segmentable |
|---|---|---|---|
| text | Free-form text content | User prompts, messages | No |
| enum | Categorical values with limited options | platform: "ios", language: "spanish" | Yes |
| number | Numeric values | Response time, token count | No |
Automatic Detection
Turret uses an LLM to intelligently classify your metadata fields:- First event: When you send an event with new metadata keys, Turret analyzes the field names and sample values
- Classification: Fields are classified as text, enum, or number based on context
- Re-validation: After 100 events, classifications are re-validated with real sample values to ensure accuracy
Classification happens automatically in the background. You don’t need to configure anything - just send your events with metadata and Turret handles the rest.
Using Segments
In the Dashboard
- Click the Segments button in the top-right toolbar
- A side panel opens showing all detected enum fields
- Select a value to filter the view (e.g.,
platform: ios) - Click Apply filters to update the dashboard
In Journeys
Segments work the same way in the Journeys view:- Click Segments to open the filter panel
- Select values for any enum fields
- Apply to see journey patterns for that segment
- Do iOS users ask different questions than Android users?
- Do Spanish-speaking users have different journey patterns?
- Do Pro plan users have different needs than Free users?
Sending Segmentable Metadata
Include categorical metadata in your events:Good Segmentation Fields
Platform & Device
platform: “ios”, “android”, “web”device_type: “mobile”, “tablet”, “desktop”browser: “chrome”, “safari”, “firefox”
User Attributes
user_plan: “free”, “pro”, “enterprise”user_type: “new”, “returning”, “power_user”account_age: “trial”, “active”, “churned”
Locale & Region
language: “english”, “spanish”, “french”country: “US”, “UK”, “DE”timezone: “PST”, “EST”, “UTC”
Context
feature: “chat”, “search”, “analytics”source: “web_app”, “mobile_app”, “api”environment: “production”, “staging”
Overriding Field Types
Sometimes Turret’s automatic detection may classify a field differently than you intend. You can override the detected type in Settings.Accessing Override Settings
- Go to Settings in your dashboard
- Click the Metadata tab
- Find the field you want to override
- Click the type dropdown and select the correct type
- Click Save
When to Override
ID fields detected as enum
ID fields detected as enum
If a field like
conversation_id has limited values during early usage, it might be detected as an enum. Override it to text since IDs are identifiers, not categories.Categorical field detected as text
Categorical field detected as text
If a field like
status contains values like “pending”, “complete”, “failed” but was detected as text, override it to enum to enable segmentation.Numeric string detected as text
Numeric string detected as text
If a field like
response_time_ms was detected as text because values were sent as strings, override it to number for proper handling.Override Behavior
- Immediate effect: Overrides take effect immediately for dashboard filtering
- Persistent: Overrides are saved and won’t be changed by re-validation
- Reversible: Click “Clear” next to an override to return to auto-detection
Best Practices
Keep Enum Values Consistent
Use consistent values for categorical fields:Limit Enum Cardinality
Fields with too many unique values aren’t useful for segmentation:Use Meaningful Field Names
Clear field names help with automatic detection:Combining Segments with Journeys
Segments are most powerful when combined with journey analysis:- Filter by segment: Select
platform: iosin the Segments panel - View journeys: See how iOS users flow through topics
- Compare segments: Switch to
platform: androidand compare patterns - Identify differences: Discover segment-specific pain points or opportunities