Recommending Segments

The Segments can be recommended or searched using the following endpoints:

Before you can use any of that endpoints, you need to create an Item Segmentation and then set up a Scenario in the Admin UI which will use that Segmentation.

Create a Scenario which returns Segments
Create a Scenario which returns Segments
Choose the Segmentation which shall be used in the Scenario
Choose the Segmentation which shall be used in the Scenario

The ID of that Scenario needs to be provided in the scenario parameter of the recommendation request:

Copy
const recommended = await client.send(
  new recombee.RecommendItemSegmentsToUser('2c169e', 5, {
    scenario: 'top_categories',
    cascadeCreate: true,
  }),
);

These are some examples of how recommending Segments can be used on your website or in your app:

Recommended Segments can be filtered or boosted using ReQL. You can access the ID of a Segment in ReQL using 'segmentId'.

Examples of filters:

  • Do not recommend the coupons category to the users

    ReQL
    'segmentId' != "coupons"
  • Do not recommend horror movies to kids

    ReQL
    if context_user["is_child_profile"] then 'segmentId' != "Horror" else true

Example of a booster:

  • Boosting the Editors Pick section

    ReQL
    if 'segmentId' == "Editors Pick" then 2 else 1
© Copyright 2026, Recombee s.r.o
docs.recombee.com