# E-commerce

> Source: https://docs.recombee.com/logics/e-commerce

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

# 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/recommendations#request-recommend-items-to-user)·

[Recommend Items to Item Segment](/api/recommendations#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/recommendations#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/recommendations#request-recommend-items-to-user)·

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

[Recommend Users to Item](/api/recommendations#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/recommendations#request-recommend-items-to-item)·

[Recommend Items to User](/api/recommendations#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/recommendations#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/recommendations#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/recommendations#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/recommendations#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.