---
title: "CollectionSortOrder"
description: "Specify the sorting order of products within the collection."
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/enums/collection-sort-order'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/enums/collection-sort-order.md'
---
# CollectionSortOrder

Specify the sorting order of products within the collection.

- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Enum

## Type Signature

`CollectionSortOrder`

## Values

* `PRICE_ASC`

  Sorted by price in ascending order (lowest to highest).

* `ALPHA_DESC`

  Sorted in descending alphabetical order (Z - A).

* `BEST_SELLING`

  Sorted by best-selling products.

* `OTHER_APP_MANUAL`

  Sorted by the custom order set within the app. 
  
  :::tip{title="tip"}
  Currently, it only supports returning data during queries, and does not support writing as input parameters.
  :::

* `OTHER_CONVERSION_RATE_DESC`

  Sorted by conversion rate in descending order.

* `CREATED`

  Sorted by creation date in ascending order (oldest to newest).

* `OTHER_ADD_TO_CART_DESC`

  Sorted by number of items added to cart in descending order.

* `PRICE_DESC`

  Sorted by price in descending order (highest to lowest).

* `CREATED_DESC`

  Sorted by creation date in descending order (newest to oldest).

* `MANUAL`

  Sorted by the order manually set by the merchant.

* `OTHER_UPDATED_ASC`

  Sorted by update date in ascending order (oldest to newest).

* `OTHER_UPDATED_DESC`

  Sorted by update date in descending order (newest to oldest).

* `ALPHA_ASC`

  Sorted in ascending alphabetical order (A - Z).

* `OTHER_VIEW_DESC`

  Sorted by page views in descending order.

## Schema Definition

```graphql
enum CollectionSortOrder { 
	PRICE_ASC 
	ALPHA_DESC 
	BEST_SELLING 
	OTHER_APP_MANUAL 
	OTHER_CONVERSION_RATE_DESC 
	CREATED 
	OTHER_ADD_TO_CART_DESC 
	PRICE_DESC 
	CREATED_DESC 
	MANUAL 
	OTHER_UPDATED_ASC 
	OTHER_UPDATED_DESC 
	ALPHA_ASC 
	OTHER_VIEW_DESC  
}
```

## Field from

* [Collection](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/objects/collection.md).sortOrder

  By default, the display order of products within the category in the SHOPLINE backend and sales channels like online stores.

## Input field from

* [CollectionInput](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/inputs/collection-input.md).sortOrder

  The sorting of products in the collection.

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes).

