Example: Promoting or excluding products using inventory data

In this example, you want to create a search rule by using inventory data to promote overstock products, or exclude out-of-stock products.

Before you begin

Ensure that your IT administrator enabled the HCL Commerce search inventory index.

Procedure

  • Promoting overstocked items.

    You can promote overstocked items in search results by ranking products with high inventory counts higher than other products.

    For example, to promote products with inventory counts that are greater than 9000:

    1. Open the Marketing tool.
    2. Create and activate a search rule that uses the Change Search Result Order action.
    3. Filter search results by using the following criteria:
      Change Search Result Order ranking criteria
      Ranking Criteria Value
      Ranking action Promote
      Ranking factor 75
      Type Property
      Name Inventory
      Matching rule Greater than
      Value 9000
      Note: The higher the Ranking Factor value, the closer the items move to the top of the search results.
    4. Save and activate your search rule.
    5. Use store preview to see how the search rule has elevated products with high inventory counts in the search results.
  • Excluding out-of-stock products

    You can exclude out-of-stock products from search results by displaying only products with sufficient inventory.

    For example, to show only products that have an inventory count greater than 0:

    1. Open the Marketing tool.
    2. Create and activate a search rule that uses the Add or Replace Search Criteria action.
    3. Filter search results by using the following criteria:
      Add or Replace Search Criteria search filters
      Search filter Value
      Type Property
      Name Inventory
      Matching rule Greater than
      Value 0
    4. Save and activate your search rule.
    5. Use store preview to see how the search rule excludes products with low inventory counts from the search results.

Results

By analyzing inventory counts, you can create search rules that promote overstock products, or exclude out-of-stock products in the storefront.