CustomerSavedSearch

Version 2019-10

A customer saved search is a search query that represents a group of customers defined by the shop owner.

In the Shopify admin, the shop owner searches for customers by entering a query and applying one or more filters. When results are returned, the shop owner can save the search and give it a name. After the customer saved search is created, the shop owner can select it at a later date to see a list of customers that match the query.

Customer saved search queries

Use the following table to construct customer search queries:

API value Admin UI value Description
accepts_marketing Accepts marketing Filters customers by whether they accept email marketing. Valid values:
  • 0: Return customers who don't accept email marketing.
  • 1: Return customers who do accept email marketing.
country Located in Retrieves customers from a specified country. Valid values are the full name of any country in quotation marks. Example values:
  • \"United States\": Return only customers from the United States. The double quotes have been escaped.
  • 'Canada': Return only customers from Canada.
customer_date Date created Retrieve customers who were created within a set period of time. Valid values:
  • past_week: Return customers who were created in the last week.
  • past_month: Return customers who were created in the last month.
  • last_3_months: Return customers who were created in the last 3 months.
  • past_quarter: Return customers who were created in the last quarter.
  • past_year: Return customers who were created in the last year.
  • yyyy-m-d: Return customers who were created on a set date.
  • >yyyy-m-d: Return customers who were created after a set date.
  • <yyyy-m-d: Return customers who were created before a set date.
last_abandoned_order_date Abandoned an order Retrieve customers who abandoned a cart within a set period of time. Valid values:
  • last_week: Return customers who abandoned a cart in the last week.
  • last_month: Return customers who abandoned a cart in the last month.
order_date Placed an order Retrieve customers who placed an order within a set period of time. Valid values:
  • last_week: Return customers who placed an order in the last week.
  • last_month: Return customers who placed an order in the last month.
  • last_3_months: Return customers who placed an order in the last 3 months.
  • last_year: Return customers who placed an order in the last year.
  • >yyyy-m-d: Return customers who placed an order after the specified date.
  • <yyyy-m-d: Return customers who placed an order before the specified date.
orders_count Orders placed Filter customres by the number of orders they've placed with the store. Valid values:
  • >number_of_orders: Return customers who have placed fewer than the specified number of orders.
  • <number_of_orders: Return customers who have placed more than the specified number of orders.
  • number_of_orders: Return customers who have placed the specified number of orders.
state Account status Filter customers by their customer account status. Valid values:
  • declined: Return customers who have been invited to create an account but declined.
  • disabled: Return customers whose account is disabled.
  • enabled: Return customers who have a customer account.
  • invited: Return customers who have been invited to create an account.
tag