> For the complete documentation index, see [llms.txt](https://docs.abtasty.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.abtasty.com/commerce/recommendations/create-a-recommentation-strategy.md).

# Create a recommentation strategy

A **Recommendation** strategy generates a dynamic product list from user behavior, context, or product relationships, and displays it at a specific location on the customer journey (homepage, category page, product page, and so on).&#x20;

{% hint style="info" %}
**What changed:** Recommendations come from the former **Recommendations & Merchandising** product and keep the same model. The builder has been refreshed, ranking blocks are now grouped into **Basics / Dynamic / Customizable**, and the former drag-and-drop "RANKING BLOCKS" / "CUSTOM RULES" panels are replaced by **New rule** and **Global customization**. Under the hood each strategy still carries a `RECO_ID` for API deployment.
{% endhint %}

## Creating a recommendation <a href="#creating-a-recommendation" id="creating-a-recommendation"></a>

### Create with AI <a href="#create-with-ai" id="create-with-ai"></a>

**Create with AI** lets you describe the strategy in natural language and have Commerce generate it.&#x20;

{% stepper %}
{% step %}

#### Click **Create with AI**

Click **Create with AI** to start the guided flow.
{% endstep %}

{% step %}

#### Enter a description

<figure><img src="/files/9P770UAGlUvYIFnPFzgk" alt=""><figcaption></figcaption></figure>

Enter a description and click **Generate** (the button stays disabled until you type a prompt. The generated strategy opens in the builder, where you can review and refine it.
{% endstep %}
{% endstepper %}

### Guided creation

{% stepper %}
{% step %}

#### **Create recommendation**&#x20;

Click **Create recommendation +** to start the guided flow.
{% endstep %}

{% step %}

#### Choose the location

The location matters because it determines which context variables (such as `categoryId` or `productId`) are available to your rules, and which presets are offered next.

<figure><img src="/files/BiyrVlHEKin7LmdMpKUm" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Pick a starting point

<figure><img src="/files/kDUA8N0B2qhBDAYL5t0w" alt=""><figcaption></figcaption></figure>

The next modal, **Pick a strategy to start from…**, offers:

* **Basics → Empty strategy**: start from scratch.
* **Recommended for \<location>**: placement-aware presets, for example:
  * **Best sellers**: push the products with the best number of sales over the last 7 / 14 / 30 days.
  * **Most consulted products**: the most viewed products over the last 7 / 14 / 30 days.

Picking a preset opens the builder pre-filled with a matching rule; **Empty strategy** opens an empty builder.
{% endstep %}

{% step %}

### Add Rules, Pins, and customizations

<figure><img src="/files/MdgYqvYXN0sQQTnccKM6" alt=""><figcaption></figcaption></figure>

The left **configuration panel** of the **stragey builder** is where you assemble the strategy. An empty strategy prompts you to *"Kick off your strategy by adding a first rule…"* with **New rule +**. The panel is organized into:

* **(Rules)**: one or more ranking blocks, each named **Rule #N**.
* **Pins** → **Pin product(s)**.
* **Global customization** → **New global customization (filter, exclude, sort…)**.
* **Display rules**: **Results maximum** and **Display threshold**.

The right panel, **Your strategy results**, renders a live preview of what the configuration returns
{% endstep %}

{% step %}

### Save and deploy

You can now save and deploy the strategy
{% endstep %}

{% step %}

### Performance reporting

To measure performance, open the **Recommendations Reporting** dashboard.

<figure><img src="/files/vKDNUg11ERbf0ftv4BEC" alt=""><figcaption></figcaption></figure>

Reporting (**Recommendations → Reporting**) tracks exposure and revenue impact, KPIs include "Part of the catalog displayed", "Visitor exposition rate", and "Exposed visitors click rate", with **Compare**, **Filters**, and sections for **Top products**, **Pinned products**, **Top categories**, **Top strategies**, and **Top brands**.
{% endstep %}
{% endstepper %}

## The strategy builder <a href="#ranking-blocks-new-rule" id="ranking-blocks-new-rule"></a>

#### Ranking blocks (New rule) <a href="#ranking-blocks-new-rule" id="ranking-blocks-new-rule"></a>

Click **New rule +** to add a ranking block, the main source of products for the rule. Blocks are grouped:

#### Basics <a href="#basics" id="basics"></a>

| Block                          | What it returns                                      |
| ------------------------------ | ---------------------------------------------------- |
| **Best sellers**               | Products that did the best sales over the last days. |
| **Most consulted products**    | Products most viewed over the last days.             |
| **Repurchase recommendations** | Products the user is likely to buy again.            |

#### Dynamic <a href="#dynamic" id="dynamic"></a>

| Block                                 | What it returns                                                                                                                         |
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| **Products associated to…**           | Products often bought together with another product.                                                                                    |
| **Products viewed together with…**    | Products often viewed together with another product.                                                                                    |
| **Products semantically similar to…** | Products alike in meaning (an *on-demand* block, when not yet activated it shows **Enable**, which opens the external enablement step). |
| **semantic**                          | A custom semantic rule.                                                                                                                 |

#### Customizable <a href="#customizable" id="customizable"></a>

| Block                      | What it returns                                     |
| -------------------------- | --------------------------------------------------- |
| **Products sorted by…**    | Products sorted by the catalog field you choose.    |
| **Products from variable** | Products supplied by a dynamic contextual variable. |

{% hint style="info" %}
The **Dynamic** blocks are powered by machine-learning algorithms. For how *Products associated to…*, *Products viewed together with…*, and *Products semantically similar to…* are computed (co-occurrence, TF-IDF, semantic similarity), see [Algorithms](https://file+.vscode-resource.vscode-cdn.net/Users/didier/repos/abtasty/commerce/docs/commerce/04-creating-strategies/recommendations/algorithms/). For the runtime inputs used by *Products from variable*, see [Dynamic contextual variables](https://file+.vscode-resource.vscode-cdn.net/Users/didier/repos/abtasty/commerce/docs/commerce/04-creating-strategies/recommendations/dynamic-contextual-variables/).
{% endhint %}

#### Pins <a href="#pins" id="pins"></a>

In the **Pins** section, **Pin product(s)** forces specific products into fixed positions at the top of *this* strategy.

{% hint style="info" %}
A **Pin** boosts products to the top of a single strategy. To promote or demote products *globally across every strategy*, use the dedicated [Boost & Bury](https://file+.vscode-resource.vscode-cdn.net/Users/didier/repos/abtasty/commerce/docs/commerce/03-creating-rules-boost-and-bury/) rules instead.
{% endhint %}

#### Global customization <a href="#global-customization" id="global-customization"></a>

![Global customization options: Filter, Exclude, Diversification, Shuffle, Sort by, Filter if.](https://file+.vscode-resource.vscode-cdn.net/Users/didier/repos/abtasty/commerce/docs/commerce/04-creating-strategies/recommendations/images/custom-rules.png)

The **Global customization** section adds rules that apply across the strategy. Use **New global customization (filter, exclude, sort…)** to add one of:

| Option              | What it does                                          |
| ------------------- | ----------------------------------------------------- |
| **Filter**          | Filter products based on dynamic, personalized rules. |
| **Exclude**         | Exclude specific products from the rule.              |
| **Diversification** | Reorganize products to optimize diversity.            |
| **Shuffle**         | Randomize the order of product results.               |
| **Sort by…**        | Reorganize results by sorting on a field.             |
| **Filter if…**      | Only include some products if a condition is met.     |

#### Display rules <a href="#display-rules" id="display-rules"></a>

| Setting               | Default | What it does                                                   |
| --------------------- | ------- | -------------------------------------------------------------- |
| **Results maximum**   | `12`    | Maximum number of products the strategy returns.               |
| **Display threshold** | `0`     | Minimum number of products required before the block is shown. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.abtasty.com/commerce/recommendations/create-a-recommentation-strategy.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
