Skip to content

Shopify Customer Segments: How They Work and Where the Data Stops

By Jon Kennedy, Founder · Reviewed by Lidia Yurieva

9 minutes to read
28 Oct, 2026

Shopify customer segments are saved queries over your customer list, written in ShopifyQL. They are more capable than most merchants realize and quietly limited in ways the editor never warns you about: a 26-month data window on events, filters gated behind your plan, and an operator rule that silently changes who a segment includes.

AI Summary

Shopify customer segments are ShopifyQL queries saved against your customer list, built in the admin under Customers. You can only edit the WHERE clause; FROM and SHOW are fixed. Key limits the editor does not warn about: storefront and email event data covers only the last 26 months, predicted_spend_tier needs 100+ sales, companies needs a paid plan, product lists cap at 500 IDs, and AND binds before OR unless you add brackets.

What Shopify customer segments actually are

A segment is a saved query over your customer list. Shopify stores it as ShopifyQL, its own query language, and re-runs it rather than freezing a list of names.

You build them in the admin under Customers, either in the query editor there or from the Segments page.

Every segment is the same four-clause query, and you can only change part of it:

  • FROM customers — fixed
  • SHOW customer_name, note, subscription_status, location, orders, amount_spent — fixed
  • WHERE — your filters. This is the part you write.
  • ORDER BY updated_at — changed through the Sort by option

How this differs from Klaviyo segments

Worth settling early, because they are not interchangeable. Shopify segments run on the data Shopify holds: orders, spend, location, tags, subscription status, and events from Shopify's own email and storefront. Klaviyo segments run on Klaviyo's data, which includes its own tracking and flow history. One is not a replacement for the other, and the same named audience can resolve to two different lists.

If you are deciding where a particular audience should live, our guide to Klaviyo segmentation covers the other side.

Five ways to build one

Five routes, and most merchants only ever find the first.

  • From scratch. Combine a filter name, an operator and a value. The WHERE clause updates as you go.
  • From a template. Open the Templates icon and pick a card; its filters populate the editor. You can stack more than one template, and filter the library by category.
  • From an existing segment. Open one, edit it, then Save as new segment so the original survives.
  • By writing ShopifyQL directly. Edit the query text. Errors underline in red with a message naming the line.
  • With Sidekick. Describe the segment in plain language. It writes the query, shows the match count, and offers to open it as a new segment.

Before saving, hit Run. The match count appears above the editor and the matching customers below it. Shopify also generates a description of the segment — read it before you save, because it is what your colleagues will rely on in six months.

The template route is the one worth knowing about. Most stores need five or six standard audiences, and the library covers them without anyone writing a query.

The filters, by the question they answer

A filter is a name, an operator and a value. The useful way to look at the list is by the question each one answers.

Money and order history

amount_spent (store currency, decimal point only as separator), number_of_orders (whole numbers), orders_placed (orders or spend within an optional date range, app or location), rfm_group (categories such as CHAMPIONS or DORMANT), predicted_spend_tier (HIGH, MEDIUM or LOW), and store_credit_accounts (balance, currency, expiry and last-credit date).

Timing

first_order_date, last_order_date, customer_added_date, abandoned_checkout_date, and anniversary for dates like birthdays.

What they looked at and bought

products_purchased (by product ID, tag, quantity or date), storefront.EVENT for product_viewed and collection_viewed, and shopify_email.EVENT for bounced, clicked, delivered, marked_as_spam, opened and unsubscribed.

Where they are

customer_countries (two-letter ISO codes), customer_regions (ISO 3166-2, such as US-NY), customer_cities, and customer_within_distance, which needs coordinates plus exactly one of distance_km or distance_mi.

Who they are and what they agreed to

customer_tags (not case sensitive), customer_email_domain, customer_language, companies, created_by_app_id, customer_account_status, and the three consent filters: email_subscription_status, sms_subscription_status and product_subscription_status.

Operators are what you would expect — BETWEEN, equals and not equals, the four comparisons, CONTAINS and NOT CONTAINS, IS NULL and IS NOT NULL — plus MATCHES and NOT_MATCHES, which are required whenever a filter takes parameters in brackets. Which operators you get depends on the filter.

The AND/OR trap

This one is worth a section of its own, because it fails silently and the match count looks plausible either way.

Without brackets, AND is applied before OR.

So a segment written as spent over 100 OR ordered 5 times AND subscribed to email does not mean what most people reading it assume. Shopify resolves the AND first, giving you everyone who spent over 100 regardless of consent, plus the subscribed five-time buyers. Not what was intended, and nothing in the editor flags it.

Shopify's own documented best practice is to bracket your groups:

(amount_spent > 100 OR number_of_orders >= 5) AND email_subscription_status = 'SUBSCRIBED'

Now it means what it looks like. The habit worth building is simple: if a segment mixes AND and OR at all, bracket it, every time, even when you are confident. The cost of a redundant bracket is nothing. The cost of the other mistake is emailing people who did not consent.

The limits nobody warns you about

Four limits that change what a segment returns, none of which appear as a warning.

Event data stops at 26 months. Storefront events cover the last 26 months and start from May 2023. Shopify email events cover the last 26 months and start from March 2022. Crucially, this applies even when you set no date parameters — "all time" is not all time. A segment of everyone who ever opened an email is really everyone who opened one inside that window.

predicted_spend_tier needs volume. It only becomes available once the store has made more than 100 sales. On a newer store the filter simply has nothing to say.

companies needs a plan. It requires Basic, Grow, Advanced or Shopify Plus. Segments built while you had one keep working if you move off it.

Product lists cap at 500. A set-based IN list in products_purchased takes a maximum of 500 IDs. A large catalog hits this, and the fix is usually tags rather than IDs.

None of these are reasons not to use segments. They are reasons to check a count against something you already know before you act on it — which is the habit that separates a segment you can trust from one that just looks right.

Filters that do not mean what they say

A handful of filters do something other than what their name suggests.

  • customer_account_status only applies to legacy customer accounts. Its DISABLED value covers both customers without accounts and every customer on a store using the current version of customer accounts. If you have upgraded, this filter has no useful meaning — and there is no equivalent for the current accounts.
  • Location filters can double-count. A customer with addresses in two places can appear in both segments. If you are splitting a send by region, the regions may overlap.
  • anniversary ignores the year. It matches month and day only, and needs the facts.birth_date standard metafield or a custom one. No metafield, no birthday segment — see Shopify metafields setup.
  • customer_language is a wildcard. A bare code like 'en' also matches 'en-GB' and 'en-CA'. Usually helpful, occasionally not.
  • companies and created_by_app_id want IDs, not names — even though the editor lets you pick by name.
  • IS NOT NULL means any value, not a particular one. Easy to reach for when you meant equals.

One inconsistency to be aware of: Shopify's own reference page writes the operator as both NOT MATCHES and NOT_MATCHES in different examples. Check which form your editor accepts rather than assuming.

When to bring in help

Building a segment is free and takes minutes. The work worth paying for is everything around it.

  • Auditing segments you already rely on. Particularly any built before an accounts upgrade, or any mixing AND and OR without brackets.
  • Designing the set. Most stores need six or seven audiences that do not overlap, not forty that do. Deciding which is a retention question, not a technical one.
  • Connecting them to something. Segments are inputs. The value appears when they drive email, a discount or an automation in Shopify Flow.
  • Deciding what belongs here and what belongs in your email platform. Running the same audience in two systems with two definitions is how reporting stops agreeing with itself.

Real figures from the shopexperts directory, pulled 19 October 2026:

  • Email and SMS marketing: 14 fixed-price packages from 12 experts, median $650, middle 50% $499 to $1,875, range $200 to $4,000.
  • CRO, UX and store audits: 43 packages from 35 experts, median $600, middle 50% $325 to $1,500, range $95 to $5,000. A segmentation audit usually sits here.

A packaged price is what an expert publishes for a defined scope, not a quote for your store. For wider ranges see Shopify email marketing cost.

For the audiences and what you send them, browse Shopify email marketing experts. For segment design tied to conversion work, Shopify CRO experts. For making the numbers agree across tools, Shopify analytics and attribution experts. Not sure which? Read what kind of Shopify expert do I need.

Frequently asked questions

What are Shopify customer segments?
Saved queries over your customer list, written in ShopifyQL and re-run rather than frozen as a fixed list. You build them in the admin under Customers. Every segment uses the same four-clause query, and you can only edit the WHERE clause: FROM customers and the SHOW fields are fixed, and ORDER BY is controlled by the Sort by option.
How do I create a Shopify customer segment?
Five ways: build filters from scratch in the editor, start from a template in the template library, duplicate an existing segment with Save as new segment, write the ShopifyQL directly, or describe what you want to Sidekick and let it write the query. Select Run before saving to see the match count and the customers it returns.
What is the difference between Shopify segments and Klaviyo segments?
They run on different data. Shopify segments use what Shopify holds: orders, spend, tags, location, consent status, and events from Shopify Email and your storefront. Klaviyo segments use Klaviyo's own tracking and flow history. The same audience name can resolve to two different lists, so decide which system owns a given audience rather than maintaining both.
Why is my Shopify segment returning the wrong customers?
The most common cause is operator precedence. Without brackets, AND is applied before OR, so a query mixing both rarely means what it reads like. Bracket your groups. The other common causes are the 26-month window on email and storefront event data, and location filters placing a customer with several addresses into more than one segment.
How far back does Shopify customer segment data go?
Storefront events cover the last 26 months starting from May 2023, and Shopify Email events cover the last 26 months starting from March 2022. This applies even when you set no date parameters, so an all-time segment built on events is not actually all time. Order and spend filters are not limited this way.
Can I segment Shopify customers by store credit balance?
Yes. The store_credit_accounts filter covers balance, currency, expiry and last-credit date. Without a currency parameter it includes all currencies. It is the practical way to find customers holding credit that is about to expire, which is otherwise invisible in the admin.
Do I need an app for Shopify customer segmentation?
Not for the segments themselves, which are native and included. You need something more when you want data Shopify does not hold, or history beyond the 26-month event window, or when the audience really belongs in your email platform. Those are reasons to extend, not to replace what is already there.

Segments not matching who you meant?

Get Matched