Marketing & Advertising Magazine

How to Analyze Your Shopify Sales Export With ChatGPT Or Claude

Posted on the 20 October 2026 by Techcanada

You can get useful answers from ChatGPT or Claude about your Shopify sales, but only if you prepare the export first and tell the AI how to read it. Export your orders from Orders > Export, delete the columns that identify customers, upload the trimmed CSV to a plan whose data settings you have checked, and write your revenue definition into the prompt. Then check the AI’s order count and total against the file before you trust any trend or product ranking.

That last step matters. Shopify’s orders CSV puts each extra line item on its own row, and an AI that reads rows as orders can report the wrong revenue with complete confidence. Below is the setup, a prompt you can copy, and a worked example showing how one small file produces four different revenue answers. Vendor details were checked on Shopify, OpenAI and Anthropic help pages on October 20, 2026. We have not tested these tools; everything below comes from their documentation and our own sample file.

Which Shopify export to give the AI

Shopify gives you two kinds of sales export, and they answer different questions.

  • The orders export (Shopify admin > Orders > Export). One file with order totals, discounts, refunds, status, dates, line items and customer details. Best for order-level questions: refunds, discounts, repeat buying, channel mix.
  • Analytics report exports (Analytics > Reports, open a report, then the menu icon and Export). Shopify says most reports export as CSV, XML, JSONL or Apache Parquet. These are already summarised, for example Total sales by product or Average order value over time.

If your question is “what happened”, start with a report export: it is smaller and already uses Shopify’s definitions. Shopify defines net sales as gross sales minus discounts minus sales reversals, and total sales as gross sales minus discounts minus sales reversals plus taxes, duties, shipping charges and fees. Use the orders export when you need detail the reports do not show, such as which discount codes appear on refunded orders.

How the orders export works

  1. In Shopify admin, go to Orders and sort or filter the list if you want a subset.
  2. Click Export.
  3. Choose which orders to export, for example by start and end date.
  4. Choose the file format, then click Export orders. Export transaction histories gives a separate payments file instead.

Shopify says exports of up to 50 orders, or the current page, download to your device. Larger exports and exports by date are emailed to you and the store owner.

The row trap: why AI misreads Shopify order exports

Shopify’s help page is clear about the file layout: “orders with multiple line items display their additional line items on separate lines,” and “many of the fields are left blank to indicate that multiple items were purchased on the same order.” So an order with three products takes three rows, but its Total, Taxes, Refunded Amount and Financial Status appear once.

That layout causes four common mistakes when an AI analyses the file without guidance:

  • Counting rows as orders. Average order value comes out too low.
  • Filling blanks down. A common data cleaning step copies the order total onto every line item row. Summing that column then counts multi-item orders two or three times.
  • Using line item price as revenue. It ignores discounts, shipping and taxes, and counts refunded items.
  • Ignoring status. The file can include canceled, pending and refunded orders. Shopify’s own Gross sales definition includes pending, canceled and unpaid orders, so even Shopify’s reports need you to know which number you are reading.

The orders export also has no product cost column. Shopify lists price, compare-at price, SKU and vendor for line items, but not cost per item. An AI asked for “profit” from this file alone has to guess your costs. If you want margin answers, give it costs from your own records, or use Shopify’s profit reports, which Shopify says report profit “only for products and variants that had cost recorded at the time they were sold.” Our guide to gross margin, contribution margin and net profit explains which margin to ask for.

Worked example: one export, four revenue answers

To show how much the reading method matters, we built a hypothetical Shopify orders CSV with 10 orders across 13 rows. It sells three products (a $24 candle, an $18 mug and a $45 wallet), charges 8% tax and $6 shipping on some orders, and includes one fully refunded order, one partly refunded order, one canceled order and one pending order. The file is invented for this example; its structure follows Shopify’s documented columns.

Bar chart from a hypothetical 10-order Shopify export: totals copied to every row give $874.03, all order totals $608.83, line item price times quantity $534.00, net collected after refunds $441.79Hypothetical sample file by E-commerce Partners. Each bar is a different way of reading the same 13 rows.

Question Misleading answer What went wrong Answer with clear rules

How many orders? 13 Counted rows, not unique order names 10 in the file; 8 after removing the canceled and pending orders

Revenue $874.03 Order totals filled down to every line item row, so multi-item orders counted more than once $441.79 net collected: order totals, minus $80.52 refunded, excluding $86.52 in canceled and pending orders

Revenue $608.83 Summed every Total once but kept canceled, pending and refunded money $441.79, as above

Revenue $534.00 Line item price times quantity: no shipping, tax or discounts, and includes refunded and canceled items Useful only as a product price measure, not as revenue

Average order value $46.83 $608.83 divided by 13 rows $63.11: $441.79 net collected divided by the 7 orders kept after excluding canceled, pending and fully refunded orders

Wallet units sold 6 Counted the refunded and pending wallet orders 4

Candle units sold 8 Counted the canceled order and the refunded candle 6

Hypothetical 10-order sample, US dollars. Calculated once with pandas and once with a separate order-by-order loop; both methods gave identical results.

Each misleading answer is a reasonable reading of an ambiguous file. The fix is to remove the ambiguity: tell the AI that rows are line items, which column identifies an order, and which statuses count.

One limit: refunds appear as an order-level Refunded Amount, so the file does not say which item in a partly refunded order came back. We know it was a candle only because we built the sample. In your store, check the order page or Shopify’s reports.

Strip customer details before you upload

The orders export carries a lot of personal data. Shopify’s column list includes Email, Phone, Billing Name, Billing Street, Billing Address1 and Address2, Billing City, Billing Zip, Billing Phone, the same set for Shipping, and Notes. None of that helps answer “which discount code loses money?”

Keep for analysis Delete before uploading Replace with a code if needed

Name (order number), Created at, Paid at, Canceled at, Financial Status, Fulfillment Status, Currency Billing and Shipping Name, Street, Address1, Address2, Company, Phone, Zip Email: swap for a customer code such as C001 if you want repeat purchase analysis

Subtotal, Shipping, Taxes, Total, Discount Code, Discount Amount, Refunded Amount Phone, Notes, Note Attributes, Payment ID, Payment References Shipping Province and Country can stay if you want regional totals

Lineitem quantity, Lineitem name, Lineitem price, Lineitem SKU, Lineitem discount, Vendor, Source Employee, Device ID and Location if you do not need point of sale analysis Tags: check them first, since staff sometimes put customer details in tags

Column names from Shopify’s orders export documentation, checked October 20, 2026. Selection is our recommendation for sales analysis, not a Shopify rule.

Any spreadsheet can do this: delete the columns, swap each email for a code with a lookup table, and save a new file. If you already work with exports in Python, our guide to exporting Shopify products and inventory to Excel with Python shows a Python approach to Shopify data files.

This is practical data minimisation. What privacy law in your market requires is a separate question this article does not cover.

ChatGPT and Claude: what their documentation says

Both tools can run code on an uploaded file, which matters for exact sums and counts.

Detail ChatGPT Claude

How it analyses a CSV “Writes and runs Python code in a stateful Jupyter notebook environment” for some tasks With code execution and file creation on, it can run Python, process uploaded CSV and TSV files and create charts

Spreadsheet formats .xls, .xlsx and .csv CSV and Excel (XLSX); XLSX uploads need code execution and file creation turned on

File size 512MB hard limit per file; CSVs and spreadsheets about 50MB, depending on row size 500MB per file for chat uploads; 30MB per file for code execution uploads and downloads

Upload allowance Up to 80 files every 3 hours per user; Free users 3 uploads a day Up to 20 files per chat

Where to switch it on No toggle described; availability can vary by model, plan and workspace settings Settings > Capabilities, “Code execution and file creation”. On by default for Free, Pro and Max

Vendor warning “Review the generated code, outputs, and assumptions before relying on the result” Monitor Claude while it uses the feature and stop it if it accesses data unexpectedly

From OpenAI Help Center (Data analysis with ChatGPT; File uploads FAQ) and Claude Help Center (Upload files to Claude, updated July 23, 2026; Create and edit files with Claude, updated August 6, 2026), checked October 20, 2026.

The tighter number is Claude’s 30MB for code execution files, so trim columns first and split very large exports by quarter.

For API costs on routine store tasks, see our comparison of Claude, GPT and Gemini costs per task.

Check the data settings on your plan

  • ChatGPT. OpenAI says that for Free, Plus and Pro “we may use your content to train our models,” and that you can turn this off with “Improve the model for everyone” under Settings > Data controls. By default, OpenAI does not use inputs or outputs from ChatGPT Business, Enterprise, Edu or the API. Temporary chats “are not used to improve OpenAI models” and “may be retained for up to 30 days for safety purposes.”
  • Claude. Anthropic says chats on Free, Pro and Max are used to improve Claude if you choose to allow it in the model improvement setting, and that incognito chats are not used even if that setting is on. Team, Enterprise and API data are covered on a separate Anthropic page.

Check the setting before your first upload. Even with training off, strip the customer columns.

A prompt that makes the AI read the file correctly

Paste this before your first question and edit the bracketed parts. It turns the hidden rules of the export into explicit instructions.

  • This is a Shopify orders export. Each row is a line item. The Name column is the order number. Orders with several items have extra rows where order-level columns are blank. Do not fill blanks down.
  • Count orders as unique values in Name. Take Total, Shipping, Taxes, Discount Amount and Refunded Amount from the first row of each order only.
  • Exclude orders with a value in Canceled at, and orders whose Financial Status is pending or voided, unless I ask for them.
  • Net revenue means Total minus Refunded Amount for the remaining orders. Average order value means net revenue divided by orders that were not fully refunded.
  • Before answering anything else, tell me: total rows, unique orders, orders excluded and why, and net revenue. Show the code you used.
  • If a question needs data the file does not have, such as product costs or ad spend, say so instead of estimating. My product costs are: [paste SKU and cost list, or say none].

The “before answering anything else” line is your control check. Confirm the row and order counts yourself in a spreadsheet; if they are wrong, nothing after them is worth reading.

Questions worth asking once the numbers check out

Once the baseline matches, try questions like these:

  1. Which discount codes appear most on orders that were later refunded?
  2. What share of orders and net revenue came from each Source, such as web, draft order or POS?
  3. Which products are most often bought together in the same order?
  4. How many customer codes ordered more than once in the period, and what share of net revenue did they bring?

Treat each answer as a lead, not a conclusion, and remember that revenue by channel is not profit by channel; our break-even ROAS guide turns margin into an ad target. If your store gets traffic but the export shows few orders, the problem is probably upstream of this file; our checklist for a Shopify store getting traffic but no sales is a better starting point.

When Shopify Sidekick is the better tool

If your question is about standard metrics, you may not need to export anything. Shopify’s help pages say Sidekick can generate custom ShopifyQL queries in the query editor, show line, donut or bar charts, and export reports to CSV, Parquet, JSONL or XML. Shopify also advises that “naming the exact metrics and columns that you want gives you a more useful result than a general question.”

Sidekick works inside your Shopify admin with Shopify’s own report definitions, so you do not upload a file to another service. A general AI tool is more flexible: it can combine your export with costs or ad spend you paste in and follow your own revenue definition. A sensible split: Sidekick and Shopify’s reports for standard questions, a trimmed export in ChatGPT or Claude for custom ones.

What you should check next

  1. Decide whether your question needs a report export or the full orders export.
  2. Check the training setting on the AI plan you will use.
  3. Export one month of orders and delete the personal columns listed above.
  4. Count unique order numbers and sum Total for first rows yourself, so you have a baseline.
  5. Paste the prompt, upload the file, and confirm the AI’s baseline matches yours before asking anything else.

Frequently asked questions

Can ChatGPT or Claude connect directly to my Shopify store?

This article covers uploading an export file, which works on standard plans without connecting any app. Live connections depend on the connectors and permissions available on your plan and workspace, so check your AI tool’s settings and Shopify’s app permissions before granting store access.

Is a CSV or an Excel file better for AI analysis?

CSV is simpler. Shopify uses UTF-8 CSV for order exports, both tools accept CSV, and Claude requires code execution to be on before it accepts XLSX uploads.

Why doesn’t the AI’s revenue match my Shopify dashboard?

Usually because of definitions. Shopify’s reports apply their own rules for gross sales, sales reversals and total sales, and include amounts such as taxes and shipping in total sales. Make the AI state which orders and columns it used, then compare like with like.

The takeaway

AI tools are quick at slicing a sales export, but the Shopify orders file is easy to misread. Trim the personal columns, spell out how rows, statuses and refunds work, make the AI report a baseline you can check, and only then ask the interesting questions.

Sources

  • Shopify Help Center, “Exporting orders”. help.shopify.com
  • Shopify Help Center, “Exporting reports”. help.shopify.com
  • Shopify Help Center, “Sales reports”. help.shopify.com
  • Shopify Help Center, “Profit reports”. help.shopify.com
  • Shopify Help Center, “Sidekick help and guidance”. help.shopify.com
  • OpenAI Help Center, “Data analysis with ChatGPT”. help.openai.com
  • OpenAI Help Center, “File Uploads FAQ”. help.openai.com
  • OpenAI Help Center, “Data Controls FAQ”. help.openai.com
  • OpenAI Help Center, “How your data is used to improve model performance”. help.openai.com
  • Claude Help Center, “Upload files to Claude”, updated July 23, 2026. support.claude.com
  • Claude Help Center, “Create and edit files with Claude”, updated August 6, 2026. support.claude.com
  • Anthropic Privacy Center, “Is my data used for model training?”, updated March 16, 2026. privacy.claude.com

Last reviewed: October 20, 2026. Export steps, column names, file limits and data settings match each vendor’s documentation as checked on that date.

How this article was made: researched and drafted with AI assistance, with every factual claim checked against the sources above. The 10-order sample file, its results and the column recommendations are our own; the sample is hypothetical, not real store data.

Related guides

  • Gross margin vs contribution margin vs net profit for online stores
  • Claude vs GPT vs Gemini for online stores: what each model costs per task
  • How to use AI to answer customer emails without losing control
  • Export Shopify products and inventory to Excel with Python

Back to Featured Articles on Logo Paperblog