--- title: Only show rules for slots slug: o8rk6538 canonical_url: https://docs.coveo.com/en/o8rk6538/ collection: coveo-merchandising-hub source_format: adoc --- # Only show rules for slots In the [Recommendations manager](https://docs.coveo.com/en/p65f5021/) of the [Coveo Merchandising Hub (CMH)](https://docs.coveo.com/en/o5290573/), merchandisers can define _only show_ filter rules to ensure that specific products are always shown in [recommendation slots](https://docs.coveo.com/en/o9b80563/). For example, if an only show rule specifies that products from the `Flip flop` category should be shown, then only the products in this category will appear in the recommendation slot. only show rules can also be scheduled for a specific time, letting merchandisers plan and execute strategies effectively. > **Leading practice** > > * To exclude specific products from recommendation slots, use [**Exclude**](https://docs.coveo.com/en/o8rk7308/) rules. > > * To affect the ranking of specific products in recommendation slots, use [**Ranking**](https://docs.coveo.com/en/o8rk5194/) rules. ![Only show rule for recommendation slots | Coveo](https://docs.coveo.com/en/assets/images/coveo-for-commerce/images/cmh/cmh-recs-only-show-rule.png) ## Use case examples Only show rules can be used to address a variety of use cases. Here are a few examples: * For a specific recommendation slot, you want to ensure that products from a specific category are always displayed. For example, when visitors are viewing products related to "Flip Flops," you want to ensure that products from the `Flip flop` category are shown in the recommendation slot. * When your visitors are viewing products from a specific brand, you want to ensure that products from that brand are shown in the recommendation slot. * You want to ensure that products relevant to the current season are always shown in the recommendation slot. For example, you want to ensure that only products having `summer` as the value of the `season` attribute are recommended. * You want a specific recommendation slot to show only products with ratings above 4 stars. ## Prerequisites Before you create rules in the [Coveo Merchandising Hub (CMH)](https://docs.coveo.com/en/o5290573/): * In the [Coveo Administration Console](https://docs.coveo.com/en/183/), [map](https://docs.coveo.com/en/217/) the [metadata](https://docs.coveo.com/en/218/) that you want to use as attributes in rules to the corresponding [fields](https://docs.coveo.com/en/200/). These [fields](https://docs.coveo.com/en/200/) must have the **Facet** or **Multi-value facet** option enabled. For example, to use the `color` [metadata](https://docs.coveo.com/en/218/) as an attribute in a rule, [map](https://docs.coveo.com/en/217/) it to a [field](https://docs.coveo.com/en/200/) with the **Facet** or **Multi-value facet** option enabled. * [Create query pipelines](https://docs.coveo.com/en/o48e0216#storefront-associations-and-query-pipelines). * [Choose the correct property](https://docs.coveo.com/en/o6lb0453#property-and-locale-selectors) to ensure that your changes affect the intended slots. ## Create only show rules To create only show rules . In the CMH, access the **Recommendations** manager. . From the navigation tabs, select **filter rules** and then click **Create filter rule**. . Under **This rule will apply to**, define the scope of the rule. .. **Locale**: Select the [locale](https://docs.coveo.com/en/p4tf0351/) that the only show rule applies to. By default, a rule applies to all available [locales](https://docs.coveo.com/en/p4tf0351/). .. [.initial]**slot**: Select the recommendation slot that the only show rule applies to, and then click **Done**. > **Note** > > Currently, filter rules can only apply to a specific recommendation slot. . Under **Choose an action**, select [.initial]**only show**. . Under **Attribute**, select the attribute on which you want to apply the only show rule. For example, to only show products based on their brand, select `ec_brand`. . Under **Operator**, select the [operator](https://docs.coveo.com/en/o2gc0008/) that you want to use. . Under **Value**, select one or more attribute values that you want to use to filter products. For example, to only show products based on the `ec_brand` attribute, enter the brand value that you want to use as a filter, such as **Barca Sports**. For a recommendation slot using a [seeded strategy](https://docs.coveo.com/en/o9ge0347/), you can select the **Use "Same as product..."** option to use a dynamic value. For example, on a PDP, you can create an only show rule that uses the `ec_brand` attribute and the **Use "Same as product..."** option to recommend products from the same brand as the product being viewed. When a visitor views a `Barca Sports` product, the recommendation slot will display other `Barca Sports` products. . (Optional) To add more attribute-value pairs to the only show rule, click **Add attribute** and repeat the process. . For a recommendation slot using a [seeded strategy](https://docs.coveo.com/en/o9ge0347/), under **Choose when to apply**, select whether you want the rule to apply in any situation, or only if [specific conditions are met](https://docs.coveo.com/en/o4nh0046#conditional-filter-and-ranking-rules). . Click **Next: Review and publish**. . Review your rule configuration. > **Leading practices** > > Use the panel on the right to preview how the rule affects > the products in the recommendation slot for a given [locale](https://docs.coveo.com/en/p4tf0351/). > > If you're previewing a rule for a recommendation slot using a [seeded strategy](https://docs.coveo.com/en/o9ge0347/), you must choose the products for which you want to simulate recommendations to see the effect of the rule. > > The preview is an approximate simulation that won't cover every scenario encountered in a live environment. . Click **Next: Publish**. . Under **Rule name**, enter a meaningful name for your rule. . Under **Choose when to publish**, select one of the following: ** To apply the rule immediately, select **Publish now**. ** To set a schedule for the rule, select **Set a schedule**, and then select the time frame in which the rule should apply. . Click **Publish now**. The rule now applies or will apply as scheduled. ## Modify only show rules To modify only show rules . In the CMH, access the **Recommendations** manager. . From the navigation tabs, select **filter rules**. . Locate the rule that you want to modify. . Click [dots], and then click **Modify**. . You can modify the rule's scope (**Locale**, **Audiences**, or [.initial]**slot**) or its configuration by clicking **Edit** on the relevant card. These are the same settings covered in the [rule creation](#create-only-show-rules) section. > **Important** > > The **Audience** option is currently in early access. > Contact your Customer Success Manager (CSM) to enable this option. . When you've finished editing the rule, or to modify its publishing settings, click **Next: Publish**. . Update the publishing settings, if applicable, and then click **Publish now**. The modified rule now applies, or will apply as scheduled. ## Delete only show rules To delete only show rules . In the CMH, access the **Recommendations** manager. . From the navigation tabs, select **filter rules**. . Locate the rule that you want to delete. . Click [dots], and then click **Delete**. . Click **Delete** again to confirm. The rule is deleted.