QuickReply.ai
Ask or search…
K

Customer Segment Filters

Use this reference guide to understand the filter names, operators, and values that are used to build customer segments that are based on the default Shopify filters.

On this Page

Abandoned checkout date

abandoned_checkout_date
Includes customers by the date that they last abandoned their cart.
Operators
Exactly on date: = Not on date: != On or before date: <= Before date: < On or after date: >= After date: > Between dates: BETWEEN <date1> AND <date2> Doesn't exist: IS NULL Exists: IS NOT NULL
Values
Format
Absolute date: YYYY-MM-DD Date offset examples: -4w, -10y Named date:
  • In the last 7 days: >= 7_days_ago
  • In the last 30 days: >= 30_days_ago
  • In the last 90 days: >= 90_days_ago
  • In the last 12 months: >= 12_months_ago
The named dates are default values and can't be changed. For custom dates, use a date offset
Example
Include customers who last abandoned their cart within the last week: abandoned_checkout_date >= 7_days_ago
Include customers who last abandoned their cart within the last eight months: abandoned_checkout_date > -8m
Notes
Date values are based on entire days and depend on which time zone your store is in.

Amount spent

amount_spent
Includes customers based on how much money they have spent in your store.
Operators
Is equal to: = Is not equal to: != Greater than: > Smaller than: < Smaller or equal to: <= Greater or equal to: >= Between: BETWEEN
Values
Format
Number range: # AND # Number: # Decimal number: The decimal point (.) is used as the decimal separator. Thousand separators, such as commas or spaces, are not accepted. Language-specific formatted numbers are not accepted.
Example
Include customers who have spent 1 to 999.99 in your store: amount_spent BETWEEN 1 AND 999.99
Notes
  • The currency that is used is based on the currency that is selected for your store. Don't specify which currency is used by entering a currency symbol.
  • BETWEEN includes both the start and the end values. For example, amount_spent BETWEEN 1 AND 100 includes customers who have spent at least 1 and as much as 100.

Cities

customer_cities
Includes customers who have an address in the specified city. Customers who have multiple addresses might be included in more than one customer segment that uses this filter.
Operators
Contains this exact city: CONTAINS Doesn't contain this exact city: NOT CONTAINS Doesn't exist: IS NULL Exists: IS NOT NULL
Values
Format
countryCode-regionCode-cityCode
Example
Include customers who have an address in New York City: customer_cities CONTAINS 'US-NY-NewYorkCity'
Notes
To find a city, you can start typing the name of the city, and then select the appropriate value from the list that is displayed.

Countries or regions

customer_countries
Includes customers who have an address in the specified country or region. Customers who have multiple addresses might be included in more than one customer segment that uses this filter.
Operators
Contains this exact location: CONTAINS Doesn't contain this exact location: NOT CONTAINS Doesn't exist: IS NULL Exists: IS NOT NULL
Values
Use the ISO two-letter country code.
Format
Example
Include customers who have an address in the United States: customer_countries CONTAINS 'US'
Notes
To find a country, you can start typing the name of the country, and then select the appropriate value from the list that is displayed.

Customer added date

customer_added_date
Includes customers based on the date that they were added to your store.
Operators
Exactly on date: = Not on date: != On or before date: <= Before date: < On or after date: >= After date: > Between dates: BETWEEN <date1> AND <date2>
Values
Format
Absolute date: YYYY-MM-DD Date offset examples: -4w, -10y Named date:
  • In the last 7 days: >= 7_days_ago
  • In the last 30 days: >= 30_days_ago
  • In the last 90 days: >= 90_days_ago
  • In the last 12 months: >= 12_months_ago
The named dates are default values and can't be changed. For custom dates, use a date offset.
Example
Include customers who were added within the last week: customer_added_date >= 7_days_ago
Include customers who were added within the last eight months: customer_added_date > -8m
Include customers who were added during a specific date range: customer_added_date BETWEEN 2022-12-01 AND 2022-12-31
Notes
Date values are based on entire days and depend on which time zone your store is in.

Customer email domain

customer_email_domain
Includes customers whose email address belongs to the specified domain. The domain name is the part of the email address after the @ symbol, for example, gmail.com.
Operators
Is equal to: = Is not equal to: != Doesn't exist: IS NULL Exists: IS NOT NULL
Values
The following domain names are offered as suggestions. You're not limited to these domain names. You can manually enter any other valid domain names.
gmail.com: 'gmail.com' yahoo.com: 'yahoo.com' hotmail.com: 'hotmail.com' aol.com: 'aol.com' msn.com: 'msn.com' live.com: 'live.com' outlook.com: 'outlook.com' yahoo.ca: 'yahoo.ca'
Format
Example
Include customers whose email domain is shopify.com: customer_email_domain = 'shopify.com'
Notes

Customer language

customer_language
Includes customers based on the language that the customer uses to communicate with your store.
Operators
Is equal to: = Is not equal to: != Doesn't exist: IS NULL Exists: IS NOT NULL
Values
Use the ISO 639-1 two-letter language code.
Format
The following values are examples of some common ISO language codes. Your data isn't limited to these language codes. You can manually enter any other valid language codes, but the values that are offered to you as suggested values in the editor are the only ones that are available in your customer data.
English: 'en' French: 'fr' Spanish: 'es' German: 'de' Italian: 'it' Japanese: 'ja' Russian: 'ru'
Example
Include customers who communicate with your store in English: customer_language = 'en'
Exclude customers who communicate with your store in Canadian English: customer_language != 'en‑CA'
Notes
  • You can add the locale ISO code to the value to specify a dialect for that language. For example, you can use 'en‑US' for the United States and 'en‑GB' for the United Kingdom, or 'pt‑PT' for Portugal and 'pt‑BR' for Brazil.
  • The filter value is explicit and doesn't act as a wildcard. For example, if the filter value is 'en', then your results only include the customers whose language is set to 'en'. Your results do not include customers whose language is set to 'en‑GB', 'en‑CA', and so on.

Customer tags

customer_tags
Includes customers based on their tags.
Operators
Contains this exact tag: CONTAINS Doesn't contain this exact tag: NOT CONTAINS Doesn't exist: IS NULL Exists: IS NOT NULL
Values
The name of a customer tag.
Format
Example
Include customers who have the GoldStatus tag: customer_tags CONTAINS 'GoldStatus'
Notes
Tags are not case sensitive.

Email subscription status

email_subscription_status
Includes customers based on whether they are subscribed to your marketing email.
Operators
Is equal to: = Is not equal to: != Doesn't exist: IS NULL Exists: IS NOT NULL
Values
Not subscribed: 'NOT_SUBSCRIBED' The customer hasn't subscribed to your marketing email. Subscribed: 'SUBSCRIBED' The customer is subscribed to your marketing email. Pending: 'PENDING' The customer is in the process of subscribing to your marketing email. Invalid: 'INVALID' The customer’s email address marketing state is invalid.
Format
Example
Include customers who have subscribed to your email marketing: email_subscription_status = 'SUBSCRIBED'
Notes

Last order date

last_order_date
Includes customers who placed their last order on the date specified.
Operators
Exactly on date: = Not on date: != On or before date: <= Before date: < On or after date: >= After date: > Between dates: BETWEEN <date1> AND <date2> Doesn't exist: IS NULL Exists: IS NOT NULL
Values
Format
Absolute date: YYYY-MM-DD Date offset examples: -4w, -10y Named date:
  • In the last 7 days: >= 7_days_ago
  • In the last 30 days: >= 30_days_ago
  • In the last 90 days: >= 90_days_ago
  • In the last 12 months: >= 12_months_ago
The named dates are default values and can't be changed. For custom dates, use a date offset.
Example
Include customers whose last order was placed since last week: last_order_date >= 7_days_ago
Include customers whose last order was placed since eight months ago: last_order_date > -8m
Notes
Date values are based on entire days and depend on which time zone your store is in.

Number of orders

number_of_orders
Includes customers based on the number of orders that they have placed in your store.
Operators
Is equal to: = Is not equal to: != Greater than: > Smaller than: < Smaller or equal to: <= Greater or equal to: >= Between: BETWEEN
Values
The value that you enter must be a whole number.
Format
Number range: # AND # Number: #
Example
Include customers who have placed more than 10 orders: number_of_orders > 10
Notes
BETWEEN includes both the start and the end values. For example, number_of_orders BETWEEN 1 AND 100 includes customers who have placed at least 1 order and as many as 100 orders.

Predicted spend tier

predicted_spend_tier
Includes customers who are within the specified predicted spend tier.
This filter is only available if your store made more than 100 sales.
Learn more about predicted spend tier.
Operators
Is equal to: = Is not equal to: != Doesn't exist: IS NULL Exists: IS NOT NULL
Values
'HIGH' 'MEDIUM' 'LOW'
Format
Example
Include customers who are in the HIGH tier: predicted_spend_tier = 'HIGH'
Notes

Product subscription status

product_subscription_status
Includes customers who have the specified product subscription status.
This filter is only available if you use a subscription app.
Operators
Is equal to: = Is not equal to: != Doesn't exist: IS NULL Exists: IS NOT NULL
Values
Active: 'SUBSCRIBED' The customer has an active product subscription. Cancelled: 'CANCELLED' The customer has canceled their product subscription. Expired: 'EXPIRED' The customer's product subscription has expired. Failed: 'FAILED' The customer has a failed payment. Never subscribed: 'NEVER_SUBSCRIBED' The customer never subscribed. Paused: 'PAUSED' The customer has paused their product subscription.
Format
Example
Include customers who have an active product subscription: product_subscription_status = 'SUBSCRIBED'
Notes

Products purchased

products_purchased()
Includes customers who purchased the specified product. In addition, you can include customers who bought the product during a specified date range.
Operators
Contains this exact product ID: CONTAINS Doesn't contain this exact product ID: NOT CONTAINS Doesn't exist: IS NULL Exists: IS NOT NULL
Values
Product ID
Format
Supported time ranges:
All time: products_purchased() On or before date: products_purchased(before: <date>) On or after date: products_purchased(after: <date>) Date range: products_purchased(before: <date>, after: <date>)
Supported date formats:
Absolute date: YYYY-MM-DD Date offset examples: -4w, -10y Named date:
  • In the last 7 days: >= 7_days_ago
  • In the last 30 days: >= 30_days_ago
  • In the last 90 days: >= 90_days_ago
  • In the last 12 months: >= 12_months_ago
The named dates are default values and can't be changed. For custom dates, use a date offset.
Example
Since January 1, 2022 until today: products_purchased(after: 2022-01-01) CONTAINS 3778915041302 Within the last 30 days: products_purchased(after: 30_days_ago) Before January 1, 2022: products_purchased(before: 2022-01-01)
In date ranges, the order of the before and after parameters doesn't matter. You can express between January 1, 2022 and June 1, 2022 (inclusive) in either of the following ways:
Between January 1, 2022 and June 1, 2022 (inclusive): products_purchased(after: 2022-01-01, before: 2022-06-01) CONTAINS 3778915041302 Between January 1, 2022 and June 1, 2022 (inclusive): products_purchased(before: 2022-06-01, after: 2022-01-01) CONTAINS 3778915041302
Notes
  • When you create the customer segment, you can select the product by its name or image from the list that's displayed. Alternatively, you can start typing the title of the product, and then select it from the list.
  • The product ID, not the product title, is entered into the code. When you hover your cursor over the product ID, the product title and image are displayed.

States or provinces

customer_regions
Includes customers who have an address in the specified region within a country. Customers who have multiple addresses might be included in more than one customer segment that uses this filter.
Operators
Contains this exact location: CONTAINS Doesn't contain this exact location: NOT CONTAINS Doesn't exist: IS NULL Exists: IS NOT NULL
Values
Use the ISO country code with the ISO 3166-2 subdivision code.
Format
Example
Include customers who have an address in New York State: customer_regions CONTAINS 'US-NY'
Notes
To find a region, you can start typing the name of the region, and then select the appropriate value from the list that is displayed.