
This article is the continuation of the [Recommendation filters](/docs/ai-hub/recommendations-v2/recommendation-filters) article and it contains the examples of recommendation filters usage. Each example considers a different business need. 

## Visual Builder
---
### Defining condition between filters

#### Example 1

<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/campaign/_gfx/filter-conditions-example.png" alt="A or B dependency" class="large">
<figcaption> A or B dependency </figcaption>
</figure>

If there are items that meet the conditions of the filter A (for example, if there are 13 or more pieces of an item), the recommendation frame shows the items described in the filter A.  

If there are no items that meet the filter A conditions, the recommendation frame shows the items that match the filter B (items of a different brand than the currently viewed item), if there are any.

If there are no items that meet the conditions of any of the filters (neither filter A nor B), then the recommendation frame is empty.

#### Example 2

<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/campaign/_gfx/filter-conditions-example.png" alt="A or B dependency" class="large">
<figcaption> A and B dependency </figcaption>
</figure>

The condition of both filters (A and B) must be met. It means the recommendation frame shows an item of which you have more than 12 pieces in stock and the brand of an item is different than the brand of the currently displayed item.  

If there are no items that meet the filter conditions simultaneously, the recommendation frame is empty. 

#### Example 3

<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/campaign/_gfx/filter-conditions-example3.png" alt="A or B dependency" class="large">
<figcaption> A and (B or C) dependency </figcaption>
</figure>

Items must meet the conditions of two filters at the same time:
- the condition defined in the filter A (you must have 13 or more pieces of a specific item in your stock)
- the conditions defined either in B or C filters

**Success**: 
- Items meet conditions of A and B filters.
- Items meet conditions of A and C filters.
- Items meet all conditions (then)

**Failure**: 
- Items don't meet the conditions of the filter A.
- Items don't meet the conditions of both filters B and C.
**Result**: The recommendation frame is empty

### Examples of use
---


<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

You can see the same examples for the IQL Query wizard. Go to the [Examples](/docs/ai-hub/recommendations-v2/recommendation-filters-examples#iql-query) in IQL Query section.

</div></div></div>



1. The goal of the recommendation is to display items whose number in your stock is greater than 12. To make it happen, set the filters to the following configuration:

    <figure>
    <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/campaign/_gfx/filter-example-of-use3.png" alt="Example of a use" class="full">
    <figcaption> Items in recommendations are of the same brand as the currently displayed item </figcaption>
    </figure> 
    
2. The goal of the recommendation is boost brand loyalty by promoting items of specific brand whose number of purchases exceeded over 150 times in the last 30 days.

    <figure>
    <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/campaign/_gfx/visualbuilder-metric-example.png" alt="Example of a use" class="full">
    <figcaption> Items of specific brand which were purchased over 150 times in the last 30 days </figcaption>
    </figure> 


2. The goal of the recommendation is to display items with size matched individually for each customer. To make it happen, set the filters to the following configuration: 
    
    <figure>
    <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/campaign/_gfx/visual-builder-user-context-example.png"  alt="Example of a use" class="full">
    <figcaption> Size of the items adjusted individually for each customer </figcaption>
    </figure>

2. The goal of the recommendation is to display items in the recommendation frame of the same brand as the currently viewed items. In order to make it happen, set the filters to the following configuration:

    <figure>
    <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/campaign/_gfx/filter-example-of-use.png" alt="Example of a use" class="full">
    <figcaption> The items displayed in recommendations    </figcaption>
    </figure> 

    
   <div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

   You can see the same example for the IQL Query wizard. Go to the Examples in IQL Query section.

   </div></div></div>


2. The goal of the recommendation is to display items in the recommendation frame that is discounted more than the currently viewed product. In order to make it happen, set the filters to the following configuration:

    <figure>
    <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/campaign/_gfx/filter-example-of-use2.png" alt="Example of a use" class="full">
    <figcaption> Items in recommendations are of the same brand as the currently displayed item </figcaption>
    </figure> 

    
   <details class="accordion"><summary>Click here to see the tutorial</summary><div class="accordion-content"></div></details>



<div class="admonition admonition-important"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

While creating the filters, consider the conditions set in the filters and the dependency between them (described by `OR` and `AND` operators) as well.

</div></div></div>


## IQL Query
---
### Examples of use

1. The goal of the recommendation is to display items which number in your stock is greater than 12. To make it happen, set the filters to the following configuration:

    <figure>
    <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/campaign/_gfx/iql-wizard-example2.png" alt="Example of a use" class="full">
    <figcaption> The items displayed in recommendations    </figcaption>
    </figure> 

2. The goal of the recommendation is to display items with size matched individually for each customer. To make it happen, set the filters to the following configuration:

    <figure>
    <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/campaign/_gfx/iql-builder-user-context-example.png"  alt="Example of a use" class="large">
    <figcaption> Size of the items adjusted individually for each customer </figcaption>
    </figure>

2. The goal of the recommendation is to display items in the recommendation frame of the same brand as the currently viewed items. In order to make it happen, set the filters to the following configuration:

    <figure>
    <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/campaign/_gfx/iql-wizard-example1.png" alt="Example of a use" class="full">
    <figcaption> Items in recommendations are of the same brand as the currently displayed item </figcaption>
    </figure> 

3. The goal of the recommendation is to display items in the recommendation frame that are more expensive (above $180) when the size of the currently viewed item is larger than 36 and if this item is of the XYZ brand. In other case (when the size is smaller than 36 or the brand is not XYZ), the recommendation frame shows items which cost less than $180. 

    <figure>
    <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/campaign/_gfx/example-query-iql.png" alt="Example of a use" class="full">
    </figure>


4. The goal of the recommendation is to promote items which are popular in summer. In order to make it happen, set the filter to the following configuration:  

    <figure>
    <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/campaign/_gfx/iql-summer-season-example.png" alt="Example of a use" class="full">
    <figcaption> Recommending items popular in a selected season </figcaption>
    </figure>


## Examples of use
---
- [Promote customer's favorite products in recommendations](/use-cases/boost-favorite-products)
- [Excluding category of recently purchased products in recommendations](/use-cases/reco-excluding-recently-purchased-category)