---
title: "AutomaticDiscountSortKeys"
description: "The set of valid sort keys for the AutomaticDiscount query."
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/enums/automatic-discount-sort-keys'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/enums/automatic-discount-sort-keys.md'
---
# AutomaticDiscountSortKeys

The set of valid sort keys for the AutomaticDiscount query.

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

## Type Signature

`AutomaticDiscountSortKeys`

## Values

* `CREATED_AT`

  Sort by the created_at value.

* `ID`

  Sort by the id value.

* `RELEVANCE`

  Sort by relevance to the search terms when the query parameter is specified on the connection. Don't use this sort key when no search query is specified

## Schema Definition

```graphql
enum AutomaticDiscountSortKeys { 
	CREATED_AT 
	ID 
	RELEVANCE  
}
```

## Argument from

* [Query](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/queries/automatic-discount-nodes.md).automaticDiscountNodes

## 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).

