---
title: DraftOrderSortKeys - Customer API
description: The set of valid sort keys for the DraftOrder query.
api_version: unstable
api_name: customer
source_url:
  html: 'https://shopify.dev/docs/api/customer/unstable/enums/DraftOrderSortKeys'
  md: 'https://shopify.dev/docs/api/customer/unstable/enums/DraftOrderSortKeys.md'
---

# Draft​Order​Sort​Keys

enum

The set of valid sort keys for the DraftOrder query.

## Valid values

* CUSTOMER\_​NAME

  Sort by the `customer_name` value.

* ID

  Sort by the `id` value.

* NUMBER

  Sort by the `number` 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.

* STATUS

  Sort by the `status` value.

* TOTAL\_​PRICE

  Sort by the `total_price` value.

* UPDATED\_​AT

  Sort by the `updated_at` value.

***

## Fields

* [Company​Contact.draftOrders(sortKey)](https://shopify.dev/docs/api/customer/unstable/objects/CompanyContact#field-CompanyContact.fields.draftOrders.arguments.sortKey)

  ARGUMENT

  Represents the customer's contact information.

* [Customer.draftOrders(sortKey)](https://shopify.dev/docs/api/customer/unstable/objects/Customer#field-Customer.fields.draftOrders.arguments.sortKey)

  ARGUMENT

  Represents the personal information of a customer. Apps using the Customer Account API must meet the protected customer data [requirements](https://shopify.dev/docs/apps/launch/protected-customer-data).

***

## Map

### Arguments with this enum

* [Company​Contact.draftOrders(sortKey)](https://shopify.dev/docs/api/customer/unstable/objects/CompanyContact#field-CompanyContact.fields.draftOrders.arguments.sortKey)
* [Customer.draftOrders(sortKey)](https://shopify.dev/docs/api/customer/unstable/objects/Customer#field-Customer.fields.draftOrders.arguments.sortKey)
