Segments (@loyaltyos/segments)
Dynamic customer segmentation with a visual rule builder.
Segment Types
- Dynamic — rule-based, automatically evaluated
- Static — manually curated list of member IDs
Rule DSL
Operators: eq, neq, gt, gte, lt, lte, between, contains, in
{
"operator": "AND",
"conditions": [
{ "field": "totalPoints", "operator": "gt", "value": 1000 },
{ "field": "tier", "operator": "eq", "value": "Gold" }
]
}
Supports recursive AND/OR groups for complex audience definitions. Real-time member count estimation before saving.
See the full README on GitHub for details.