Analytics and tracking
ChatGPT Shopify Analytics: Prompts That Work for Sales Data
By Martin Lovfjall, Editor, MCP Ecommerce · Published · 7 min read

The short answer
To use ChatGPT for Shopify analytics, export your orders as a CSV from the Shopify admin, upload the file to ChatGPT or Claude, and ask questions that tell the model to calculate with code and show its work. Claude works the same way. Neither connects live to your store by default, so you analyze a snapshot.
You can analyze Shopify sales with ChatGPT or Claude today by exporting your orders as a CSV file, uploading it to the assistant, and asking specific questions. Neither assistant reads your store live out of the box. You work on a snapshot of data that you choose, which is also the safest way to start.
This guide covers MCP (Model Context Protocol) only as a later option. The core method is simpler: get clean data, give the model context, and force it to show how it calculated each number.
What do you need before you start?
- A Shopify account with permission to export orders (usually the store owner or staff with order access).
- A ChatGPT or Claude account. Both offer a data analysis feature that writes and runs code on your file. In ChatGPT it is called "Data analysis with ChatGPT" (older names: Code Interpreter, Advanced Data Analysis). In Claude, Anthropic's help center calls it "code execution and file creation." Confirm it is switched on in your plan and settings.
- A clear question. "How are we doing?" produces vague answers. "Which products lost the most repeat buyers this quarter?" does not.
How do you export Shopify orders for analysis?
- In the Shopify admin, open the Orders page.
- Choose Export. Pick the date range or selection you want. You can also choose to include transaction history.
- Choose the plain CSV format rather than the Excel/Numbers variant. UTF-8 CSV is the only file format Shopify imports or exports, and plain CSV is the easiest for assistants to read.
- Wait for the file. Exports of about 50 orders or the current page download directly. Larger exports, or exports by date, are emailed to you and the store owner. (Shopify's help page is slightly inconsistent on the exact cutoff, so treat 50 as approximate.)
- Open the file once yourself and look at the headers. You will refer to them by exact name in your prompts.
Shopify also exports products, customers, inventory and discounts as CSV. Products can be filtered before export. See the Shopify Help Center pages on exporting orders and on CSV files for the current column list.
How do you prepare the file before uploading?
Both vendors recommend tidy data. OpenAI advises clear column names and one record per row. Do these checks first:
- Remove personal data you do not need. Order exports can include customer names, emails and addresses. Delete those columns unless your question needs them. Check the privacy and data-training settings of your assistant account and your company policy first.
- Check how multi-item orders appear. An order with several products may span several rows in the export. Verify this in your file, then tell the model so it does not count orders twice.
- Keep one time period per file. Mixing years with different discount policies makes comparisons harder to read.
- Stay within size limits. OpenAI documents about 50 MB for CSV and spreadsheet files, depending on row size. Anthropic's figures vary between its upload limits and its code sandbox, so check support.claude.com for the current numbers. A file can upload and still be too large or messy for complete analysis.
What prompts work for Shopify sales analysis?
Good prompts share four parts: the context, the exact columns, the calculation method and a request to show the work. Start with this one:
1. Data check (always first) "Read the attached Shopify orders CSV. List the columns, the date range, the number of rows and the number of unique orders. Flag duplicate order rows, refunds, test orders and missing values. Do not analyze yet."
2. Sales trend "Using Python, calculate net sales by week and by month. Use [column name] for the amount and [column name] for the date. State whether refunds and shipping are included. Show a table and a chart, and show the code you used."
3. Best and worst products "Rank products by units sold and by revenue. Show the top 15 and the bottom 15 with at least 5 units sold. Tell me which columns you used and how you handled orders with several line items."
4. Discounts "Compare average order value for orders with and without a discount code. Break down by code. Tell me how many orders sit behind each figure, and say if any sample is too small to trust."
5. Repeat customers "Using customer email as the identifier, calculate the share of customers with two or more orders and the average days between first and second order. List the assumptions you made."
6. Anomalies "Find days where order count or revenue is unusually high or low compared with the surrounding weeks. For each, list the products and discount codes that drove it. Do not guess at causes outside the file."
7. Plain-language summary "Summarize the findings for a store owner in five bullet points. Mark each one as confirmed by the data, or as an assumption."
Why ask for code and sources of each number?
Language models can be wrong at arithmetic when they calculate "in their head." The data analysis features write and run Python instead, and OpenAI advises reviewing the generated code, outputs and assumptions before relying on a result. Asking to see the code and the row counts gives you something to check.
ChatGPT or Claude: which should you use?
Both handle CSV analysis in a similar way. The differences are mostly in limits and settings.
| ChatGPT | Claude | |
|---|---|---|
| Feature name | Data analysis with ChatGPT | Code execution and file creation |
| Spreadsheet types | XLSX, XLS, CSV, TSV | CSV works everywhere; XLSX needs code execution enabled |
| Documented CSV limit | About 50 MB, depending on row size | Sources conflict (500 MB upload vs 30 MB in the code sandbox); verify on support.claude.com |
| Live web or API calls inside the analysis | No, the Python environment cannot make external requests | Check current docs |
| Free plan | 3 file uploads per day | Check current plan limits |
Practical advice: export CSV, not Excel, whichever you pick. If Claude's code execution is off, large CSVs can overrun the model's context window because the rows are read as text. That claim comes from a third-party source, so test with a small file first.
Many merchants run the same prompts in both and compare the answers. If two assistants disagree on a number, check the code and your source file.
Can ChatGPT or Claude connect live to Shopify?
Partly, and with caveats. ChatGPT's data analysis environment cannot make live Shopify API calls. For live data you need a connector, usually an MCP server (a small program that gives an AI assistant controlled access to a tool or dataset).
What exists today, based on secondary sources you should verify on shopify.dev:
- Storefront MCP is customer-facing: catalog, cart and policies. It is not a sales analytics tool.
- Dev MCP helps developers with Shopify documentation and API schemas. It does not manage store data.
- Community and vendor MCP servers claim to read store orders and run ShopifyQL, Shopify's query language for analytics. These are not Shopify-official. Evaluate what each one reads, where it stores data and what permissions it asks for.
I found no evidence that Shopify ships its own merchant-analytics MCP server, so confirm before you assume one exists. For setup walkthroughs, see Connect Claude to Shopify: The Complete Step-by-Step Guide and Connect ChatGPT to Shopify: What Works Today. For the risk side, read How to Evaluate an MCP Server Before Connecting It.
If you do connect, use read-only access first. Never grant write access to orders, products or discounts just to answer a reporting question.
What about Shopify's own AI assistant?
Shopify's Sidekick is built into the admin. Per Shopify's Winter '26 Edition page, it can generate custom reports and visualizations in the ShopifyQL query editor. Its advantage is that it works on live store data with no export step. Its limit is that it only sees Shopify, so it cannot join ad spend or email data unless you bring those in yourself.
What can go wrong?
- Wrong totals. Refunds, shipping, taxes and duplicate rows change the answer. Make the model state what it included.
- Missing costs. A Shopify orders export shows revenue and discounts, not your product costs or ad spend. Questions about profit or ROAS cannot be answered from the file alone. Add cost and spend data as extra files.
- Small samples. Percentages from 12 orders mean little. Ask for counts next to every figure.
- Confident explanations. The model may offer reasons for a sales dip that the file cannot support. Ask it to separate facts from guesses.
- Stale snapshots. A CSV is a point in time. Date the file in your prompt and re-export for each review.
- Customer data exposure. Strip personal data and follow your privacy obligations.
- Truncated analysis. A file that uploads can still be too big. If results look incomplete, split it by month.
For more prompt ideas beyond sales, see Ecommerce Marketing Prompts for AI Assistants and MCP Servers.
Frequently asked questions
+Can ChatGPT analyze my Shopify sales data?
Yes, if you give it the data. Export your orders as a CSV from the Shopify admin, upload the file to ChatGPT and ask specific questions. Its data analysis feature writes and runs Python on the file. It cannot call the Shopify API from that environment, so you work on a snapshot. Review the code and assumptions before relying on any number.
+Is there an official Shopify ChatGPT integration for sales analytics?
Not one that I could confirm. Shopify's Storefront MCP is aimed at shoppers (catalog, cart, policies), and Dev MCP is aimed at developers. Neither is a merchant sales analytics tool. Community and vendor MCP servers exist, but they are not Shopify-official. Check shopify.dev for the current state before relying on any integration.
+Is Claude good for Shopify analytics?
Claude works well for CSV-based analysis when code execution and file creation is enabled, because it can run code on your file rather than guess at arithmetic. XLSX uploads need that feature turned on, so export CSV. Upload limits are described differently across sources, so verify the current figures on support.claude.com and test with a small file.
+How accurate is AI sales analysis for Shopify?
It is as accurate as your file and your instructions. Code-based calculation is reliable when the data is clean and the method is stated. Errors come from refunds, duplicate rows from multi-item orders, small samples and unsupported explanations. Ask the model to show its code, row counts and assumptions, and spot-check key figures against Shopify reports.
+Is it safe to upload Shopify order data to an AI assistant?
It depends on the data and your account settings. Order exports can contain customer names, emails and addresses. Remove columns you do not need, review the assistant's data and training settings, and follow your privacy policy and local regulations. Start with aggregated or anonymized data where possible.
Sources
Questions and answers
Questions readers and searchers ask about this guide, answered by the site editor from the vendor documentation, plus reader experience. Every comment is reviewed before it appears.
Keep reading

Analytics and tracking · 12 min read
Reaktion MCP review: what it does, who it is for and what to check first. A review of the Reaktion MCP from its own documentation: the 1,204 metric definitions, 68 dimensions and 467...

Analytics and tracking · 6 min read
Klaviyo MCP Server: What It Is and What You Can Ask It. The Klaviyo MCP server lets Claude, ChatGPT, Cursor and VS Code read Klaviyo data and take actions. See what...

Analytics and tracking · 7 min read