PriceRuleCustomerSelection

Required access

read_price_rules access scope

A selection of customers for whom the price rule applies.

Show definition
# A selection of customers for whom the price rule applies.
type PriceRuleCustomerSelection {
  # List of customers to whom the price rule applies.
  customers(
    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns the elements that come after the specified cursor.
    after: String

    # Returns up to the last `n` elements from the list.
    last: Int

    # Returns the elements that come before the specified cursor.
    before: String

    # Reverse the order of the underlying list.
    reverse: Boolean = false

    # Sort the underlying list by the given key.
    sortKey: CustomerSortKeys = ID

    # Supported filter parameters:
    #  - `total_spent`
    #  - `orders_count`
    #  - `order_date`
    #  - `accepts_marketing`
    #  - `last_abandoned_order_date`
    #  - `state`
    #  - `country`
    #  - `email`
    #  - `phone`
    #  - `customer_date`
    #  - `updated_at`
    #  - `tag`
    query: String

    # ID of an existing saved search.
    # The search’s query string will be used as the query argument.
    savedSearchId: ID
  ): CustomerConnection!

  # Whether the price rule applies to all customers.
  forAllCustomers: Boolean!

  # List of customer saved searches that contain the customers to whom the price rule applies.
  savedSearches: [SavedSearch!]!
}

Connections

customers   (CustomerConnection!)

List of customers to whom the price rule applies.

Required access

read_customers access scope

Argument Type Default Description
after

String

Returns the elements that come after the specified cursor.

before

String

Returns the elements that come before the specified cursor.

first

Int

Returns up to the first n elements from the list.

last

Int

Returns up to the last n elements from the list.

query

String

Supported filter parameters:

  • total_spent
  • orders_count
  • order_date
  • accepts_marketing
  • last_abandoned_order_date
  • state
  • country
  • email
  • phone
  • customer_date
  • updated_at
  • tag

reverse

Boolean

false

Reverse the order of the underlying list.

savedSearchId

ID

ID of an existing saved search. The search’s query string will be used as the query argument.

sortKey

CustomerSortKeys

ID

Sort the underlying list by the given key.

Fields

forAllCustomers   (Boolean!)

Whether the price rule applies to all customers.

savedSearches   ([SavedSearch!]!)

List of customer saved searches that contain the customers to whom the price rule applies.

Required access

read_customers access scope

Sign up for a Partner account to get started.

Sign up