Loading
Feature degradation | Gmail Email delivery failureRead More
Get Started with B2C Commerce
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Search Refinement Buckets

          Search Refinement Buckets

          If you create a search refinement without buckets, then every separate value for refinement appears. Without buckets, the number of separate values can easily become overwhelming for a user. This topic applies to B2C Commerce.

          For example, customers typically search for basic colors, such as red, green, or blue. The merchant can define buckets that group colors.

          Bucket Values
          Red Crimson, Garnet, Ruby, Maroon, Cherry, Rouge
          Blue Sky Blue, Navy, Cerulean, Cobalt

          Bucketing Types

          For a specific refinement, the options available for the customer to query on are referred to as buckets. For example, for a color refinement, create red, blue, and brown buckets. Assign value buckets for each refinement directly or have the buckets created automatically based on value name, value count, or category. If you assign buckets, create a group of values that are all included in the bucket.

          • Bucket by Value

            Create custom bucket names or icons and manually assign specific values to them. Examples of this type of bucket include color or style indicators (retro, modern, and so on). For example, the same color (#CC0033) can appear in the red-orange bucket in the Men's category, the pink-red bucket in Women's category, and the Red bucket in the Unisex category.

            The buckets shown to the customer are those of the deepest common category for the search result set. To determine the deepest common category, use the Storefront Toolkit Search Information tool. To access this information, click the Search information icon in your application header.

            Note
            Note Rebuild the search index if you move refinement definitions from one category to another. Such changes aren’t covered by incremental indexing and therefore require a full index rebuild. If you don’t, the search refinement definitions can fail to work as expected.

            Although different categories can have different buckets, the same category can't have different buckets for the same attribute in subcategories. For example, you can't create an Age refinement that gets more specific with every category level.

            Setting Up Buckets for Value Refinements:

            When setting up buckets, please be aware that all refinements, regardless of their location, are used to improve search results. More specifically, search finds any values contained in refinements and maps each value to its bucket's label, therefore, it’s important to set up buckets with labels describing a concept more specific than its values.

            For example, it makes sense to include "tan" and "beige" in a "brown" bucket, as they’re related and it’s a kind-of relationship (tan is a kind-of brown).

            The same applies to "striped" as a kind of "multicolor", or to "jeans" as a kind of "trousers". If this pattern is followed, there is never a situation in which two buckets in different categories have a conflicting set of values.

            Expanding on that logic, set up the value "black striped" to be included in a "black" bucket, a "multi-color" bucket, and a "striped" bucket, as all of these are generalizations of this value.

            Avoid setting up the same term in a contradictory manner across different categories.

            For example, in a "Denim" category, don’t set up a "Jeans" bucket that contains the term "trousers" even though you may be certain that all trousers in this category are jeans trousers.

          • Bucket by Value Count

            Use a value count bucket to assign different values to specific buckets. Examples of this type of bucket include sizes, weights, and other group-able options. For example, you might want a bucket for small sizes that includes 1X, size 2, and size 2 petite. You might also want to reduce the number of refinements to those that are the most commonly used. For example, you might want to create buckets for laptops that are: under 1 kg, 1 kg - 3 kg, and over 4kg.

          • Bucket by Price Threshold

            Choose to create price buckets that include a range of prices. If you use this option, you don't need to manually assign values to the buckets. This is efficient when creating search refinements for prices.

          • Bucket by Period

            Choose to create period buckets for ranges of dates related to the product. For example, how new the product is, when it's available for sale, or other seasonal information. If you use this option, you don't need to manually assign values to the buckets. This is efficient when creating search refinements by date.

          Bucket for All Values

          Although customers can de-select search refinement values, you might want to create a bucket for "All" values so that it's clear to customers that they can broaden and refine their search.

          Allowed Characters for Bucket Values

          To include commas or backslashes in bucket definitions, escape them with a backslash ('\').

          For example, to create a bucket value as follows:

          one each of pure white, blueberry, brown

          Enter the following:

          one each of pure white\, blueberry\, brown

          in order for the text to be processed as single refinement value. Otherwise, each color is included as a separate bucketing value.

          Unbucketed Value Display

          If you have some values that aren’t bucketed, you decide whether to include all unbucketed values in a single bucket, as single values, or not show them at all. For example, for a color refinement, you might have some items that aren’t a single color, but multi-color. You can have a multi-color bucket that contains all unbucketed values, have each unbucketed value, such as blue/brown or red/black appear independently, or hide all multi-color items, assuming that a customer using the color refinement is looking for an item of a specific color.

          Relaxing Refinements

          Let users remove a search refinement in several ways. For buckets with values by assignment, the easiest way to do this is to create an "All" bucket that the user can select. For buckets that are assigned by name or value count, create links that let the user relax the refinement. Use the ProductSearchModel or ContentSearchModel canRelax() methods to determine whether the search can be expanded. If the search can be relaxed, there are several methods you can use to relax the search. There are different methods for relaxing a category refinement, folder refinement, or an attribute refinement.

          For an example of relaxing a search, see the productsearchrefinebar.isml templates in the SiteGenesis application (in the SiteGenesis Storefront Core cartridge in search\components.

          Variation Products in Refinements

          If you refine on an attribute value, any variation products with that value are included in the search refinement, if the attribute is a slicing attribute for the product. For example, if you have a T-shirt in several colors and are using color as a slicing attribute, so that the T-shirt appears in the storefront in several colors, if you refined by 'red', then the red T-shirt variation appears in the search results.

          Product Sets in Refinements

          Product sets are included in refinements if any items in the set match the refinement. For example, if a product set for an outfit includes a red T-shirt, then the outfit is included in the search results.

          Testing Tips

          If you use bucketing and the value list changes, or you’ve updated the catalog, remember to refresh the index, and view the buckets to make sure that all changes have been made correctly. Repeat this after every catalog update.

          Localization

          To use localized bucket labels, supply a localized label for the bucket values for attribute refinements.

          If the attribute used for the refinement is defined as localizable, the values provided in the bucket value list are as well. For localized refinement attributes, supply one value list per active locale (for example, "Red" = "Dark Red" and "Rot" = "Dunkelrot"). If the attribute used for refinement is non-localized, only one bucket value list is necessary.

          Price Refinements

          Bucket definitions for price refinements capture the following information:

          • The currency code of the price bucket
          • One localized bucket label per active locale
          • Price threshold of the bucket

          The localized bucket label can be used to render the price range independently of the actual numerical bounds (for example, 'Inexpensive' as the label for price bucket <= $10).

           
          Loading
          Salesforce Help | Article