You can specify that the dimension (facet) values of a specified dimension be sorted in refinement lists at run time. The dimension values can be sorted alphabetically, by frequency, or by rank, and in ascending or descending order.

To do this, you specify a sort option and optionally a sort order to apply to all the dimension values in the dimension:

In some cases, a sort option and sort order may assign two or more dimension values the same location in a refinements list. To further sort the dimension values in such cases, you can specify a second sort option and sort order pair to break the tie.

For example, the following illustration shows two dimension values, “Action Sports Cameras” and “Binoculars” that each have 44 records tagged to them; after being assigned the same location in the refinements list by descending order of frequency, they are sorted in ascending alphabetical order:

You configure sort options and sort orders for particular dimensions through the Navigation Cartridge. For information about how to configure the navigation cartridge, refer to the Oracle Commerce Workbench User's Guide.

To configure how the dimension values of a specified dimension are to be ordered at run-time, follow these steps:

  1. Export the configuration of the ATG owner's attributes, using either of the following endpoints:

    GET /gsadmin/v1/cloud/attributes/ATG (JSON format) 			 

    or

    GET /gsadmin/v1/cloud/ attributes/ATG.ZIP (ZIP format) 			 
  2. In the exported _.json file, find the attribute for the dimension whose dimension values you want to order. Dynamic ordering of dimension values in refinement lists illustrates how a dimension is configured.

  3. Export the configuration of the system owner's attributes, using either of the following endpoints:

    GET /gsadmin/v1/cloud/attributes/system (JSON format)

    or

    GET /gsadmin/v1/cloud/ attributes/system.ZIP (ZIP format) 			 
  4. Copy the dimension attribute that you are interested in from the ATG owner's _.json file and paste it into the system owner's _.json file.

  5. Close the ATG owner's _.json file without saving it.

  6. In the system owner's _.json file, find the dimension attribute that you copied from the ATG owner's _.json file. In this attribute's displayConfig parameter, specify the sort option and sort order for the dimension values in that dimension; for example:

    displayConfig": {
       sort": "freq,desc;alpha,asc" 
    },

  7. Add a parameter specifying that the merge action is update:

     "mergeAction" : "update" 			 

    Note: The "mergeAction" is necessary only if there is a corresponding definition for this attribute under an owner other than "system".

  8. Save the _.json file with the changes that you made.

  9. To import the configuration of the dimension, using either of the following endpoints:

    PUT /gsadmin/v1/cloud/attributes/system (JSON format)

    or

    PUT /gsadmin/v1/cloud/attributes/system (ZIP format) 	 
  10. Publish your Catalog to apply your configuration of the ordering of dimension values. Note that the Publish button is not enabled unless you have made at least one change to your Catalog content.

  11. View your changes in preview to verify that the dimension values are ordered as you intend.

  12. Run a partial update to promote your configuration to the live application


Copyright © Legal Notices