> ## Documentation Index
> Fetch the complete documentation index at: https://help.experro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Include/Exclude Rule

Include/Exclude rules give you precise control over which products must always appear or never appear in search results. These rules enable you to override default search and ranking behavior to meet specific merchandising objectives:

* **Include Rules:** Force certain products to be displayed, ensuring that critical items are always visible.
* **Exclude Rules:** Prevent certain products from appearing in search results, such as items that are discontinued or out of stock.

This functionality is particularly useful when you need to tailor the shopping experience—ensuring that only available, relevant products are shown to your customers.

## Use Case

**Scenario:**\
A fashion retailer wants to exclude out-of-stock products from search results and display only products from specific brands.

**Solution:**

* **Exclude Rules:** Remove out-of-stock products from search results.
* **Include Rules:** Ensure that products from selected brands are prominently displayed.

**Outcome:**\
Users experience an improved search experience with only available and relevant products, leading to higher engagement and increased conversion rates.

## Creating Include/Exclude Rules

To create an Include or Exclude rule, follow the steps outlined in the [Configuring Rules Section](/experro_discovery/merchandising/configuring_rules). Once you select the operation as Include or Exclude, provide the details below to configure the rule.

<img src="https://mintcdn.com/experro/yOYdJb6fCXsmmbjf/images/experro_discovery/merchandising/rules_include_interface.png?fit=max&auto=format&n=yOYdJb6fCXsmmbjf&q=85&s=c9964ec288c389c55e22ca9ac4acc066" alt="" width="1919" height="1079" data-path="images/experro_discovery/merchandising/rules_include_interface.png" />

## Configuration Details

When setting up an Include or Exclude rule in Experro, you will need to supply the following details:

| **Field Name**                 | **Description**                                                                                                              |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| **Rule Name**                  | A unique name for the rule.                                                                                                  |
| **Operation**                  | Select whether the rule is an Include or an Exclude rule.                                                                    |
| **Use Advanced Query Builder** | Toggle this option to enable the advanced query builder. If enabled, click **Open Query Builder** to create complex queries. |
| **Field**                      | If not using the advanced query builder, select the product attribute to base your condition on.                             |
| **Condition**                  | Choose the condition (e.g., equals, contains) to evaluate the selected field.                                                |
| **Value**                      | Specify the value for the field against which the condition is evaluated.                                                    |
| **Add Condition**              | Option to add additional conditions using logical operators (AND/OR) for a more refined rule.                                |

By following these guidelines, you can effectively configure Include/Exclude rules in Experro to fine-tune your merchandising strategy, ensuring that your digital storefront displays only the most relevant and desirable products.
