I’m testing the new ShopifyQL Python SDK and I have some questions about the requirements and available features.
The Error I’m Getting:
Access denied for shopifyqlQuery field. Required access: `read_reports` access scope.
Also: Level 2 access to Customer data including name, address, phone, and email fields.
My Questions:
Why is Level 2 PII access required?
I’m only trying to run simple analytics queries like:
FROM sales SHOW total_sales SINCE -30d UNTIL today
This query doesn’t request any customer PII data (no names, emails, addresses, or phone numbers). Why does the SDK require Level 2 Protected Customer Data access for basic sales metrics?
Which datasets are available via the Python SDK?
I tested several datasets and found:
sales - Works (total_sales, gross_sales, net_sales, orders, etc.)
sessions - Works (sessions count, referrer_source)
payments - Works (gross_payments, net_payments)
orders - Returns “Invalid dataset in FROM clause”
products - Returns “Invalid dataset in FROM clause”
customers - Dataset exists but columns not found
Is this expected? The documentation mentions orders and customers datasets but they don’t seem to work via the API.
Development stores and test data
Should ShopifyQL return data from development stores? I have test orders in my dev store but the sales dataset returns total_sales: 0. Is this because test orders are excluded from ShopifyQL analytics?
As for the zero sales on your dev store, test orders are excluded from analytics by design. The sales reports documentation confirms that test orders placed with Shopify Payments in test mode don’t appear in reports. To see real data, you’d need orders placed with live payment methods.
Hey Luke, yes the distribution can matter. If you’re building the app through your partner organization (custom, public or undecided) you likely need to still select the fields you need (although you don’t need to submit for review. Docs on that here
To access customer data in development, select the data and fields you’re using in the Partner Dashboard. You don’t need to submit a request for review for apps that are installed only on development stores.
If your app is for testing or installed only on a development store, you can access customer data in development after Step 5. You don’t need to submit for review.
If you are seeing different, can you share the store type that the app is installed on and the distribution type? My guess is if the above doesn’t help, that there may be something with the permissions between the 2 types. I can look in to that further if so.