# Recommendation Logics

> Source: https://docs.recombee.com/recommendation_logics

> For the complete documentation index, see [llms.txt](/llms.txt).

# Recommendation Logics

Logic allows you to specify the desired behavior of the recommendation model.

While Recombee is generally a domain-independent recommendation engine and the default model is optimized to work well in most cases, we have used our experience in some frequent domains to setup some tuned models, and you can now easily pick the logic that is tailored for the particular case.

## Setting Logic in the Admin UI

You can assign a particular logic to a [Scenario](/scenarios) in the [Admin UI](/admin_ui).

[![Setting Logic in the Admin UI](/img/gui/set_logic.png)](/img/gui/set_logic.png)

Alternatively you can [use API parameters to set the logic](#recommendation-logics-set-via-api).

## List of Logics

Below is a list of logics available for most databases. Some databases tweaked by the Recombee support team may have custom logics not specified here.

Tip

See [Integration Tips](/integration_tips) if you are not sure which logic should be used in your use case.

### Universal Models

Universal Recombee models for the most common use-cases.

#### recombee:default

Default model ensemble aiming to work well in most common use cases. It is an ensemble of collaborative filtering and content-based recommendation, backed by popularity-based models when there's not enough data in the given context. The ensemble is being continuously optimized by AI so it automatically adapts to incoming data.

---

Applicable to endpoints

[Recommend Items to Item](/api#request-recommend-items-to-item)·

[Recommend Items to User](/api#request-recommend-items-to-user)·

[Recommend Users to Item](/api#request-recommend-users-to-item)·

[Recommend Users to User](/api#request-recommend-users-to-user)·

[Recommend Item Segments to Item](/api#request-recommend-item-segments-to-item)·

[Recommend Item Segments to User](/api#request-recommend-item-segments-to-user)·

[Recommend Item Segments to Item Segment](/api#request-recommend-item-segments-to-item-segment)

#### recombee:homepage

Universal model ensemble suitable for putting recommendations on the homepage / welcome-screen scenarios.

---

Applicable to endpoints

[Recommend Items to User](/api#request-recommend-items-to-user)

#### recombee:personal

Universal model ensemble suitable for user-based recommendations reflecting the personal tastes of the current user.

---

Applicable to endpoints

[Recommend Items to User](/api#request-recommend-items-to-user)

---

Requirements

There must be interaction data for the user.

#### recombee:similar

Universal model ensemble suitable for either recommending items which are similar to the given item (in case of Items-to-Item recommendation), or recommending users who are similar to the given user (in case of Users-to-User recommendation).

---

Applicable to endpoints

[Recommend Items to Item](/api#request-recommend-items-to-item)·

[Recommend Users to User](/api#request-recommend-users-to-user)

#### recombee:popular

Universal model suitable for recommending globally popular items, taking into account all interaction types. More important actions (purchases, cart-additions) have higher weight for computing the popularity than less important actions (detail-views).

---

Applicable to endpoints

[Recommend Items to Item](/api#request-recommend-items-to-item)·

[Recommend Items to User](/api#request-recommend-items-to-user)

---

Requirements

Interaction data (Detail Views/Purchases/Cart Additions) must be present.

---

##### Parameters

timePeriod

Duration

Default: **14d** 

The time period in which the popularity is measured.

---

userSegmentFilter

String

Default: **true**

[ReQL filter](https://docs.recombee.com/reql_filtering_and_boosting#reql-filtering) on top of user properties defining the segment of users among whom the popularity is calculated. For example, when user properties like `profession` and `country` are provided for some users, you may only ask for items popular among software developers in US and Canada: `'profession'=="software developer" and 'country' in {"US", "CA"}`.

---

interactionTypes

Enum Set

Default: **\[bookmarks, cartAdditions, detailViews, purchases, ratings, viewPortions\]**

Allowed Values: **bookmarks |** **cartAdditions |** **detailViews |** **purchases |** **ratings |** **viewPortions** 

Interaction types to be taken into account when computing the popularity. By default, all the interactions are taken into account. But for example by providing only `["purchases"]`, you will retrieve items which are most frequently purchased, no matter how frequently are they (or the other items) viewed, bookmarked, etc.

#### recombee:popular-segments

Universal model ensemble suitable for recommending globally popular segments.

---

Applicable to endpoints

[Recommend Item Segments to User](/api#request-recommend-item-segments-to-user)

---

##### Parameters

timePeriod

Duration

Default: **14d** 

The time period in which the popularity is measured.

---

userSegmentFilter

String

Default: **true**

[ReQL filter](https://docs.recombee.com/reql_filtering_and_boosting.html#reql-filtering) on top of user properties defining the segment of users among whom the popularity is calculated. For example, when user properties like `profession` and `country` are provided for some users, you may only ask for items popular among software developers in US and Canada: `'profession'=="software developer" and 'country' in {"US", "CA"}`.

---

interactionTypes

Enum Set

Default: **\[bookmarks, cartAdditions, detailViews, purchases, ratings, viewPortions\]**

Allowed Values: **bookmarks |** **cartAdditions |** **detailViews |** **purchases |** **ratings |** **viewPortions** 

Interaction types to be taken into account when computing the popularity.

#### recombee:recently-viewed

Model returning the list of recently viewed items for a particular user.

---

Applicable to endpoints

[Recommend Items to User](/api#request-recommend-items-to-user)

---

Requirements

Detail Views must exist for the user.

---

##### Parameters

maxAge

Duration

Default: **14d** 

Maximal age of the DetailView since the current timestamp.

---

recencyOrdering

Enum

Default: **descending**

Allowed Values: **ascending |** **descending** 

Order in which the items are returned with regard to the time when they were interacted. When the order is descending, the last interacted item is at the beginning of the list of recommendations. When it is ascending, the first interacted item matching the `maxAge` condition is at the beginning of the list.

#### recombee:visually-similar

Model recommending similar items based on visual similarity (using deep-learning neural networks to process the images provided through the image properties). While the image similarity can take part in other Logics as well, in `recombee:visually-similar`, it is explicitly used as the primary model. Image processing may take some time. Therefore, changes in image item properties do not take effect in real-time. The functionality is still in beta mode.

_This Logic is not available in new databases by default. Please contact [support@recombee.com](mailto:support@recombee.com) if you want to use it._

---

Applicable to endpoints

[Recommend Items to Item](/api#request-recommend-items-to-item)

---

Requirements

Some image properties must be defined for items, with valid image links provided for the majority of the items in the catalog.

---

##### Parameters

useFallbackModels

Boolean

Default: **false**

Enable fallback models to make the recommendations if the model based on visual similarity cannot be used (e.g. due to a missing image for the given source item).

#### recombee:similar-properties

Model recommending similar items based on item properties (numerical values, sets, and texts). While property values can take part in other Logics, in `recombee:similar-properties`, they are explicitly used as the primary data source for recommending similar items or uses. Various machine-learning methods, including NLP deep-learning networks that process unstructured text descriptions, are used to compute the similarities.

---

Applicable to endpoints

[Recommend Items to Item](/api#request-recommend-items-to-item)·

[Recommend Users to User](/api#request-recommend-users-to-user)

---

Requirements

Some properties must exist for the items/users, depending on the used API endpoint.

---

##### Parameters

useFallbackModels

Boolean

Default: **false**

Enable fallback models to make recommendations if the model based on item properties cannot be used (e.g. due to missing property values for the given source item).

#### recombee:emailing

Model ensemble suitable for recommending items in periodic e-mailing campaigns. It contains fine-tuned rotation settings so that the set of recommended items for a particular user changes with each e-mail sent.

By default, rotation only takes into account recommendations (e-mails) at most 14 days old. Should a longer time period be needed for your use case, kindly contact support@recombee.com.

---

Applicable to endpoints

[Recommend Items to User](/api#request-recommend-items-to-user)

---

##### Parameters

rotationPolicy

Enum

Default: **smart**

Allowed Values: **smart |** **total** 

A policy determining how strictly should already recommended items be rotated.

The default option "smart" contains fine-tuned rotation settings, which take into account the position of recommended items and enable some of the items to re-appear in further e-mails.

Option "total" never recommends items that have already appeared in previous e-mails.

#### recombee:custom-sort

Model suitable for recommending items ordered by a ReQL expression given as a booster

---

Applicable to endpoints

[Recommend Items to Item](/api#request-recommend-items-to-item)·

[Recommend Items to User](/api#request-recommend-items-to-user)

#### recombee:related-to-segment

Recommends items that are contextually related to the [Item Segment](https://docs.recombee.com/segmentations) and should be of interest to the user. Items may belong to the Segment or be outside it if they are strongly relevant.

Consider using [recombee:personal-from-segment](https://docs.recombee.com/recommendation_logics#recombee-personal-from-segment) if you want recommendations strictly limited to items within the Segment.

**Examples:**

* _News:_ For the "Climate Change" Segment, recommend articles about renewable energy (inside the Segment) or related topics like electric vehicles (outside the Segment).
* _Music:_ For the "Jazz" Segment, recommend jazz-related songs, including classic tracks (inside the Segment) or modern experimental pieces (outside the Segment).
* _E-commerce:_ For the "Digital Cameras" Segment, recommend products like digital cameras (inside the Segment) or accessories like tripods, lenses, or lighting kits (outside the Segment).
* _Video Streaming:_ For the "Science Fiction" Segment, recommend sci-fi movies (inside the Segment) or related dystopian thrillers (outside the Segment).

---

Applicable to endpoints

[Recommend Items to Item Segment](/api#request-recommend-items-to-item-segment)

#### recombee:personal-from-segment

Recommends items from the [Item Segment](https://docs.recombee.com/segmentations), tailored to the user's preferences.

Consider using [recombee:related-to-segment](https://docs.recombee.com/recommendation_logics#recombee-related-to-segment) if you don't need all the recommended items to belong to the Segment.

**Examples:**

* _News:_ For the "Environmental News" Segment, recommend articles on climate policy or renewable energy that align with the user’s reading history.
* _Music:_ For the "Jazz" Segment, recommend jazz songs matching the user’s listening habits.
* _E-commerce:_ For the "Digital Cameras" Segment, recommend digital cameras the user is most likely to be interested in, based on their browsing and purchase history.
* _Video Streaming:_ For the "Science Fiction" Segment, recommend sci-fi movies that match the user’s preferences.

---

Applicable to endpoints

[Recommend Items to Item Segment](/api#request-recommend-items-to-item-segment)

#### recombee:popular-from-segment

Recommends the most popular items within the [Item Segment](https://docs.recombee.com/segmentations), based on overall engagement. Use this Logic to highlight trending or widely appealing items.

**Examples:**

* _News:_ Most-read articles from the "World Politics" Segment.
* _Music:_ Most-streamed tracks from the "Rock" Segment.
* _E-commerce:_ Best-selling smartphones in the "Smartphones" Segment.
* _Video Streaming:_ Most-watched action movies in the "Action Movies" Segment.

---

Applicable to endpoints

[Recommend Items to Item Segment](/api#request-recommend-items-to-item-segment)

---

Requirements

Interaction data (Detail Views/Purchases/Cart Additions) must be present.

---

##### Parameters

timePeriod

Duration

Default: **14d** 

The time period in which the popularity is measured.

---

interactionTypes

Enum Set

Default: **\[bookmarks, cartAdditions, detailViews, purchases, ratings, viewPortions\]**

Allowed Values: **bookmarks |** **cartAdditions |** **detailViews |** **purchases |** **ratings |** **viewPortions** 

Interaction types to be taken into account when computing the popularity. By default, all the interactions are taken into account. But for example by providing only `["purchases"]`, you will retrieve items which are most frequently purchased, no matter how frequently are they (or the other items) viewed, bookmarked, etc.

#### recombee:items-from-top-segment-for-you

This Composite Logic provides a comprehensive recommendation in a single response consisting of:

* **Top Segment for the User**: It identifies and returns the most relevant Item Segment (e.g., the top category) for the user from the specified Segmentation.
* **Top Items from the Segment**: Along with the Segment, it also returns a list of the top items within that Segment.

This Logic is ideal for recommending a section and its content together, making it particularly useful for personalized homepage sections.

If you want to display multiple distinct sections in a personalized order on your homepage, you can achieve this by making multiple Composite Recommendation requests within a single Batch call.

For more specific use cases, such as "Videos From The Top Genre For You" or "Products from the Top Category For You," there are specialized Logics available.

---

Applicable to endpoints

[Composite Recommendation](/api#composite-recommendation)

---

##### Composite Stages

For

Recommendation

Source

Result

User

Item Segment

Items

Source

Endpoint:   **Item Segments to User**

The Logic returns the most relevant Item Segment (e.g., the top category) for the user from the specified Segmentation.

---

Result

Endpoint:   **Items to Item Segment**

The Logic returns the list of the top items within the top Segment.

#### recombee:because-you-interacted

This Composite Logic delivers two results within a single response consisting of:

* _Item the User Interacted With_: The Logic selects and returns an item that the user has interacted with, based on the interaction types specified by the interactionTypes parameter (e.g., Watched, Purchased, Liked).
* _Top Related Items_: Simultaneously, it returns a list of top items related to that specific interacted item.

This Logic is ideal for general "Because You..." scenarios, where recommendations are tailored based on the user's previous interactions. For more specific use cases, such as "Because You Bought" or "Because You Watched", there are specialized Logics available.

---

Applicable to endpoints

[Composite Recommendation](/api#composite-recommendation)

---

##### Composite Stages

For

Recommendation

Source

Result

User

Item

Items

Source

Endpoint:   **Items to User**

The Logic selects and returns an item that the user has recently interacted with.

##### Parameters

interactionTypes

Enum Set

Default: **\[bookmarks, cartAdditions, detailViews, purchases, ratings, viewPortions\]**

Allowed Values: **bookmarks |** **cartAdditions |** **detailViews |** **purchases |** **ratings |** **viewPortions** 

Defines which interactions are considered when selecting the item the user has interacted with

---

maxDaysAgo

Integer

Default: **30**

Defines the maximum number of days since the user interacted the item for it to be considered for the "Because" selection.

For example, setting maxDaysAgo to 7 will only consider items interacted within the last 7 days.

---

Result

Endpoint:   **Items to Item**

The Logic returns a list of top items related to a specific item, offering content the user is likely to be interested in.

#### recombee:swiping-feed

This Logic is designed for infinite swiping feed experiences (such as reels or short-form video feeds), where users continuously browse content and can express feedback through likes or dislikes.

It optimizes recommendations in real time based on a configurable combination of user engagement (likes, number of viewed items, purchases), and time spent consuming content.

---

Applicable to endpoints

[Recommend Items to User](/api#request-recommend-items-to-user)·

[Recommend Items to Item](/api#request-recommend-items-to-item)

---

Requirements

[View Portions](https://docs.recombee.com/api#set-view-portion) shall be sent for consumed content, with the [autoPresented parameter](https://docs.recombee.com/api#set-view-portion-param-autoPresented) set to `true` and [timeSpent](https://docs.recombee.com/api#set-view-portion-param-timeSpent) specified

Likes and dislikes shall be sent as +1 / -1 [Ratings](https://docs.recombee.com/api#add-rating)

After a few items have been presented, call [Recommend Next Items](https://docs.recombee.com/api#recommend-next-items) to retrieve the next batch of content

---

##### Parameters

creationTimestamp

Property

Default: **None**

Property representing the creation time of an item, enabling the Logic to evaluate and prioritize newer content in recommendations.

---

timeSpentWeight

Double

Default: **0**

Weight (0–1) controlling the importance of [time spent](https://docs.recombee.com/api#set-view-portion-param-timeSpent) on content in the optimization.

---

likeWeight

Double

Default: **0**

Weight (0–1) controlling the importance of user likes (positive [Ratings](https://docs.recombee.com/api#add-rating)) in the optimization.

---

itemsShownWeight

Double

Default: **0**

Weight (0–1) controlling the importance of maximizing the number of items consumed by the user.

---

purchaseWeight

Double

Default: **0**

Weight (0–1) controlling the importance of [Purchases](https://docs.recombee.com/api#purchases) in the optimization.

### Search

Models for both personalized and non-personalized fulltext search.

#### search:personalized

Smart personalized fulltext search which takes into account both the search query and the personal preferences of the user.

---

Applicable to endpoints

[Search Items](/api#request-search-items)·

[Search Item Segments](/api#request-search-item-segments)

---

##### Parameters

personalizationImpact

Enum

Default: **medium**

Allowed Values: **low |** **medium |** **high** 

Determines whether personalization or full-text should have a higher priority in the ranking of the items.

---

allowEmptyQueryFallback

Boolean

Default: **true**

Controls the behavior of the Logic when the `searchQuery` is empty. If set to _true_, the Logic returns personalized recommendations in case of an empty search query. If set to _false_, an empty result list is returned instead.

#### search:non-personalized

Non-personalized fulltext search, based purely on how well the search query is matched.

---

Applicable to endpoints

[Search Items](/api#request-search-items)·

[Search Item Segments](/api#request-search-item-segments)

---

##### Parameters

allowEmptyQueryFallback

Boolean

Default: **true**

Controls the behavior of the Logic when the `searchQuery` is empty. If set to _true_, the Logic returns personalized recommendations in case of an empty search query. If set to _false_, an empty result list is returned instead.

#### search:semantic

Semantic search utilizes a large language model (LLM) to improve search accuracy by understanding the intent and context behind user queries.

Instead of relying solely on keyword matches, the system comprehends the semantic meaning of queries and retrieves results that align with the user's intentions. This advanced Logic delivers more accurate, context-aware search results, even when the query terms differ from the content in the database.

This Logic can be enabled upon request for Recombee Premium customers.

_This Logic is not available in new databases by default. Please contact [support@recombee.com](mailto:support@recombee.com) if you want to use it._

---

Applicable to endpoints

[Search Items](/api#request-search-items)

---

##### Parameters

allowEmptyQueryFallback

Boolean

Default: **true**

Controls the behavior of the Logic when the `searchQuery` is empty. If set to _true_, the Logic returns personalized recommendations in case of an empty search query If set to _false_, an empty result list is returned instead.

### E-commerce

Models specifically tuned for E-Commerce use-cases.

#### ecommerce:homepage

Model ensemble suitable for recommending products on homepage/welcome page in E-Commerce and online retail systems.

See the [Scenario Recipe](https://docs.recombee.com/recipes/e-commerce/fully-personalized-homepage/for-you-sections) guide for more information.

---

Applicable to endpoints

[Recommend Items to User](/api#request-recommend-items-to-user)·

[Recommend Items to Item Segment](/api#request-recommend-items-to-item-segment)

#### ecommerce:similar-products

Model ensemble suitable for recommending similar products (alternatives) to a source (currently viewed) product.

See the [Scenario Recipe](https://docs.recombee.com/recipes/e-commerce/product-detail/alternative-products-and-upsell) guide for more information.

---

Applicable to endpoints

[Recommend Items to Item](/api#request-recommend-items-to-item)

#### ecommerce:cross-sell

Model ensemble suitable for recommending compatible/complementary products. In user-based case, the products are compatible with those that the user has already put to the shopping cart. In item-based case, they are compatible with the source (currently viewed) item.

See the Scenario Recipe guides for the [product detail](https://docs.recombee.com/recipes/e-commerce/product-detail/bought-together-and-accessories) and [cart](https://docs.recombee.com/recipes/e-commerce/cart) use cases.

---

Applicable to endpoints

[Recommend Items to User](/api#request-recommend-items-to-user)·

[Recommend Items to Item](/api#request-recommend-items-to-item)·

[Recommend Users to Item](/api#request-recommend-users-to-item)

---

Requirements

Purchases must be present for the item/user.

#### ecommerce:bestseller

Model suitable for recommending globally most purchased items.

See the [Scenario Recipe](https://docs.recombee.com/recipes/e-commerce/fully-personalized-homepage/bestsellers) guide for more information.

---

Applicable to endpoints

[Recommend Items to Item](/api#request-recommend-items-to-item)·

[Recommend Items to User](/api#request-recommend-items-to-user)

---

Requirements

Purchases must be present in the database.

#### ecommerce:similarly-purchasing

Recommends users with similar purchasing behavior as the source user.

---

Applicable to endpoints

[Recommend Users to User](/api#request-recommend-users-to-user)

---

Requirements

Purchases must be present for the user.

#### ecommerce:products-from-top-category-for-you

This Composite Logic provides personalized product recommendations within a single response, tailored to the user's shopping preferences:

* **Top Category for the User**: It identifies and returns the most relevant product category for the user, based on their interaction history such as views, purchases, or cart additions.
* **Top Products from the Category**: Along with the top category, it also returns a list of the top products within that category.

This logic is ideal for scenarios where you want to recommend both a product category and its associated products, making it particularly useful for personalized sections on e-commerce homepages.

If you want to display multiple rows for distinct top categories in a personalized order, you can achieve this by making multiple Composite Recommendation requests within a single Batch call.

It is expected that the Item Segmentation selected in the configuration represents the product categories relevant to your e-commerce platform.

See the [Scenario Recipe](https://docs.recombee.com/recipes/e-commerce/fully-personalized-homepage/personalized-re-ordering-of-sections-advanced) guide for more information.

---

Applicable to endpoints

[Composite Recommendation](/api#composite-recommendation)

---

##### Composite Stages

For

Recommendation

Source

Result

User

Item Segment

Items

Source

Endpoint:   **Item Segments to User**

The Logic returns the most relevant product category for the user.

---

Result

Endpoint:   **Items to Item Segment**

The Logic returns the list of the top products in the category.

#### ecommerce:products-from-top-segment-for-you

This Composite Logic delivers personalized product recommendations in a single response:

* **Top Segment for the User**: It identifies and returns the most relevant Segment for the user. Depending on the selected Item Segmentation, this Segment could be a Brand, Tag, or other attributes.
* **Top Products from the Segment**: Along with the top Segment, it also returns a list of the top products associated with that Segment.

This Logic is ideal for recommending both a Segment, such as a brand, and its associated products. For example, it can be used to recommend "Top Products from Your Favorite Brand …" This makes it particularly useful for personalized sections on e-commerce homepages.

If you want to display multiple rows for distinct top Segments (e.g., different brands or tags), you can achieve this by making multiple Composite Recommendation requests within a single Batch call.

It is expected that the Item Segmentation selected in the configuration represents Segments like brands, tags, or other key attributes relevant to your e-commerce platform.

---

Applicable to endpoints

[Composite Recommendation](/api#composite-recommendation)

---

##### Composite Stages

For

Recommendation

Source

Result

User

Item Segment

Items

Source

Endpoint:   **Item Segments to User**

The Logic returns the most relevant product category for the user.

---

Result

Endpoint:   **Items to Item Segment**

The Logic returns the list of the top products in the category.

#### ecommerce:because-you-purchased

This Composite Logic provides personalized product recommendations based on the user's past purchases, all within a single response:

* **Product the User Purchased**: It identifies and returns a product that the user has previously purchased.
* **Top Complementary Products**: Along with the purchased product, it returns a list of complementary products, such as accessories or related items that pair well with the original purchase.

This Logic is ideal for scenarios like "Because You Purchased …," where recommendations are tailored to the user's purchasing history and focus on products that complement what the user has already bought.

---

Applicable to endpoints

[Composite Recommendation](/api#composite-recommendation)

---

##### Composite Stages

For

Recommendation

Source

Result

User

Item

Items

Source

Endpoint:   **Items to User**

The Logic selects and returns a product that the user has recently purchased.

##### Parameters

maxDaysAgo

Integer

Default: **90**

Defines the maximum number of days since the user purchased the item for it to be considered for the "Because" selection.

For example, setting maxDaysAgo to 14 will only consider items purchased within the last 14 days.

---

Result

Endpoint:   **Items to Item**

The Logic returns a list of complementary products to a specific item, offering those the user is likely to be interested in.

### Video

Set of fine-tuned Video logics, specifically designed for VOD and similar use cases.

#### video:continue-watching

Model ensemble suitable for recommending partially watched movies or episodes, or the next episode from a watched series.

See the [Scenario Recipe](https://docs.recombee.com/recipes/video/fully-personalized-homepage/continue-watching) guide for more information.

_This Logic is not available in new databases by default. Please contact [support@recombee.com](mailto:support@recombee.com) if you want to use it._

---

Applicable to endpoints

[Recommend Items to User](/api#request-recommend-items-to-user)

---

##### Parameters

watchingStartedPercentage

Integer

Default: **10**

Percentage of an asset length for it to be considered as being watched.

---

watchingCompletedPercentage

Integer

Default: **90**

Percentage of an asset length for it to be considered as completely watched.

---

assetType

Enum

Default: **movies+episodes**

Allowed Values: **movies |** **episodes |** **movies+episodes** 

Asset type to be recommended.

#### video:personal

Model ensemble suitable for recommending personalized rows on the homepage or browse pages.

Rows with specific content (e.g. award-winning movies) can be set up by applying filters.

See the [Scenario Recipe](https://docs.recombee.com/recipes/video/fully-personalized-homepage/recommended-for-you-rows) guide for more information.

_This Logic is not available in new databases by default. Please contact [support@recombee.com](mailto:support@recombee.com) if you want to use it._

---

Applicable to endpoints

[Recommend Items to User](/api#request-recommend-items-to-user)·

[Recommend Items to Item Segment](/api#request-recommend-items-to-item-segment)

---

##### Parameters

assetType

Enum

Default: **movies+episodes**

Allowed Values: **movies |** **episodes |** **series |** **movies+episodes |** **movies+series** 

Asset type to be recommended.

---

excludeAlreadyWatched

Boolean

Default: **true**

Exclude already watched assets.

#### video:segments-for-you

Model ensemble suitable for recommending favorite segments (genres, actors, ...) for a specific user.

A particular segmentation must exist beforehand.

See the [Scenario Recipe](https://docs.recombee.com/recipes/video/fully-personalized-homepage/actors-for-you) guide for more information.

_This Logic is not available in new databases by default. Please contact [support@recombee.com](mailto:support@recombee.com) if you want to use it._

---

Applicable to endpoints

[Recommend Item Segments to User](/api#request-recommend-item-segments-to-user)

#### video:popular

Model ensemble suitable for recommending globally popular items.

See the [Scenario Recipe](https://docs.recombee.com/recipes/video/fully-personalized-homepage/popular-and-trending) guide for more information.

_This Logic is not available in new databases by default. Please contact [support@recombee.com](mailto:support@recombee.com) if you want to use it._

---

Applicable to endpoints

[Recommend Items to User](/api#request-recommend-items-to-user)·

[Recommend Items to Item Segment](/api#request-recommend-items-to-item-segment)

---

##### Parameters

timePeriod

Duration

Default: **14d** 

The time period in which the popularity is measured.

---

userSegmentFilter

String

Default: **true**

[ReQL filter](https://docs.recombee.com/reql_filtering_and_boosting#reql-filtering) on top of user properties defining the segment of users among whom the popularity is calculated. For example, when user properties like `profession` and `country` are provided for some users, you may only ask for items popular among software developers in US and Canada: `'profession'=="software developer" and 'country' in {"US", "CA"}`.

---

assetType

Enum

Default: **movies+episodes**

Allowed Values: **movies |** **episodes |** **series |** **movies+episodes |** **movies+series** 

Asset type to be recommended.

---

excludeAlreadyWatched

Boolean

Default: **false**

Exclude already watched assets.

#### video:editors-picks

Model ensemble suitable for recommendations of hand-picked editorial content.

See the [Scenario Recipe](https://docs.recombee.com/recipes/video/fully-personalized-homepage/editors-picks-for-you) guide for more information.

_This Logic is not available in new databases by default. Please contact [support@recombee.com](mailto:support@recombee.com) if you want to use it._

---

Applicable to endpoints

[Recommend Items to User](/api#request-recommend-items-to-user)

---

##### Parameters

picks

Item IDs Array

Default: **\[\]**

List of items to be recommended.

---

excludeAlreadyWatched

Boolean

Default: **false**

Exclude already watched assets.

---

personalizedReordering

Boolean

Default: **true**

Reorder picked assets in a personalized way for the user.

#### video:more-like-this

Model ensemble suitable for recommending similar assets on the asset detail page.

See the [Scenario Recipe](https://docs.recombee.com/recipes/video/asset-detail-and-player/more-like-this) guide for more information.

_This Logic is not available in new databases by default. Please contact [support@recombee.com](mailto:support@recombee.com) if you want to use it._

---

Applicable to endpoints

[Recommend Items to Item](/api#request-recommend-items-to-item)

---

##### Parameters

assetType

Enum

Default: **movies+episodes**

Allowed Values: **movies |** **episodes |** **series |** **movies+episodes |** **movies+series** 

Asset type to be recommended.

---

excludeAlreadyWatched

Boolean

Default: **false**

Exclude already watched assets.

#### video:watch-next

Model ensemble suitable for end-of-playback recommendations embedded in a video player.

See the [Scenario Recipe](https://docs.recombee.com/recipes/video/asset-detail-and-player/watch-next) guide for more information.

_This Logic is not available in new databases by default. Please contact [support@recombee.com](mailto:support@recombee.com) if you want to use it._

---

Applicable to endpoints

[Recommend Items to Item](/api#request-recommend-items-to-item)

---

##### Parameters

assetType

Enum

Default: **movies+episodes**

Allowed Values: **episodes |** **movies |** **series |** **movies+episodes |** **movies+series** 

Asset type to be recommended.

---

excludeAlreadyWatched

Boolean

Default: **false**

Exclude already watched assets.

#### video:episodes-list

Model ensemble suitable for reverse-chronological listing episodes of a particular series.

_This Logic is not available in new databases by default. Please contact [support@recombee.com](mailto:support@recombee.com) if you want to use it._

---

Applicable to endpoints

[Recommend Items to Item](/api#request-recommend-items-to-item)

---

##### Parameters

excludeAlreadyWatched

Boolean

Default: **false**

Exclude already watched assets.

#### video:search

Smart personalized full-text search suitable for searching movies, series, and episodes.

See the [Scenario Recipe](https://docs.recombee.com/recipes/video/search-movies-and-series) guide for more information.

_This Logic is not available in new databases by default. Please contact [support@recombee.com](mailto:support@recombee.com) if you want to use it._

---

Applicable to endpoints

[Search Items](/api#request-search-items)

---

##### Parameters

assetType

Enum

Default: **movies+episodes**

Allowed Values: **movies |** **episodes |** **series |** **movies+episodes |** **movies+series** 

Asset type to be recommended.

---

personalizationImpact

Enum

Default: **medium**

Allowed Values: **low |** **medium |** **high** 

Determines whether personalization or full-text should have a higher priority in the ranking of the items.

#### video:search-segments

Smart personalized full-text search suitable for searching segments (genres, actors, ...).

A particular segmentation must exist beforehand.

_This Logic is not available in new databases by default. Please contact [support@recombee.com](mailto:support@recombee.com) if you want to use it._

---

Applicable to endpoints

[Search Item Segments](/api#request-search-item-segments)

#### video:emailing

Model ensemble suitable for sending personalized emails with personalized content for the user. It contains fine-tuned rotation settings so that the set of recommended assets for a particular user changes with each e-mail sent.

See the [Scenario Recipe](https://docs.recombee.com/recipes/video/search-movies-and-series) guide for more information.

_This Logic is not available in new databases by default. Please contact [support@recombee.com](mailto:support@recombee.com) if you want to use it._

---

Applicable to endpoints

[Recommend Items to User](/api#request-recommend-items-to-user)

---

##### Parameters

assetType

Enum

Default: **movies+episodes**

Allowed Values: **movies |** **episodes |** **series |** **movies+episodes |** **movies+series** 

Asset type to be recommended.

---

rotationPolicy

Enum

Default: **smart**

Allowed Values: **smart |** **total** 

A policy determining how strictly should already recommended items be rotated.

The default option "smart" contains fine-tuned rotation settings, which take into account the position of recommended items and enable some of the items to re-appear in further e-mails.

Option "total" never recommends items that have already appeared in previous e-mails.

#### video:videos-from-top-genre-for-you

This Composite Logic delivers a comprehensive recommendation in a single response consisting of:

* **Top Genre for the User**: It identifies and returns the most relevant genre or category for the user, based on their viewing history and preferences.
* **Top Videos from the Genre**: Along with the top genre, it also returns a list of the top videos within that genre or category.

This Logic is ideal for recommending both a genre and its associated videos together, making it particularly useful for personalized sections on the homepages of video streaming platforms.

If you wish to display multiple rows for distinct top genres in a personalized order, you can achieve this by making multiple Composite Recommendation requests within a single Batch call.

It is expected that the Item Segmentation selected in the configuration represents the genres or categories of the videos.

See the [Scenario Recipe](https://docs.recombee.com/recipes/video/fully-personalized-homepage/personalized-re-ordering-of-rows-advanced) guide for more information.

_This Logic is not available in new databases by default. Please contact [support@recombee.com](mailto:support@recombee.com) if you want to use it._

---

Applicable to endpoints

[Composite Recommendation](/api#composite-recommendation)

---

##### Composite Stages

For

Recommendation

Source

Result

User

Item Segment

Items

Source

Endpoint:   **Item Segments to User**

The Logic returns the most relevant genre for the user.

---

Result

Endpoint:   **Items to Item Segment**

The Logic returns the list of the top items within the top genre.

#### video:videos-from-top-segment-for-you

This Composite Logic delivers a comprehensive recommendation in a single response consisting of:

* **Top Segment for the User**: It identifies and returns the most relevant Segment for the user. Depending on the selected Item Segmentation, this could be a Director, Theme, Tag, Actor, etc.
* **Top Videos from the Segment**: Along with the top Segment, it also returns a list of the top videos associated with that Segment.

Based on the selected Item Segmentation, this Logic can be used for rows such as “Your Favorite Director … And Their Movies” or “Videos About Your Favorite Topic …”.

If you wish to display multiple rows for distinct top Segments in a personalized order, you can achieve this by making multiple Composite Recommendation requests within a single Batch call.

_This Logic is not available in new databases by default. Please contact [support@recombee.com](mailto:support@recombee.com) if you want to use it._

---

Applicable to endpoints

[Composite Recommendation](/api#composite-recommendation)

---

##### Composite Stages

For

Recommendation

Source

Result

User

Item Segment

Items

Source

Endpoint:   **Item Segments to User**

The Logic returns the most relevant Item Segment (e.g., the top Director, Theme, Tag, Actor, etc) for the user from the specified Segmentation.

---

Result

Endpoint:   **Items to Item Segment**

The Logic returns the list of the top videos within the top Segment.

#### video:because-you-watched

This Composite Logic delivers personalized recommendations based on a user's previous watching activity, all within a single response consisting of:

* **Video the User Watched**: It selects and returns a video that the user has recently watched.
* **Top Related Videos**: Along with the watched video, it also returns a list of top videos related to that specific video, offering content the user is likely to be interested in.

This Logic is ideal for scenarios like “Because You Watched …,” where recommendations are tailored to the user’s recent watching history.

The watched video is determined based on View Portion interactions, and you can refine this by specifying the maxDaysAgo and minWatchedPercentage parameters to define which View Portions are considered. If no such View Portion exists, an empty recommendation is returned.

If you want to display multiple sets of related videos based on different watched content, you can achieve this by making multiple Composite Recommendation requests within a single Batch call.

See the [Scenario Recipe](https://docs.recombee.com/recipes/video/fully-personalized-homepage/because-you-watched) guide for more information.

_This Logic is not available in new databases by default. Please contact [support@recombee.com](mailto:support@recombee.com) if you want to use it._

---

Applicable to endpoints

[Composite Recommendation](/api#composite-recommendation)

---

##### Composite Stages

For

Recommendation

Source

Result

User

Item

Items

Source

Endpoint:   **Items to User**

The Logic selects and returns a video that the user has recently watched.

##### Parameters

maxDaysAgo

Integer

Default: **30**

Defines the maximum number of days since the user watched a video for it to be considered for the "Because" selection.

For example, setting maxDaysAgo to 7 will only consider videos watched within the last 7 days.

---

minWatchedPercentage

Integer

Default: **75**

Defines the minimum portion of a video that must be watched, based on the View Portion interaction, for it to be considered watched by the user (e.g. 75% by default).

This ensures that only videos where the user has engaged with at least the specified portion are included in the "Because" selection.

---

Result

Endpoint:   **Items to Item**

The Logic returns a list of top videos related to a specific video, offering content the user is likely to be interested in.

### News

Set of fine-tuned News Logics, specifically crafted to enhance recommendation experiences for news platforms, ensuring relevance and timeliness.

#### news:daily-news

Model ensemble optimized for high-visibility placements.

It ensures users stay connected to the most significant news stories while maintaining a personalized experience based on their past behavior.

It caters to frequent visitors by consistently offering fresh, relevant content.

See the [Scenario Recipe](https://docs.recombee.com/recipes/news/homepage/top-stories) guide for more information.

---

Applicable to endpoints

[Recommend Items to User](/api#request-recommend-items-to-user)

---

##### Parameters

editorsPicks

Item IDs Array

Default: **\[\]**

A selection of editorially chosen items that are prepended to the recommended content list, ensuring these highlighted items are seen first by the user.

---

publishedTimestamp

Property

Default: **None**

Property indicating the publication date of articles, used to assess content freshness.

#### news:personal

Model ensemble providing individualized content suggestions, carefully selecting the best choices from the catalog to match each user's specific interests.

It is particularly suitable for the _For You_ scenarios, where personalized recommendations are essential.

---

Applicable to endpoints

[Recommend Items to User](/api#request-recommend-items-to-user)·

[Recommend Items to Item](/api#request-recommend-items-to-item)·

[Recommend Items to Item Segment](/api#request-recommend-items-to-item-segment)

#### news:read-next

Model ensemble recommending personalized articles most likely to engage users after they finish reading the current article.

It considers the content of the current article and analyzes both recent and long-term user behavior to encourage continued reading and extend visit duration.

Suitable for _Continue Reading_ or _You Might Also Like_ scenarios.

See the [Scenario Recipe](https://docs.recombee.com/recipes/news/article/read-next) guide for more information.

---

Applicable to endpoints

[Recommend Items to Item](/api#request-recommend-items-to-item)

#### news:trending

Model ensemble recommending news articles that are currently trending, providing users with content that is gaining widespread interest and should not be missed.

Suitable for the _Trending Articles_ scenario.

---

Applicable to endpoints

[Recommend Items to User](/api#request-recommend-items-to-user)·

[Recommend Items to Item](/api#request-recommend-items-to-item)·

[Recommend Items to Item Segment](/api#request-recommend-items-to-item-segment)

---

##### Parameters

excludeAlreadyRead

Boolean

Default: **true**

Excludes articles the user has already read.

#### news:popular

Model ensemble recommending articles that are highly popular within a specified time period.

It is ideal for _Popular Articles_ scenario, allowing users to see what others find interesting.

---

Applicable to endpoints

[Recommend Items to User](/api#request-recommend-items-to-user)·

[Recommend Items to Item](/api#request-recommend-items-to-item)·

[Recommend Items to Item Segment](/api#request-recommend-items-to-item-segment)

---

##### Parameters

excludeAlreadyRead

Boolean

Default: **true**

Excludes articles the user has already read.

---

timePeriod

Duration

Default: **14d** 

The time frame used to measure item popularity.

#### news:recent

Model ensemble showcasing the most recently published articles, ensuring users stay updated with the latest content.

Suitable for the _Latest News_ scenario.

See the [Scenario Recipe](https://docs.recombee.com/recipes/news/homepage/latest-news) guide for more information.

---

Applicable to endpoints

[Recommend Items to User](/api#request-recommend-items-to-user)·

[Recommend Items to Item Segment](/api#request-recommend-items-to-item-segment)

---

##### Parameters

excludeAlreadyRead

Boolean

Default: **true**

Excludes articles the user has already read.

---

publishedTimestamp

Property

Default: **None**

Property indicating the publication date of articles, used to assess content freshness.

#### news:related

Model ensemble recommending articles that are related to the current article, providing users with a seamless continuation of their reading experience on a given topic.

Suitable for the _Related Articles_ scenario.

---

Applicable to endpoints

[Recommend Items to Item](/api#request-recommend-items-to-item)

---

##### Parameters

excludeAlreadyRead

Boolean

Default: **true**

Excludes articles the user has already read.

#### news:categories-for-you

Model ensemble recommending categories relevant to the user based on their previously read articles.

Suitable, for example, for personalized re-ordering of sections on the homepage.

Assumes the scenario is configured with an Item Segmentation representing article categories.

---

Applicable to endpoints

[Recommend Item Segments to User](/api#request-recommend-item-segments-to-user)

#### news:editors-picks

Model ensemble suitable for recommendations of hand-picked editorial content.

See the [Scenario Recipe](https://docs.recombee.com/recipes/news/homepage/personalized-editors-picks) guide for more information.

---

Applicable to endpoints

[Recommend Items to User](/api#request-recommend-items-to-user)

---

##### Parameters

picks

Item IDs Array

Default: **\[\]**

List of items to be recommended.

---

excludeAlreadyRead

Boolean

Default: **false**

Exclude already read articles.

---

personalizedReordering

Boolean

Default: **true**

Reorder picked articles in a personalized way for the user.

#### news:emailing

The `news:emailing` Logic is designed to provide a personalized selection of articles for email newsletters.

This Logic combines:

* Personalized recommendations based on the user's reading history and preferences.
* Key unread articles to ensure the user stays informed about the most important news they haven’t seen yet.

To maintain content freshness, it is advisable to apply a Filter that limits the selection to recently published articles, depending on the email frequency. For example, for a daily digest, you can filter for articles published within the last 24 hours.

See the [Scenario Recipe](https://docs.recombee.com/recipes/news/personalized-emailing) guide for more information.

---

Applicable to endpoints

[Recommend Items to User](/api#request-recommend-items-to-user)

---

##### Parameters

editorsPicks

Item IDs Array

Default: **\[\]**

A selection of editorially chosen items that are prepended to the recommended content list, ensuring these highlighted items are seen first by the user.

#### news:articles-from-top-category-for-you

This Composite Logic provides a comprehensive recommendation in a single response consisting of:

* **Top Segment for the User**: It identifies and returns the most relevant Item Segment (e.g., the top category) for the user from the specified Segmentation.
* **Top Items from the Segment**: Along with the Segment, it also returns a list of the top items within that Segment.

This Logic is ideal for recommending a section and its content together, making it particularly useful for personalized homepage sections.

If you want to display multiple distinct sections in a personalized order on your homepage, you can achieve this by making multiple Composite Recommendation requests within a single Batch call.

For more specific use cases, such as "Videos From The Top Genre For You" or "Products from the Top Category For You," there are specialized Logics available.

See the [Scenario Recipe](https://docs.recombee.com/recipes/news/homepage/personalized-sections-with-reordering) guide for more information.

---

Applicable to endpoints

[Composite Recommendation](/api#composite-recommendation)

---

##### Composite Stages

For

Recommendation

Source

Result

User

Item Segment

Items

Source

Endpoint:   **Item Segments to User**

The Logic returns the most relevant Item Segment (e.g., the top category) for the user from the specified Segmentation.

---

Result

Endpoint:   **Items to Item Segment**

The Logic returns the list of the top items within the top Segment.

#### news:articles-from-top-segment-for-you

This Composite Logic delivers personalized news article recommendations in a single response:

* **Top Segment for the User**: It identifies and returns the most relevant Segment for the user. Depending on the selected Item Segmentation, this Segment could be based on attributes such as authors or tags.
* **Top Articles from the Segment**: Along with the top Segment, it returns a list of the top articles associated with that Segment.

This Logic is ideal for recommending both a Segment (e.g., a favorite author or popular tag) and its associated articles. For example, it can be used for scenarios like "Top Articles from Your Favorite Author".

If you wish to display multiple distinct Segments in a personalized order, you can achieve this by making multiple Composite Recommendation requests within a single Batch call.

---

Applicable to endpoints

[Composite Recommendation](/api#composite-recommendation)

---

##### Composite Stages

For

Recommendation

Source

Result

User

Item Segment

Items

Source

Endpoint:   **Item Segments to User**

The Logic returns the most relevant Item Segment (e.g., the top category) for the user from the specified Segmentation.

---

Result

Endpoint:   **Items to Item Segment**

The Logic returns the list of the top items within the top Segment.

#### news:because-you-read

This Composite Logic delivers personalized news article recommendations based on the user's previous reading activity, all within a single response:

* **Article the User Read**: It selects and returns an article that the user has previously read.
* **Top Related Articles**: Along with the read article, it returns a list of top related articles focused on the same or similar topics, offering follow-up content or deeper insights into the subject the user has already shown interest in.

This Logic is ideal for scenarios like “Because You Read …,” where recommendations are tailored to the user’s reading history. It can recommend follow-up articles, related pieces, or additional articles on similar subjects.

---

Applicable to endpoints

[Composite Recommendation](/api#composite-recommendation)

---

##### Composite Stages

For

Recommendation

Source

Result

User

Item

Items

Source

Endpoint:   **Items to User**

The Logic selects and returns an article that the user has previously read.

##### Parameters

maxDaysAgo

Integer

Default: **7**

Defines the maximum number of days since the user purchased the item for it to be considered for the "Because" selection.

For example, setting maxDaysAgo to 14 will only consider items purchased within the last 14 days.

---

Result

Endpoint:   **Items to Item**

The Logic returns a list of top related articles focused on the same or similar topics, offering follow-up content or deeper insights into the subject the user has already shown interest in

#### news:search

Smart full-text search for news articles, with configurable freshness, trendingness, and personalization sliders.

---

Applicable to endpoints

[Search Items](/api#request-search-items)

---

##### Parameters

allowEmptyQueryFallback

Boolean

Default: **true**

Controls the behavior of the Logic when the `searchQuery` is empty. If set to _true_, the Logic returns personalized recommendations in case of an empty search query. If set to _false_, an empty result list is returned instead.

---

freshnessDateProperty

Property

Default: **None**

Name of the item property that stores the article publication date, used for freshness scoring.

---

freshnessWeight

Double

Default: **0.5**

Controls how much freshness affects the final ranking.

---

trendingnessPeriod

Duration

Default: **1d** 

Time window from which interaction data is used to compute trendingness.

---

trendingnessWeight

Double

Default: **0.3**

Controls how much trendingness affects the final ranking.

---

personalizationWeight

Double

Default: **0.2**

Controls how much personalization affects the final ranking.

### Classified Advertising

Models tailored for classified advertising (real estate, automotive, electronics, services, etc.).

#### classifieds:homepage

Model ensemble suitable for recommending products on homepage/welcome page of a Classified advertising site.

---

Applicable to endpoints

[Recommend Items to User](/api#request-recommend-items-to-user)

#### classifieds:personal

Model ensemble suitable for recommending picked ads right for the given user. Can be used on different places, such as in-category recommendation when augmented with appropriate [ReQL filter](https://docs.recombee.com/reql_filtering_and_boosting#reql-filtering).

---

Applicable to endpoints

[Recommend Items to User](/api#request-recommend-items-to-user)

#### classifieds:similar-ads

Model ensemble suitable for recommending ads that are similar to the one which is currently viewed.

---

Applicable to endpoints

[Recommend Items to Item](/api#request-recommend-items-to-item)

**Table of contents**

* [Setting logic in the Admin UI](#setting-logic-in-the-admin-ui)
* [Universal Models](#universal-models)  
   * [recombee:default](#recombee-default)  
   * [recombee:homepage](#recombee-homepage)  
   * [recombee:personal](#recombee-personal)  
   * [recombee:similar](#recombee-similar)  
   * [recombee:popular](#recombee-popular)  
   * [recombee:popular-segments](#recombee-popular-segments)  
   * [recombee:recently-viewed](#recombee-recently-viewed)  
   * [recombee:visually-similar](#recombee-visually-similar)  
   * [recombee:similar-properties](#recombee-similar-properties)  
   * [recombee:emailing](#recombee-emailing)  
   * [recombee:custom-sort](#recombee-custom-sort)  
   * [recombee:related-to-segment](#recombee-related-to-segment)  
   * [recombee:personal-from-segment](#recombee-personal-from-segment)  
   * [recombee:popular-from-segment](#recombee-popular-from-segment)  
   * [recombee:items-from-top-segment-for-you](#recombee-items-from-top-segment-for-you)  
   * [recombee:because-you-interacted](#recombee-because-you-interacted)  
   * [recombee:swiping-feed](#recombee-swiping-feed)
* [Search](#search)  
   * [search:personalized](#search-personalized)  
   * [search:non-personalized](#search-non-personalized)  
   * [search:semantic](#search-semantic)
* [E-commerce](#e-commerce)  
   * [ecommerce:homepage](#ecommerce-homepage)  
   * [ecommerce:similar-products](#ecommerce-similar-products)  
   * [ecommerce:cross-sell](#ecommerce-cross-sell)  
   * [ecommerce:bestseller](#ecommerce-bestseller)  
   * [ecommerce:similarly-purchasing](#ecommerce-similarly-purchasing)  
   * [ecommerce:products-from-top-category-for-you](#ecommerce-products-from-top-category-for-you)  
   * [ecommerce:products-from-top-segment-for-you](#ecommerce-products-from-top-segment-for-you)  
   * [ecommerce:because-you-purchased](#ecommerce-because-you-purchased)
* [Video](#video)  
   * [video:continue-watching](#video-continue-watching)  
   * [video:personal](#video-personal)  
   * [video:segments-for-you](#video-segments-for-you)  
   * [video:popular](#video-popular)  
   * [video:editors-picks](#video-editors-picks)  
   * [video:more-like-this](#video-more-like-this)  
   * [video:watch-next](#video-watch-next)  
   * [video:episodes-list](#video-episodes-list)  
   * [video:search](#video-search)  
   * [video:search-segments](#video-search-segments)  
   * [video:emailing](#video-emailing)  
   * [video:videos-from-top-genre-for-you](#video-videos-from-top-genre-for-you)  
   * [video:videos-from-top-segment-for-you](#video-videos-from-top-segment-for-you)  
   * [video:because-you-watched](#video-because-you-watched)
* [News](#news)  
   * [news:daily-news](#news-daily-news)  
   * [news:personal](#news-personal)  
   * [news:read-next](#news-read-next)  
   * [news:trending](#news-trending)  
   * [news:popular](#news-popular)  
   * [news:recent](#news-recent)  
   * [news:related](#news-related)  
   * [news:categories-for-you](#news-categories-for-you)  
   * [news:editors-picks](#news-editors-picks)  
   * [news:emailing](#news-emailing)  
   * [news:articles-from-top-category-for-you](#news-articles-from-top-category-for-you)  
   * [news:articles-from-top-segment-for-you](#news-articles-from-top-segment-for-you)  
   * [news:because-you-read](#news-because-you-read)  
   * [news:search](#news-search)
* [Classified Advertising](#classified-advertising)  
   * [classifieds:homepage](#classifieds-homepage)  
   * [classifieds:personal](#classifieds-personal)  
   * [classifieds:similar-ads](#classifieds-similar-ads)
* [Setting logic using API parameter](#recommendation-logics-set-via-api)

## Setting Logic Using API Parameter

To specify the logic for individual recommendation requests, pass its name (e.g., `ecommerce:homepage`) to the `logic` parameter.

```js
const result = await client.send(
    new recombee.RecommendItemsToUser(
        'user-x', 10,
	    {
		    logic: 'ecommerce:homepage'
	    }
    )
);
```

Most logics include sensible default parameters, but you can customize them to suit your specific needs.

The example below uses a placeholder logic named `example:logic-parameters` to demonstrate how to set various types of parameters.

Note that this logic is just an example and does not exist in the system. The parameter names and values are also for demonstration purposes only. Please refer to the documentation of the specific logic you intend to use for the correct parameter names and expected values.

```js
const result = await client.send(new recombee.RecommendItemsToUser('user-x', 10,
	{
		logic: {
			name: 'example:logic-parameters',
			settings: {
                // basic types
                boolean: true,
                double: 3.14,
                int: 42,
                string: 'example',
                stringArray: ['value1', 'value2', 'value3'],
				
                // available keys: days, hours, minutes, seconds
                duration: { days: 3, hours: 12 },
               
                // one of possible values: e.g. 'ascending', 'descending'
                enum: 'ascending',

                // array of possible values, e.g. 'cartAdditions', 'purchases', 'views' (duplicates allowed)
                enumArray: ['cartAdditions', 'cartAdditions', 'purchases'],

                // set of possible values, e.g. 'cartAdditions', 'purchases', 'views' (duplicates not allowed)
                enumSet: ['cartAdditions'],

                // array of item IDs
                itemIdsArray: ['item1', 'item2', 'item3'],

                // name of the item segmentation
                itemSegmentation: 'segmentationName',

                // name of the item/user property
                property: 'category',

                // ReQL filter expression as a string
                reqlFilter: `'category' == "electronics"`,

                // 'since' and 'until' should be ISO 8601 format strings or Unix timestamps
                timeInterval: { since: '2024-01-01T00:00:00Z', until: '2024-12-31T23:59:59Z' },
			}
		}
	})
);
```