AgentReady · Switch sites
Raw Markdown

How to Build Customer Segments in Shopify With AI

Canonical: https://joinagentready.com/blog/shopify-customer-segments-with-ai

By Dylan Hunt October 6th, 2026 AI in your Shopify admin

Customer segments are one of the most valuable features in Shopify, and one of the least used. The reason is the editor. Building a segment means writing a filter query, and "customers who ordered at least twice but not in the last 90 days" isn't obvious to express if you've never done it.

Now you can just say it. Shopify's segment guide lists Sidekick as one of the ways to create a segment: you describe the group in plain language and it generates the segment. Here's how to use it well, and how to make sure the segment holds the people you meant.

How it works

  1. In your Shopify admin, go to Customers, then Segments.
  2. Open Sidekick and describe the customers you want.
  3. Sidekick writes the segment's filter query into the editor.
  4. Run it to see the matching customers and how many there are.
  5. Review the query and the description, then Save segment.

Shopify generates a short description of the segment. Its guide says to review that description and change it if it doesn't match the segment you want. Treat that as the first check: if the plain-language description isn't what you asked for, the query isn't either.

Prompts that work

A segment prompt describes people by what they did, where they are, or how they relate to your marketing. Shopify's own examples include:

Building on that pattern:

By purchase behaviour

By recency

By location and subscription

By product

Use exact names for collections, products, and tags, and real numbers for thresholds. "Good customers" isn't a segment. "More than three orders and over 300 dollars spent" is.

Check the segment before you use it

The danger with a segment isn't that it fails. It's that it works, returns a list, and the list is slightly wrong. An email to the wrong 2,000 people can't be unsent.

Look at the count. Does it pass a sanity check? If you have 10,000 customers and "repeat buyers" comes back as 9,400, something's off.

Open three customers. Pick three from the list and look at their order history. Do they obviously belong?

Find someone who should be in it. Think of a customer you know fits. Are they there? And someone who shouldn't be?

Read the query. You don't have to write the filter language to read it. The conditions are usually legible: a field, a comparison, a value. Check the numbers and whether conditions are joined with AND or OR. Those two little words change everything. "Bought twice AND not recently" is a win-back list. "Bought twice OR not recently" is nearly everybody.

Watch the date logic. "In the last 90 days" and "more than 90 days ago" are opposites, and they're the most common mix-up.

If it's wrong, tell Sidekick what's wrong in plain words: "This includes people who ordered last week. I only want customers whose most recent order is older than 120 days."

Five segments worth building first

  1. Win-back. Ordered at least twice, nothing in the last 120 days. People who liked you and drifted.
  2. One-and-done. Exactly one order, more than 60 days ago. The second purchase is the hard one, so target it.
  3. VIPs. Top spenders or most frequent buyers. For early access and thank-yous, not discounts.
  4. New customers. First order in the last 30 days. For onboarding and how-to content.
  5. Subscribed but never bought. On your email list, zero orders. They need a reason to start.

Segments stay current. A customer who places a third order joins the repeat-buyer segment without you doing anything.

What to do with a segment

A saved segment appears in your Segments list, ready to use. The two common uses:

Those two combine well: a win-back segment, a code only that segment can redeem, and an email announcing it. For the code itself, see creating discount codes with AI.

Where Claude and ChatGPT fit

If you use a connected Claude or ChatGPT, know the boundary. Shopify's documentation for the official integrations lists reading customers (name, email, phone, order count, total spend) and says customer records are read-only. It doesn't list an action for creating segments.

So the split is:

Remember that asking an outside assistant about customers shares personal data with that provider. See is it safe to connect AI to your Shopify store?

Other ways to make a segment

Sidekick isn't the only shortcut. Shopify's guide also covers:

A good way to learn: have Sidekick build a segment, read the query it wrote, and adjust one number by hand.

The short version

  1. Go to Customers, then Segments, and describe the group to Sidekick.
  2. Use exact names and real numbers.
  3. Run it. Check the count, three customers, the description, and the AND/OR logic.
  4. Save it, then use it for a targeted email or a restricted discount.

For more on what Sidekick can do in the admin, see how to use Shopify Sidekick. For the full set of AI options, see every option compared.

Quick answers

Frequently asked questions

Can AI create customer segments in Shopify?

Yes. Shopify's help center says you can use Sidekick to generate a customer segment from a plain language description. You describe the group, Sidekick writes the segment filter, and you review and save it.

Do I need to learn Shopify's segment query language?

No. Segments are defined by a filter query, and Sidekick writes it for you from your description. It still helps to read the query it produces, because that's the precise definition of who is in the segment.

Can ChatGPT or Claude create Shopify customer segments?

Shopify's documentation for the official Claude and ChatGPT integrations lists reading customers, with name, email, phone, order count, and total spend, and says customer records are read-only. It doesn't list an action for creating segments. Use Sidekick or the segment editor in your admin for that.

How do I know an AI-built segment is correct?

Run it and check three things: the customer count is plausible, a few customers in the list clearly belong, and the AI-generated description matches what you asked for. Shopify's guide says to review the description and change it if it doesn't match the segment you want.

What can I do with a customer segment once it's saved?

A saved segment appears in your Segments list and updates as customers start or stop matching it. Segments are typically used to target email campaigns and to limit who can use a discount.

Dylan Hunt

Author

Dylan Hunt

Builds Shopify catalog readability and AI answer visibility at AgentReady and Caffeine and Commerce.

About Dylan →

Check your storefront’s public data

Get a free report on the product markup and discovery files the checker finds in under a minute.

Run free audit View on the App Store

Comments

Every comment here comes from a verified email. Write yours, confirm from your inbox, and it's live.

Loading comments…

Share X LinkedIn Facebook

Written by Dylan Hunt, Founder, AgentReady. AgentReady audits Shopify structured data and checks approved changes on the live storefront. See plans.

One product, plus research

The product, and the research behind it

Free guide

The Shopify Functions Playbook

25 real things you can build with Functions, with the plan requirements and limits stated plainly. Emailed to you, readable immediately.

More in AI in your Shopify admin

See all in AI in your Shopify admin →