---
schema_version: "1"
id: bf5bf5816c9620d0232f551739869ef42fa6e96fa3f03b1e5b81a42a63dea169
title: Use Explicit Sorting
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_using_explicit_sorting.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_using_explicit_sorting.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d8f115423278c51a5fe1d02973917b0f1a7faedb34f98f58f5f649ab134f447e
description: Consider creating a custom sort for a specific page or section of a page on your B2C Commerce storefront.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Use Explicit Sorting

Consider creating a custom sort for a specific page or section of a page on your B2C Commerce storefront.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)

Note Explicit Sort for _Product Index_ is deprecated. Use the Sorting Rule framework for Product Search and Sorting only.

For example, if you have a custom table or grid and you want to enable sorting on any column of the grid, you might want to simply call the Search pipelet to sort the items. If this is the case, create a custom pipeline to do the sorting and configure the default sorting configuration to let you use explicit sortings.

To use explicit sorting:

1. Click App Launcher ![App Launcher](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/cc/b2c_merchandiser_administrator/images/appLauncher.png), and then select **Search** | **Searchable Attributes.**
    
    Unlike other sorting attributes, which are automatically indexed, but are separate from searchable attributes, sorting attributes passed by pipelines for explicit sorting aren’t automatically indexed. For this reason, make sure any attribute used to sort by in your explicit sorting is included in the searchable attributes for your storefront.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)
    
    Note Because sorting and searchable attributes don't use the same data types, the attributes used for explicit sorting are restricted to the ones common to searchable attributes and sorting attributes. This means, for example, that you can't sort by Date +Time. You can't use dynamic attributes in explicit sorting.
2. Check the attribute in the Product Index Attributes list to sort products, or the Content Index Attributes list to sort content items. If the attribute isn't in either list, click **New** to add it to the appropriate list.
3. In **Products and Catalogs** | **Catalogs**, find the name of the default sorting rule for the storefront catalog and for the category that includes the page where you want to perform the explicit sorting.
4. In **Search** | **Sorting Rules,** select each of these rules and make sure that they include the `Explicit Sortings (sorting.explicit-sortings)` attribute. This can be the last attribute used for the sorting rule, so that it's only used if no other sorting rule applies.
    
    ![Warning](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_warning.png)
    
    Warning Include the Explicit Sortings attribute in the sorting rule.
5. To sort a search result by a defined sorting attribute, pass the attribute ID of the sorting attribute into the Search pipelet. This is a developer task.
    
    Specify that results are returned using a specific sorting rule, using the urlSort method for the SearchModel, ContentSearchModel, or ProductSearchModel class, depending on the type of search. You can also specify that results are returned without a sorting option, using the urlDefaultSort method. If you specify a specific sorting rule, such as Price or Product name (A-Z), this takes priority and no further sorting rules apply.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)
    
    Note Implementing this feature requires application changes.