You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sort options allow you to define custom sorting strategies for search and browse results. You can create, update, delete, and retrieve sort options for your catalog.
407
+
408
+
## Creating a Sort Option
409
+
410
+
To create a new sort option, you will need to create a `SortOption` object with the required fields and wrap it in a `SortOptionRequest`.
To update an existing sort option (or create it if it doesn't exist), use the `updateSortOption` method. The sort option is identified by the combination of `sortBy` and `sortOrder`.
To retrieve all sort options for a section, you can use the `retrieveSortOptions` method. You can optionally filter by a specific `sortBy` field and control pagination.
467
+
468
+
```java
469
+
// Retrieve all sort options for the default "Products" section
0 commit comments