Skip to main content
User segments let you define reusable groups of users based on their behaviour, profile data, or interactions with specific items. Segments are evaluated at recommendation time and can be referenced as conditions in ranking rules, giving you fine-grained control over who sees what.

Creating a segment

1

Open Segments

Go to Relevance → Segments.
2

Start a new segment

Click New Segment.
3

Name the segment

Enter a name and optional description.
4

Add conditions

Add one or more conditions. See the condition types below.
5

Activate evaluation

Toggle Active on so the segment is evaluated at request time.
6

Create the segment

Click Create Segment.
A user belongs to a segment only when all conditions match (AND logic). If you need OR logic, create separate segments and reference them independently in rules.

Condition types

Each condition has a type, a field, an operator, and optionally a value.

Behavioral

Counts the number of events of a given name for the user. Example: click greater_than 10 matches users with more than 10 click events.

Demographic

Looks up a value from the user’s metadata. Example: country equals US matches users whose metadata has country: "US".

Computed

Checks derived statistics calculated from the user’s event history. Example: total_events greater_than 50 matches users with high engagement.

Item interaction

Checks whether a user has interacted with a specific item and how many times. The operator dropdown shows contextual labels: Example: 3187 exists matches users who have viewed, clicked or otherwise interacted with item 3187.

How segments are evaluated

At recommendation time the engine:
1

Pre-fetch user data

Pre-fetches the user’s event counts, metadata, computed stats, and item interaction counts in efficient batch queries.
2

Evaluate active segments

Evaluates each active segment’s conditions against this data.
3

Return matching segments

Returns the list of matching segment IDs to the rules engine.
Segment evaluation never blocks a request. If segments cannot be evaluated, recommendations still return, without segment-targeted rules.

Using segments in rules

Once a segment exists, you can target a rule to it:
1

Open the rule editor

Open the rule editor. See Rules Engine.
2

Add a segment condition

Add a condition and set the field to segment_id.
3

Use the segment dropdown

The UI shows a dropdown of all available segments instead of a free-text field.
4

Select the target segment

Select the segment you want to target.
The rule then only applies to users who belong to that segment at request time.

Tips

  • Start broad, then narrow. Create a simple segment first, verify it works via the Explainability page, then refine conditions.
  • Combine with scheduling. A segment like “users who have not viewed the new collection” paired with a scheduled rule creates a time-bounded campaign.
  • Item interaction is powerful. Use it to tell apart users who have engaged with an item from those who have never seen it, which is what upsell and completion campaigns need.
The number of segments you can create depends on your plan. See Billing and plans.