Pin rules for search
Pin rules for search
In the Search manager of the Coveo Merchandising Hub (CMH), merchandisers can define Pin ranking rules to make products that match specific criteria appear at the top of the search results when a specific query is performed.
Pin ranking rules can also be used to enforce a specific order of products in the search results when a specific query is performed.
![Pin rules | Coveo](/en/assets/images/coveo-for-commerce/images/cmh/cmh-pin-rules.png)
Use case examples
Pin ranking rules can be used to address a variety of use cases. Here are a few examples:
-
Enforce a specific order: Pin products to the top of the search results to enforce a specific order when a specific query is performed.
-
Pin best sellers: Pin best-selling products to the top of the search results when a specific query is performed.
-
Pin clearance items: Pin clearance items to the top of the search results when a specific query is performed.
Prerequisites
To create rules, merchandisers must ensure they have properly configured their query pipeline and chosen the correct tracking ID to ensure that their changes impact the intended queries.
Create a pin rule
To create a rule:
-
In the CMH, access the Search manager.
-
From the navigation tabs, select Ranking rules.
-
Click Create ranking rule, and then select For a specific query. Pin rules can only apply to specific queries.
-
Select the Locale for which the pin rule will apply. By default, a rule applies to all available locales.
-
Type or select the Query to which the pin rule will apply, and then click Done.
-
Under Choose an action, select Pin.
-
To pin a product, you can either search for the product or use the Preview editor to select the products to pin:
-
To search for a product:
-
Under Product ID or name, select the product to pin.
-
Under Position number, enter the position number where the product will appear in the search results.
-
(Optional) If you want to pin more than one product, click Pin another product and repeat the previous steps.
-
-
When using the Preview editor, drag a product and drop it at the desired position to pin it there.
-
-
Click Done.
Leading practiceYou can preview the effect of your rules by using the Preview panel on the right side of the page.
-
Review the rule configuration, and then click Publish.
-
In the Publish now panel, enter a meaningful name for the rule, and then click Publish. The rule now applies.
To create a rule:
-
In the CMH, access the Product listings manager.
-
From the navigation tabs, select Ranking rules.
-
Click Create ranking rule, and then select For a specific listing page. Pin rules can only apply to specific PLPs.
-
Select the Locale for which the pin rule will apply, and then click Done. By default, a rule applies to all available locales.
-
Select the Listing page to which the pin rule will apply, and then click Done.
-
Under Choose an action, select Pin.
-
To pin a product, you can either search for the product or use the Preview editor to select the products to pin:
-
To search for a product:
-
Under Product ID or name, select the product to pin.
-
Under Position number, enter the position number where the product will appear on the PLP.
-
(Optional) If you want to pin more than one product, click Pin another product and repeat the previous steps.
-
-
When using the Preview editor, drag a product and drop it at the desired position to pin it there.
-
-
Click Done.
Leading practiceYou can preview the effect of your rules by using the Preview panel on the right side of the page.
-
Review the rule configuration, and then click Publish.
-
In the Publish now panel, enter a meaningful name for the rule, and then click Publish. The rule now applies.
Manage existing pin rules
To manage an existing pin rule:
-
In the CMH, access the Search manager.
-
From the navigation tabs, select Pin rules.
-
Locate the rule you want to manage.
-
Click Modify. You can now decide to edit the rule or delete it.