> 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/recommendations-and-merchandising_deprecated/recommendations/recommendation-banner/how-to-build-recommendations-recommendation-builder-variant.md).

# How to build recommendations (recommendation builder variant)

The AB Tasty Recommendation Builder allows you to create tailored lists of items to recommend, using a combination of algorithms and transformations. This flexible system lets you define precisely how recommendations are generated and modified to meet your business needs.

![Image without caption](https://image-forwarder.notaku.so/aHR0cHM6Ly93d3cubm90aW9uLnNvL2ltYWdlL2h0dHBzJTNBJTJGJTJGcHJvZC1maWxlcy1zZWN1cmUuczMudXMtd2VzdC0yLmFtYXpvbmF3cy5jb20lMkZjZjFjZDNjZC02OWMzLTQ0ZTQtODg0YS0zMzM5NTllZTA3YmIlMkYyYzY1M2YwZi00MTA5LTQ1MmUtYWQzMC02MjA0NGMwOTZmNjQlMkZpbWFnZS5wbmc_dGFibGU9YmxvY2smc3BhY2VJZD1jZjFjZDNjZC02OWMzLTQ0ZTQtODg0YS0zMzM5NTllZTA3YmImaWQ9MTA1YTY5N2ItZTA2Yi04MGZhLWJkY2YtY2Q3ZTAyNWY3OTJmJmNhY2hlPXYyJndpZHRoPTI0MDA=)

## Recommendation Structure: <a href="#h_01jdpjx01n7za91vrpmge9erxq" id="h_01jdpjx01n7za91vrpmge9erxq"></a>

### A recommendation is composed of: <a href="#h_01jdpjx2f9zdc21t7ykqxa2q10" id="h_01jdpjx2f9zdc21t7ykqxa2q10"></a>

* **Algorithms**: Generate a list of items.
* **Transformations**: Modify the list generated by an algorithm.

### Drag-and-Drop Interface: <a href="#h_01jdpjxpc9bypt8ysxcbf72wdf" id="h_01jdpjxpc9bypt8ysxcbf72wdf"></a>

* Build your recommendation by dragging and dropping operations into drop zones.

## Drop Zones <a href="#h_01jdpjykf3d7pxtp3h9rz0ezsb" id="h_01jdpjykf3d7pxtp3h9rz0ezsb"></a>

### FOLLOWED BY Divider: <a href="#h_01jdpjyp70ssbv0vgdph243vw6" id="h_01jdpjyp70ssbv0vgdph243vw6"></a>

* Concatenates results from multiple algorithms, avoiding duplicates.

*Example: Combine products from two algorithms (e.g., "Most Popular" FOLLOWED BY "New Arrivals").*

### THEN Divider: <a href="#h_01jdpjywn8jvm36vknrg80mf4j" id="h_01jdpjywn8jvm36vknrg80mf4j"></a>

* Applies transformations to modify algorithm results.

*Example: Filter, shuffle, or sort the list.*

### THEN for Transformations: <a href="#h_01jdpjzddqcsceqc3h7r0vqjag" id="h_01jdpjzddqcsceqc3h7r0vqjag"></a>

* Allows multiple transformations in sequence, separated by THEN.

*Example Recommendation*\
*Scenario: Create a Multi-Source Recommendation*\
*Algorithms:*

*First 15 products from \[ALGO] User Reco.*\
*FOLLOWED BY 15 products from \[ALGO] Most Popular.*\
*Filters Applied to All Products:*

*Recommendable in newsletter = True.*\
*Marketplace = False.*\
*Accessory = False.*\
*Pickup in store = False.*

![Image without caption](https://image-forwarder.notaku.so/aHR0cHM6Ly93d3cubm90aW9uLnNvL2ltYWdlL2h0dHBzJTNBJTJGJTJGcHJvZC1maWxlcy1zZWN1cmUuczMudXMtd2VzdC0yLmFtYXpvbmF3cy5jb20lMkZjZjFjZDNjZC02OWMzLTQ0ZTQtODg0YS0zMzM5NTllZTA3YmIlMkY1YjNlNjJlNi05YmNkLTQyNzItOTcxZC1mNGRjMTYyM2Q1MjYlMkZpbWFnZS5wbmc_dGFibGU9YmxvY2smc3BhY2VJZD1jZjFjZDNjZC02OWMzLTQ0ZTQtODg0YS0zMzM5NTllZTA3YmImaWQ9MTA2YTY5N2ItZTA2Yi04MDNjLTkyNDUtZjA4NjY1OGE1NmM0JmNhY2hlPXYyJndpZHRoPTE0NDA=)

## Steps to Build a Recommendation <a href="#h_01jdpk0q6mzedrehxa9xze76ks" id="h_01jdpk0q6mzedrehxa9xze76ks"></a>

![Image without caption](https://image-forwarder.notaku.so/aHR0cHM6Ly93d3cubm90aW9uLnNvL2ltYWdlL2h0dHBzJTNBJTJGJTJGcHJvZC1maWxlcy1zZWN1cmUuczMudXMtd2VzdC0yLmFtYXpvbmF3cy5jb20lMkZjZjFjZDNjZC02OWMzLTQ0ZTQtODg0YS0zMzM5NTllZTA3YmIlMkY2YzQ1MzljNi1hNWYwLTQ3NjctYWI2MS0zZjdiNTNiMmYyYjQlMkZpbWFnZS5wbmc_dGFibGU9YmxvY2smc3BhY2VJZD1jZjFjZDNjZC02OWMzLTQ0ZTQtODg0YS0zMzM5NTllZTA3YmImaWQ9MTA2YTY5N2ItZTA2Yi04MDM2LWJjOGEtZmJmMjg0YjllZWQyJmNhY2hlPXYyJndpZHRoPTE0NDA=)

### Add an Algorithm: <a href="#h_01jdpk0sp961wgt5a07nzfv8hk" id="h_01jdpk0sp961wgt5a07nzfv8hk"></a>

* Select an algorithm and configure its settings.

### Transform Algorithm Results: <a href="#h_01jdpk14ena190fp2skjkr7jnj" id="h_01jdpk14ena190fp2skjkr7jnj"></a>

* Drop a transformation into the algorithm box (e.g., filter or shuffle).

### Add a FOLLOWED BY Divider: <a href="#h_01jdpk7ten9e8rysfbdjs2s4za" id="h_01jdpk7ten9e8rysfbdjs2s4za"></a>

* Drop a second algorithm after FOLLOWED BY to concatenate results (e.g., as a fallback algorithm).

### Apply Global Transformations: <a href="#h_01jdpk82ebh1qbjzdpa5340mff" id="h_01jdpk82ebh1qbjzdpa5340mff"></a>

* Add transformations after the THEN divider to modify the overall results.

### Add Exceptions: <a href="#h_01jdpk1h7db3j2bwefr3tway0s" id="h_01jdpk1h7db3j2bwefr3tway0s"></a>

Use the "+ Add Exception" button to apply alternate algorithms based on specific conditions.

## Preview Your Recommendation <a href="#h_01jdpk8sfxq5v46qrpay2ah1tt" id="h_01jdpk8sfxq5v46qrpay2ah1tt"></a>

Once your recommendation is built:

* **Preview Button:** Click to view results.
* **Modal Options:**
  * Set parameters.
  * Preview results as a table or list.
  * Inspect results for each algorithm.
  * Display additional details for each item.
  * Check API calls leading to the result.

## Operations <a href="#h_01jdpkbq6zxv7n054z3pva00js" id="h_01jdpkbq6zxv7n054z3pva00js"></a>

### Algorithms <a href="#h_01jdpkc4jjpdb1z1p1tdb08azx" id="h_01jdpkc4jjpdb1z1p1tdb08azx"></a>

* **Sorted Items:** *Example: Top 12 items by revenue over the last 30 days.*
* **Associated Items:** *Example: Items frequently purchased with the selected item.*
* **Similar Items:** *Example: Items often viewed with the selected item.*
* **Recommended Items:** *Reuse a saved recommendation.*
* **Handpicked Items:** *Add items manually or by importing item IDs.*
* **Used Items:** *Example: Last 12 items bought by a user (requires user data integration).*

## Transformations <a href="#h_01jdpkg3ts23bw1cdcj7aev28z" id="h_01jdpkg3ts23bw1cdcj7aev28z"></a>

### Filter: <a href="#h_01jdpkg9a7gm0v2y623269qn5s" id="h_01jdpkg9a7gm0v2y623269qn5s"></a>

Include only items matching a condition.\
*Example: Show only items where the brand is "Apple".*

### Dynamic Filter: <a href="#h_01jdpkh2575c4enarx4nrpfmmb" id="h_01jdpkh2575c4enarx4nrpfmmb"></a>

Use input variables to make filters dynamic.\
*Example: Keep products cheaper than the input item.*

### Sort: <a href="#h_01jdpkhagqyvs8bnn2kv226tfp" id="h_01jdpkhagqyvs8bnn2kv226tfp"></a>

Sort items by a specific field.\
*Example: Sort by top sales.*

### If Condition: <a href="#h_01jdpkhqfh55j21w4vd9v28cd1" id="h_01jdpkhqfh55j21w4vd9v28cd1"></a>

Apply transformations conditionally.\
*Example: If brand = "Apple", show Apple items; if brand = "Dyson", show Dyson items.*

### Shuffle: <a href="#h_01jdpkhwrt624pvcye0z1jydwf" id="h_01jdpkhwrt624pvcye0z1jydwf"></a>

Randomise the order of items.\
Use cautiously, as it can disrupt relevance.

### Limit: <a href="#h_01jdpkj2djh1zgrd6p6d23m5t1" id="h_01jdpkj2djh1zgrd6p6d23m5t1"></a>

Restrict the number of items displayed.\
*Example: Limit results to 20 items.*

### Exclude: <a href="#h_01jdpkj7ezt8m95jx16ep4n10h" id="h_01jdpkj7ezt8m95jx16ep4n10h"></a>

Remove items based on input variables.\
*Example: Exclude items already purchased by the user.*

## Final Notes <a href="#h_01jdpkjh8dzs03zw5ka3de3vv0" id="h_01jdpkjh8dzs03zw5ka3de3vv0"></a>

* The Recommendation Builder offers powerful tools for creating highly customised recommendations.
* Regularly test and preview your configurations to ensure they meet your goals.
* For additional guidance, consult the platform documentation or contact your Customer Success Manager (CSM).


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.abtasty.com/recommendations-and-merchandising_deprecated/recommendations/recommendation-banner/how-to-build-recommendations-recommendation-builder-variant.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
