Exclude rules for search

This is for:

Merchandiser

In the Search manager of the Coveo Merchandising Hub (CMH), merchandisers can define exclude filter rules to hide specific products from the search results.

Exclude filter rules can apply to all queries or to one or more specific queries. They can also be scheduled for a specific time, letting merchandisers plan and execute their strategies more effectively.

Exclude rule for search | Coveo

Use case examples

Exclude filter rules can be used to address a variety of use cases. Here are a few examples:

  • For a specific query, you want to ensure that products from a specific category or with specific attributes are excluded from the search results. For example, when a visitor searches for "Kayak," you want to ensure that products from the canoe category are excluded from the search results.

  • You want to hide products that are out of stock from the search results.

  • When your visitors search for a specific brand, you want to hide products from a competitor brand.

Prerequisites

Before you create rules in the Coveo Merchandising Hub (CMH):

Create exclude rules

To create exclude rules

  1. In the CMH, access the Search manager.

  2. From the navigation tabs, select filter rules and then click Create filter rule.

  3. Under This rule will apply to, define the scope of the rule.

    1. Locale: Select the locale that the exclude rule applies to. By default, a rule applies to all available locales.

    2. Audiences: Select the audience that the exclude rule will target. You can choose between predefined audience profiles or create custom profiles. You can only select one audience profile per rule.

      Important

      The Audience option is currently in early access. Contact your Customer Success Manager (CSM) to enable this option.

      • All visitors: By default, the rule applies to all visitors.

      • Device & technology: Target visitors visiting a storefront using a specific device type. The device type is determined by the information sent by the visitor's browser, not by the device’s screen size. Available options are:

        • Desktop: Encompasses desktop computers and laptops.

        • Mobile: Encompasses all mobile phones.

        • Tablet: Encompasses all tablets.

      • Visitor type: Target the visitors who are logged into the storefront or those who aren’t.

      • Your audiences: Create a custom audience profile that you can reuse in other rules sharing the same property. After a custom audience profile is created, it can’t be changed once the rule is published. If all rules containing a custom audience profile are deleted, the custom audience profile will no longer be available as an option when creating new rules.

        • Visitor URL: Target visitors based on the URL of the storefront page they’re on.

        • Referrer URL: Target visitors based on the URL they came from before landing on the storefront.

    3. query: Choose whether the exclude rule applies to all queries or to one or more specific queries.

      • To apply the exclude rule to all queries:

        1. Select All queries. You won’t be able to select an operator or any specific queries.

        2. Click Done.

      • To apply the exclude rule to specific queries:

        1. Select Specific queries.

        2. Select an Operator.

          • Is: This operator identifies queries that exactly match the specified value. For example, you can use it to create a rule that only targets the query accessories.

          • Contains: This operator identifies queries where the specified value is found within the full value of the query. For example, you can use it to create a rule that targets all queries containing the term accessories, including Surf accessories and Parts & accessories.

        3. Select one or more queries that the exclude rule applies to.

        4. Click Done.

  4. Under Choose an action, select exclude.

  5. Under Attribute, select the attribute on which you want to apply the exclude rule. For example, to exclude products based on their brand, select ec_brand.

  6. Under Operator, select the operator that you want to use.

  7. Under Value, select one or more attribute values that you want to use to filter products. For example, to exclude products based on the ec_brand attribute, enter the brand value that you want to use as a filter, such as Barca Sports.

  8. (Optional) To add more attribute-value pairs to the exclude rule, click Add attribute and repeat the process.

  9. Click Next: Review and publish.

  10. Review your rule configuration.

    Tip
    Leading practices

    Use the panel on the right to preview how the rule affects the search results for a given locale.

    The preview is an approximate simulation that won’t cover every scenario encountered in a live environment.

  11. Click Next: Publish.

  12. Under Rule name, enter a meaningful name for your rule.

  13. 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.

  14. Click Publish now.

The rule now applies or will apply as scheduled.

Modify exclude rules

To modify exclude rules

  1. In the CMH, access the Search manager.

  2. From the navigation tabs, select filter rules.

  3. Locate the rule that you want to modify.

  4. Click dots, and then click Modify.

  5. You can modify the rule’s scope (Locale, Audiences, or query) or its configuration by clicking Edit on the relevant card. These are the same settings covered in the rule creation section.

    Important

    The Audience option is currently in early access. Contact your Customer Success Manager (CSM) to enable this option.

  6. When you’ve finished editing the rule, or to modify its publishing settings, click Next: Publish.

  7. Update the publishing settings, if applicable, and then click Publish now.

The modified rule now applies, or will apply as scheduled.

Copy exclude rules

To copy exclude rules

  1. In the CMH, access the Search manager.

  2. From the navigation tabs, select filter rules.

  3. Locate the rule that you want to copy.

  4. Click dots, and then click Copy to…​.

  5. In the Copy rule modal that opens, you can choose whether to copy the rule to other properties or queries. If the rule applies to all queries, you won’t see the option to copy the rule to other queries.

    • To copy the rule to other properties:

      1. Select Property and click Next.

      2. Use the dropdown menu to select one or more properties.

        Important

        If the rule is scoped to one or more queries that don’t exist in the target property, you’ll see an error message and be unable to proceed with the copy.

        The error message will list the queries that are missing from the destination property.

      3. Click Confirm copy.

    • To copy the rule to other queries (if applicable):

      1. Select query and click Next.

      2. Use the dropdown menu to select one or more queries.

      3. Click Confirm copy.

The rule is copied to the target properties or queries.

Delete exclude rules

To delete exclude rules

  1. In the CMH, access the Search manager.

  2. From the navigation tabs, select filter rules.

  3. Locate the rule that you want to delete.

  4. Click dots, and then click Delete.

  5. Click Delete again to confirm.

The rule is deleted.