---
title: OrderSortKeys - Storefront API
description: The set of valid sort keys for the Order query.
api_version: 2026-07
source_url:
  html: 'https://shopify.dev/docs/api/storefront/latest/enums/OrderSortKeys'
  md: 'https://shopify.dev/docs/api/storefront/latest/enums/OrderSortKeys.md'
api_name: storefront
api_type: graphql
type: enum
---

# Order​Sort​Keys

enum

The set of valid sort keys for the Order query.

## Valid values

* ID

  Sort by the `id` value.

* PROCESSED\_​AT

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

* TOTAL\_​PRICE

  Sort by the `total_price` value.

***

## Fields

* [Customer.orders(sortKey)](https://shopify.dev/docs/api/storefront/latest/objects/Customer#field-Customer.fields.orders.arguments.sortKey)

  ARGUMENT

  A customer account with the shop. Includes data such as contact information, [addresses](https://shopify.dev/docs/api/storefront/current/objects/MailingAddress) and marketing preferences for logged-in customers, so they don't have to provide these details at every checkout.

  Access the customer through the [`customer`](https://shopify.dev/docs/api/storefront/current/queries/customer) query using a customer access token obtained from the [`customerAccessTokenCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerAccessTokenCreate) mutation.

  The object implements the [`HasMetafields`](https://shopify.dev/docs/api/storefront/current/interfaces/HasMetafields) interface, enabling retrieval of [custom data](https://shopify.dev/docs/apps/build/custom-data) associated with the customer.

***

## Map

### Arguments with this enum

* [Customer.orders(sortKey)](https://shopify.dev/docs/api/storefront/latest/objects/Customer#field-Customer.fields.orders.arguments.sortKey)
