# Category Page

> Source: https://docs.recombee.com/recipes/e-commerce/category/reordering-of-category-products

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

**Table of contents**

* [Introduction](#introduction)
* [Scenario Setup](#scenario-setup)
* [Logic](#logic)
* [Filters](#filters)  
   * [Show Only Products from the Particular Category (Dynamic)](#show-only-products-from-the-particular-category-dynamic-)  
         * [String Property](#string-property)  
         * [Set of Categories](#set-of-categories)  
   * [Other Filters](#other-filters)
* [Requesting Recommendations](#requesting-recommendations)

# Category Page

![](/img/recipes/e-commerce/personalized-reordering-of-products.png) 

## Introduction

Optimize category pages by reordering products according to user preferences for a personalized experience.

If you show the category page as a faceted search, read more information in the [Faceted Search](/recipes/e-commerce/search/faceted-search) page.

## Scenario Setup

In the Recombee Admin UI, navigate to the **[Scenarios](/scenarios)** section and choose **Create Scenario**.

1. Enter a **Scenario ID**. Select a distinctive label for your recommendation scenario, such as _"category-listing"_
2. Choose **Recommendation type** \- _[Items to User](/api#recommend-items-to-user)_

![Admin UI - Scenario Setup](/img/recipes/e-commerce/personalized-reordering-of-products-create-scenario.png)

There are typically many products in a category and you want to offer the user more products as the user scrolls down.

Request the [Recommend Next Items endpoint](/api#recommend-next-items) to load subsequent products of interest.

## Logic

The [Logic](/recommendation_logics) defines the behavior of the recommendation engine.

* Choose the **[recombee:personal](/recommendation_logics#recombee-personal)** logic type from the **Universal Models**

This Logic offers the user products in personalized order. If the user does not have any interactions yet, the products are ordered by global popularity.

![Admin UI - Logic](/img/recipes/e-commerce/personalized-reordering-of-products-logic.png)

## Filters

### Show Only Products from the Particular Category (Dynamic)

Based on which category the user enters on the website, only products from the particular category shall be displayed.

As the selected category is dynamic, the category filter shall be sent in the [filter parameter](/api#recommend-items-to-user-param-filter) of the [API request](/api#recommend-items-to-user).

Based on how you model the category/categories in your catalog, the sent [ReQL expression](/reql) may look like:

##### String Property

ReQL

```
'category' == "<the particular category>"

'category' == "Mobile Phones" # example for Mobile Phones
```

##### Set of Categories

ReQL

```
"<the particular category>" in 'categories'

"Mobile Phones" in 'categories' # example for Mobile Phones

```

### Other Filters

Available Products (Global Settings)

You always want to recommend only the products that are in stock. Therefore you need to apply a [**Filter**](/scenarios#filters) rule to allow only such products.

As it would be tedious and prone to error to add this rule to all the Scenarios, this rule shall be added to the [**Global Settings**](/scenarios#global-settings), so it is always applied everywhere.

You can select a **predefined rule from the Recombee Library** to allow only the available products.

Depending on how you represent availability in the catalog, it can be **one of the following rules:**

* **Not deleted items** \- when you have a _deleted_ property (true/false)
* **Available items** \- when you have an _available_ property (true/false)
* **Items in stock \[Google Merchant\]** \- when you have a string _available_ property with _"in stock"_ as its value

![Admin UI - Global Settings - Filter](/img/recipes/e-commerce/filter.png)

## Requesting Recommendations

There are three ways to get recommendations.

1. **[No-Code Widget](/no-code-widgets)** \- create an _Infinite Feed_ No-Code Widget using the **visual editor in the Admin UI**.
2. **[Widget SDKs](/widget-sdks)** \- use the SDK for a [Carousel](/widget-sdks#carousel), [Grid](/widget-sdks#grid) or [Feed](/widget-sdks#feed) to display the recommendations in the design of your choice. Use the [Recommend Items to User endpoint](/api#recommend-items-to-user) when initializing the widget.
3. **[API SDK](/api_clients)** \- request the [Recommend Items to User endpoint](/api#recommend-items-to-user) of the Recombee API using an SDK of your choice.

In either case, you need to set the `filter` parameter to allow only items from the displayed category in the recommendations.