Item Sorting in SuiteCommerce

in June 8th, 2021

The order in which items display in your webstore can make a big difference in regards to your ecommerce sales numbers and profitability. NetSuite’s SuiteCommerce handles the item display order via “result sorting.”

“Relevance” is set as the default item sort option in SuiteCommerce, but relevance only makes sense in the context of keyword search results.  If a visitor to your website arrives at a Product List Page (PLP) via site navigation buttons rather than via a keyword search, then there is no keyword by which to judge relevance.  In a case like this, without additional sorting options, the items on your PLP get displayed in random order.  

Fortunately, NetSuite allows you to add other types of sorting beyond relevance.  You can add a sorting option based on any text or number field on the item record, including custom fields.  For instance, you could score your items based on profit margin, and then use that as your default sorting option on the PLP, so you can sell more of your high-profit items and fewer of your low-profit items.  Or you might want to sort items based on which items are bestsellers, so you can display top sellers front-and-center.

There is a nifty NetSuite-built bundle you can install to help with sorting by best sellers:  SC Best Sellers (bundle ID: 244097).  Note: This bundle does not set up the sorting on your website; it only creates and populates item record fields based on the sales of that item in the last 7, 30, 90, or 365 days.  You will still need to set up the sorting options.  

So how do you set up the sorting options?   There are three steps to this process: Check Item Field, Add the Sort Field to Website Setup, and Add the Sort Field to Website Configuration.

Check Item Field

Make sure that the item field you want to use as the basis of your sorting exists on the item record.  In order to give you the most control over the sorting order, you will want at least most of the items set to display on the webstore to have some value in this field; any items with no value in this field will be displayed at the end of the list (the bottom of the PLP).

Now, capture the field ID of that item field.  Save that; you will need it in a minute.  You can capture the field ID by clicking on the field label: 

Add the Sort Field to Website Setup

Next, go to Commerce > Websites > Website List.  Click Edit next to the appropriate website.

Under the Search Index tab, click on Sort Fields.  Add your new field.  Specify the sort order; often, this will be “descending.”  

Hit Save.

Add the Sort Field to Website Configuration

Next, go to Setup > SuiteCommerce Advanced > Configuration.

Select your website and domain and click Configure.

Under the Search tab, find Result Sorting.

Enter the field ID of your field, along with whatever name you want your site visitors to see for this sort option.  

Don’t forget: After the field ID, you also need to type either :desc or :asc, depending on whether you picked Ascending or Descending back in website setup.  For our best sellers field, it looks like this:

custitem_ns_sc_ext_ts_365_quantity:desc

If desired, you can change the default, which is the order in which items on the PLP will be displayed at first (until a site visitor changes his or her sort option manually).

Note that you may specify different result sorting options based on the type of device; here we decided to keep the settings identical across all three device types.  You do need to setup each of the three device types, though; you shouldn’t just do the Desktop one.

Hit Save.

That’s it!  Now you’ve added a sorting option to your PLP!  If you don’t see the new sorting option on the PLP of your site, you might need to do a cache invalidation request and/or a browser hard refresh (Ctrl + Shift + R).

You can see that because Best Sellers was set as the default, it is now showing up as the top option.


Hopefully, this post gives you something to work with while trying to understand NetSuite and what it can do for your business. If you have any questions and want some free consulting advice, feel free to contact our team at Anchor Group.

Contact us