Schemas
Each ShopifyQL schema is a table you query with FROM, like sales or customers. A schema defines the metrics you can measure and the dimensions you can break them down by. Choosing one is the first decision in any query, because it sets which fields the rest of your query can use.
Use this reference to browse every schema and find the metrics and dimensions you can query.
Anchor to What's in a schemaWhat's in a schema
Each schema covers one business area, so it groups the metrics and dimensions that belong together: sales data lives in sales, customer behavior in customers, and payment disputes in chargebacks. A query can reference only the fields its schema defines.
Anchor to MetricsMetrics
Metrics are the values a schema lets you measure, like total_sales, orders, and average_order_value in the sales schema. You return them with SHOW. Each schema page lists its metrics with a data type and description.
Anchor to DimensionsDimensions
Dimensions are the attributes a schema lets you break those metrics down by, like sales_channel, product_title, or month. Group by them with GROUP BY, bucket them over time with TIMESERIES, or filter on them with WHERE. Each schema page lists its dimensions next to its metrics.
Anchor to CustomersCustomers
Use this schema to analyze customer acquisition, retention, and lifetime behavior.
| Name | Description |
|---|---|
customers | Customer records, including first-purchase timing, new customer counts, lifetime spend, order count, average spend per order, and days since last order. |
Anchor to Finance and paymentsFinance and payments
Use these schemas to reconcile money movement, payment activity, fees, payouts, gift cards, store credit, and payment disputes.
| Name | Description |
|---|---|
chargebacks | Payment disputes, including chargeback counts, amounts, rates, reasons, reported fraud, and Rapid Dispute Resolution status. |
fees | Shopify Payments processing, foreign exchange, and Managed Markets fee amounts and averages. |
gift_cards | Gift card issuance, sales, adjustments, disablement, and starting and ending balances over time. |
payment_attempts | Payment attempt volume, failures, and authorization rates by payment method, amount, card details, and retry pattern. |
payments | Payment transaction amounts, refunds, gift card redemptions, payment methods, gateways, and transaction status by order and customer. |
payouts | Payout amounts from payment transactions by payout currency and date. |
store_credit_summaries | Store credit starting balance, ending balance, and net change by date and currency. |
store_credit_transactions | Credited, debited, and expired store credit by event, source, customer, company, order, currency, and expiration date. |
Anchor to InventoryInventory
Use these schemas to understand stock quantities, location availability, adjustments, shipments, and transfers.
| Name | Description |
|---|---|
inventory | Inventory item history by stock levels, units sold, days in stock or out of stock, sell-through rate, days remaining, and inventory value over time. |
inventory_adjustment_history | Inventory quantity changes and adjustment counts by reason, state, app, staff member, and reference document. |
inventory_by_location | Inventory stock levels, net unit changes, days in stock or out of stock, days remaining, and value by location over time. |
inventory_shipments | Shipped, received, accepted, and rejected quantities by carrier, tracking, status, and origin and destination. |
inventory_transfers | Inventory transfer quantities and counts by item, origin, destination, app, and staff member. |
Anchor to MarketingMarketing
Use these schemas to measure campaign performance and ad spend.
| Name | Description |
|---|---|
campaign_products | Product quantities and average order quantities for orders attributed to marketing campaigns. |
campaign_sales | Campaign-attributed orders, sales, and average order value across first-click, last-click, last non-direct click, and linear attribution models. |
campaign_sessions | Campaign-attributed online store visits, including page views, cart additions, checkout progress, and conversion rates. |
marketing_engagements | Engagement, spend, order, and sales metrics reported by marketing channels for marketing events. |
shop_campaign_insights | Sales, customers, ad spend, customer acquisition cost, and return on ad spend from Shop Campaigns. |
Anchor to OrdersOrders
Use these schemas to analyze order operations, including fulfillment, shipping label costs, and profitability.
| Name | Description |
|---|---|
fulfillments | Fulfillment speed and volume from order placement through fulfillment, shipping handoff, and delivery. |
profitability | Per-order profitability before returns, including revenue, cost of goods sold, shipping costs, duties, import taxes, sales taxes, and fulfillment costs. |
shipping_labels | Shipping label counts and costs by carrier, service, origin, destination, package, and order. |
Anchor to Sales revenueSales revenue
Use these schemas to analyze sales, returns, discounts, taxes, and subscriptions.
| Name | Description |
|---|---|
discounts | Discounted order counts and discount amounts across product, order, shipping, and app-applied discounts. |
returns | Returned item quantities by return status, reason, refund, return app, staff member, and line item. |
sales | Core sales metrics across channels, including revenue, orders, discounts, taxes, shipping, sales reversals, and customer type. |
sales_taxes | Tax amounts applied to sales and returns by tax name, rate, location, sales channel, product, and order. |
subscriptions | Subscription counts for active, added, and canceled subscriptions over time. |
Anchor to Sessions and behaviorSessions and behavior
Use these schemas to understand online store traffic, search behavior, product recommendations, Shop engagement, forms, and web performance.
| Name | Description |
|---|---|
global_searches | Global catalog search requests by product, product variant, store, and time. |
low_engagement_product_recommendations | Low-engagement product recommendations and their click-rate gap from the store's 30-day average. |
product_recommendation_conversions | Click, cart-addition, and purchase conversion metrics for online store product recommendations. |
search_conversions | Click, cart-addition, and purchase conversion metrics for online store search sessions. |
search_queries | Online store search query volume and result-click counts by query and click status. |
searches | Online store search query volume by query, intent, content type, and whether results were returned. |
sessions | Online store visits, page views, traffic sources, devices, visitor locations, cart additions, checkout progress, and conversion rates. |
shop_post_purchase_offers | Counts of customers who receive Shop post-purchase offers by discount code and time. |
shop_product_impressions | Product impression counts in the Shop channel by product and time. |
shopify_forms | Views, submissions, and conversion rates for Shopify Forms by form, page type, and product. |
web_performance | Online store page load, responsiveness, and visual stability metrics by page, device, browser, and storefront. |