Most merchants have a short list of sales questions they'd love answered and never get around to, because each one means building a report. Which products actually made money last month. Whether the discount code pulled in new customers or just gave margin away to regulars. What average order value does on weekends.
An AI assistant connected to your Shopify store answers these from a sentence. You ask, it writes the query, and you get a table or a chart back. This guide covers how to ask so the answers are right, and how to tell when one isn't.
How it works
Shopify analytics has its own query language, ShopifyQL. You don't need to write it. When you ask a connected Claude or ChatGPT a sales question, the integration runs a ShopifyQL query against your store's analytics data and returns the result, per Shopify's connector documentation.
A question like "top 10 products by total sales in the last 30 days" becomes something along these lines:
FROM sales
SHOW total_sales
GROUP BY product_title
SINCE -30d UNTIL today
ORDER BY total_sales DESC
LIMIT 10
You never have to type that. But knowing it's there gives you the single most useful follow-up in this whole post: "Show me the query you ran." It tells you exactly which metric, which grouping, and which dates produced the number.
Analytics is read-only. No access level lets a query change your store. Setup, if you haven't done it: Claude or ChatGPT. Inside the admin, Sidekick answers the same kinds of questions with no setup.
The rule: one question at a time
Shopify's docs say it directly. Analytics works best with one short, specific question, and layered comparisons can fail or come back hard to read.
So instead of:
Compare this quarter to last quarter by product category and channel, show me which categories grew fastest among returning customers, and chart it.
Ask in steps:
- "Using Shopify, show net sales by product type for last quarter."
- "Now the same for this quarter."
- "Which product types grew the most between the two?"
Each step is a simple query that either works or obviously doesn't. The assistant keeps the earlier results in the conversation, so the comparison in step three is done on numbers you've already seen.
Prompts that work
A reliable sales prompt names four things: the metric, the grouping, the time period, and the sort.
Products
- "Using Shopify, show my top 20 products by net sales in the last 30 days."
- "Which products sold the most units last month?"
- "Show net sales by product type for the last 90 days, highest first."
Time
- "Show net sales by day for the last 14 days."
- "Show orders and average order value by week for the last 12 weeks."
- "Show net sales by month for this year."
Customers and channels
- "Show sales by sales channel for last month."
- "Show sales by billing country for the last 90 days, top 10."
- "How many orders came from new customers versus returning customers last month?"
Discounts
- "Show orders and net sales by discount code for last month."
- "How much did discounts total last month compared with gross sales?"
Say "net sales" or "gross sales," not just "sales." They can differ by a lot, and a vague word lets the assistant choose for you.
Why the number doesn't match your dashboard
It happens to everyone the first week. Before you decide the AI is wrong, check these.
Different metric. Gross sales is before discounts and returns. Net sales is after. Total sales adds shipping and taxes. Three honest numbers for the same month, all different.
Different dates. "Last month" and "last 30 days" aren't the same period. Neither are "this week" starting Sunday and "this week" starting Monday.
Time zone. Analytics uses your store's time zone. If you named a date range in a different one, the edges move.
Returns landing later. A return is recorded when it happens, not against the original sale date. A good month can shrink a little after the fact.
A sample instead of the whole. If the assistant listed recent orders and added them up instead of running an analytics query, it only saw up to 50 orders. Ask whether it used analytics.
The fix is the same each time. Ask "which metric and date range did you use?" or "show me the query," then open the matching report in Analytics in your admin and compare. Once the two agree on a simple question, you can trust the phrasing for harder ones.
Where AI is better than a report
Reports give you numbers. A conversation lets you ask what to make of them, with the numbers on the table.
- "These five products have high sales and high discount totals. Which of them would I check first for margin problems, and why?"
- "Sales dipped the week of the 14th. What should I look at to work out why?"
- "Write a three-line summary of last month's sales for my business partner."
Treat the reasoning as a smart colleague's first take. It can see your sales data. It can't see that your supplier shipped late or that a competitor ran a sale. You bring that context.
Where a report is still better
- Anything you check daily. Pin a report or use the dashboard. It's one click, and it doesn't vary with phrasing.
- Numbers that go to your accountant. Export from the admin so there's a clear source.
- Very layered analysis. If it takes six chained questions, build the report once and save it.
The short version
- Ask one question at a time.
- Name the metric, grouping, period, and sort.
- Say net or gross.
- Ask to see the query when a number matters.
- Check one answer against the admin before trusting the pattern.
Sales questions usually lead straight to stock questions. When your top sellers are on the screen, the natural next ask is how much of each you have left. And if you're using the answers to plan a promotion, the BFCM prep plan puts it all in order.
One blind spot to know about: your Shopify analytics tells you what sold, not who never found you. If shoppers ask an AI assistant for a product like yours and it recommends someone else, that lost sale appears in no report. The free AI readiness checker shows what those assistants can read from your store.


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