run_shopifyql_query
Run ShopifyQL queries to analyze store data, retrieving metrics like sales or product performance over custom time periods. Returns results as a formatted ASCII table or raw JSON for easy integration.
Instructions
Run a ShopifyQL query against the store and return the result as a rendered ASCII table. ShopifyQL is Shopify's SQL-like analytics language. Examples: 'FROM sales SHOW total_sales BY day SINCE -30d TIMESERIES', 'FROM products SHOW product_title, quantity_sold BY product_id SINCE -7d ORDER BY quantity_sold DESC LIMIT 10'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ShopifyQL query string. Example: 'FROM sales SHOW total_sales, gross_sales BY day SINCE -30d TIMESERIES' | |
| raw | No | Return the raw unformatted JSON payload instead of a rendered table. |