Skip to main content

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.


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.

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.

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.


Use this schema to analyze customer acquisition, retention, and lifetime behavior.

NameDescription
customersCustomer 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.

NameDescription
chargebacksPayment disputes, including chargeback counts, amounts, rates, reasons, reported fraud, and Rapid Dispute Resolution status.
feesShopify Payments processing, foreign exchange, and Managed Markets fee amounts and averages.
gift_cardsGift card issuance, sales, adjustments, disablement, and starting and ending balances over time.
payment_attemptsPayment attempt volume, failures, and authorization rates by payment method, amount, card details, and retry pattern.
paymentsPayment transaction amounts, refunds, gift card redemptions, payment methods, gateways, and transaction status by order and customer.
payoutsPayout amounts from payment transactions by payout currency and date.
store_credit_summariesStore credit starting balance, ending balance, and net change by date and currency.
store_credit_transactionsCredited, debited, and expired store credit by event, source, customer, company, order, currency, and expiration date.

Use these schemas to understand stock quantities, location availability, adjustments, shipments, and transfers.

NameDescription
inventoryInventory 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_historyInventory quantity changes and adjustment counts by reason, state, app, staff member, and reference document.
inventory_by_locationInventory stock levels, net unit changes, days in stock or out of stock, days remaining, and value by location over time.
inventory_shipmentsShipped, received, accepted, and rejected quantities by carrier, tracking, status, and origin and destination.
inventory_transfersInventory transfer quantities and counts by item, origin, destination, app, and staff member.

Use these schemas to measure campaign performance and ad spend.

NameDescription
campaign_productsProduct quantities and average order quantities for orders attributed to marketing campaigns.
campaign_salesCampaign-attributed orders, sales, and average order value across first-click, last-click, last non-direct click, and linear attribution models.
campaign_sessionsCampaign-attributed online store visits, including page views, cart additions, checkout progress, and conversion rates.
marketing_engagementsEngagement, spend, order, and sales metrics reported by marketing channels for marketing events.
shop_campaign_insightsSales, customers, ad spend, customer acquisition cost, and return on ad spend from Shop Campaigns.

Use these schemas to analyze order operations, including fulfillment, shipping label costs, and profitability.

NameDescription
fulfillmentsFulfillment speed and volume from order placement through fulfillment, shipping handoff, and delivery.
profitabilityPer-order profitability before returns, including revenue, cost of goods sold, shipping costs, duties, import taxes, sales taxes, and fulfillment costs.
shipping_labelsShipping label counts and costs by carrier, service, origin, destination, package, and order.

Use these schemas to analyze sales, returns, discounts, taxes, and subscriptions.

NameDescription
discountsDiscounted order counts and discount amounts across product, order, shipping, and app-applied discounts.
returnsReturned item quantities by return status, reason, refund, return app, staff member, and line item.
salesCore sales metrics across channels, including revenue, orders, discounts, taxes, shipping, sales reversals, and customer type.
sales_taxesTax amounts applied to sales and returns by tax name, rate, location, sales channel, product, and order.
subscriptionsSubscription 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.

NameDescription
global_searchesGlobal catalog search requests by product, product variant, store, and time.
low_engagement_product_recommendationsLow-engagement product recommendations and their click-rate gap from the store's 30-day average.
product_recommendation_conversionsClick, cart-addition, and purchase conversion metrics for online store product recommendations.
search_conversionsClick, cart-addition, and purchase conversion metrics for online store search sessions.
search_queriesOnline store search query volume and result-click counts by query and click status.
searchesOnline store search query volume by query, intent, content type, and whether results were returned.
sessionsOnline store visits, page views, traffic sources, devices, visitor locations, cart additions, checkout progress, and conversion rates.
shop_post_purchase_offersCounts of customers who receive Shop post-purchase offers by discount code and time.
shop_product_impressionsProduct impression counts in the Shop channel by product and time.
shopify_formsViews, submissions, and conversion rates for Shopify Forms by form, page type, and product.
web_performanceOnline store page load, responsiveness, and visual stability metrics by page, device, browser, and storefront.

Was this page helpful?