---
title: "AutomaticDiscountSortKeys"
description: "自动折扣查询的有效排序键集"
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/enums/automatic-discount-sort-keys'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/enums/automatic-discount-sort-keys.md'
---
# AutomaticDiscountSortKeys

自动折扣查询的有效排序键集

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

## Type Signature

`AutomaticDiscountSortKeys`

## Values

* `CREATED_AT`

  按created_at值排序

* `ID`

  按 id 值排序。

* `RELEVANCE`

  在连接上指定查询参数时，按与搜索词的相关性排序。当未指定搜索查询时，请勿使用此排序键。

## Schema Definition

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

## Argument from

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

## Error Handling

关于更多通用错误码说明，参考：[状态码和错误码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes)。

