PriceRuleCustomerSelection object

A selection of customers for whom the price rule applies.

Required access

read_price_rules access scope.


On this page


Connections

customers ([CustomerConnection!](https://shopify.dev/docs/admin-api/graphql/reference/customers/customer))
List of customers to whom the price rule applies.

Argument Description
after
(
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)

)
Returns the elements that come after the specified cursor.
before
(
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)

)
Returns the elements that come before the specified cursor.
first
(
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01)

)
Returns up to the first n elements from the list.
last
(
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01)

)
Returns up to the last n elements from the list.
query
(
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)

)
Supported filter parameters:
+ accepts_marketing
+ country
+ customer_date
+ email
+ last_abandoned_order_date
+ order_date
+ orders_count
+ phone
+ state
+ tag
+ total_spent
+ updated_at
See the detailed search syntax.
reverse
(
[Boolean](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01)

)
Reverse the order of the underlying list.
Default value: false
savedSearchId
(
[ID](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01)

)
ID of an existing saved search. The search’s query string is used as the query argument.
sortKey
(
[CustomerSortKeys](https://shopify.dev/docs/admin-api/graphql/reference/customers/customersortkeys)

)
Sort the underlying list by the given key.
Default value: ID


Fields

  • forAllCustomers ([Boolean!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01))
    Whether the price rule applies to all customers.
  • savedSearches ([[SavedSearch!]!](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/savedsearch))
    A list of customer saved searches that contain the customers who can use the price rule.


Types that return PriceRuleCustomerSelection

  • [PriceRule.customerSelection](https://shopify.dev/docs/admin-api/graphql/reference/discounts-and-marketing/pricerule#customerselection-2021-01)