Skip to main content

sales

The sales schema captures the primary sales data for revenue and sale line-item analysis. Each row records one event, and a single order can produce multiple rows if refunds or adjustments follow. It's the broadest sales source, connecting sale amounts and adjustments to orders, customers, products, variants, discounts, refunds, staff, billing, and POS context.


Counts and calculations that let you track key business indicators. Metrics show up as the columns when queried.

Metrics you can use when querying FROM sales.

Anchor to acceptable_fraud_risk_rate
acceptable_fraud_risk_rate

Percentage of orders marked as low or medium risk by Shopify's fraud analysis

Anchor to additional_fees
additional_fees

Additional fees associated with the given sale

Anchor to amount_spent_per_customer
amount_spent_per_customer

The average all-time spend for customers in your results, in your store's currency.

Anchor to average_order_value
average_order_value

The average amount per order before post-order adjustments, in your store's currency.

Average order value = (gross sales - discounts) / orders

Anchor to bundles_ordered
bundles_ordered

The number of bundles ordered before returned or reversed quantities are taken out. Use bundles_ordered to track bundle demand over time or by bundle_title.

Anchor to cost_of_goods_sold
cost_of_goods_sold

The direct cost of the products sold, such as manufacturing or purchase cost, in your store's currency. Use cost_of_goods_sold with gross_profit or gross_margin to evaluate profitability.

Anchor to customers
customers

Counts each customer one time within the selected sales, even if the customer placed more than one order.

Anchor to discount_reversals
discount_reversals

Discount values no longer applied when discounted products are removed from orders

Anchor to discounts
discounts

The amount taken off sales revenue through discounts, in your store's currency. Use discounts to track discounting over time or by groupings like discount_code.

Anchor to duties
duties

Customs duties or import tariffs associated with sales, in your store's currency. Use duties to report duty amounts over time or by destination fields like shipping_country.

Anchor to gift_card_discounts
gift_card_discounts

Discounts applied to gift card sales, in your store's currency. Values are negative amounts. Use gift_card_discounts to track reductions on gift card sales over time.

Anchor to gift_card_gross_sales
gift_card_gross_sales

Gift card sales revenue before discounts and returns are taken out, in your store's currency. Use gift_card_gross_sales to see top-line gift card revenue over time.

Anchor to gift_card_net_sales
gift_card_net_sales

Gift card sales revenue after discounts and returns are factored in, in your store's currency. Use gift_card_net_sales to measure gift card revenue net of those reductions.

Anchor to gift_card_taxes
gift_card_taxes

Taxes for sales of gift cards

Anchor to gross_margin
gross_margin

The share of sales kept as gross profit after cost of goods sold is factored in. Gross margin is based on sales where cost of goods sold is recorded.

Gross margin = gross profit / net sales

Anchor to gross_profit
gross_profit

Sales revenue after cost of goods sold is taken out, before other operating expenses, in your store's currency.

Gross profit = net sales - cost of goods sold

Anchor to gross_sales
gross_sales

Top-line sales revenue before discounts and returns are taken out, in your store's currency. Use gross_sales to see gross revenue over time or by a grouping like product or channel. It excludes taxes, shipping, duties, and fees.

Anchor to gross_sales_reversals
gross_sales_reversals

Value of items removed from orders before discounts and taxes

Anchor to high_fraud_risk_rate
high_fraud_risk_rate

The share of orders Shopify's fraud analysis marked as high risk, shown as a percentage. Use high_fraud_risk_rate to monitor risky orders over time or by groupings like sales_channel.

Anchor to line_item_discounts
line_item_discounts

Discounts applied to specific line items, in your store's currency. Use line_item_discounts to track product-level discounting over time or by product.

Anchor to net_items_sold
net_items_sold

The number of items sold after returned or reversed quantities are factored in. Use net_items_sold to track product movement over time or by product.

Anchor to net_sales
net_sales

Sales revenue after discounts and sales reversals, excluding taxes, shipping, duties, and fees, in your store's currency.

Net sales = gross sales - discounts - sales reversals

Anchor to net_sales_reversals
net_sales_reversals

Value of items removed from orders after discounts, before taxes

Net sales reversals = gross sales reversals + discount reversals

Anchor to net_sales_with_cost_recorded
net_sales_with_cost_recorded

Product net sales where cost of goods sold is recorded, in your store's currency. Use net_sales_with_cost_recorded to understand the revenue base used for profit measures.

Anchor to net_sales_without_cost_recorded
net_sales_without_cost_recorded

Product net sales where cost of goods sold isn't recorded, in your store's currency. Use net_sales_without_cost_recorded to find revenue missing cost data.

Anchor to new_customers
new_customers

The number of customers whose order in your results was their first purchase. Use new_customers to track customer acquisition over time or by groupings like sales_channel.

Anchor to number_of_orders_per_customer
number_of_orders_per_customer

The average lifetime number of orders placed by customers in your results. Use number_of_orders_per_customer to understand repeat purchase depth over time or by customer cohort.

Anchor to order_level_discounts
order_level_discounts

Discounts applied across the entire order, in your store's currency. Use order_level_discounts to track order-wide discounting over time or by discount fields.

Anchor to order_sale_agreements
order_sale_agreements

The number of order agreements that produced sale activity.

Anchor to orders
orders

Counts each order one time within the selected sales, even when the order contains multiple items.

Anchor to orders_first_time
orders_first_time

The number of orders placed by customers making their first purchase. Use orders_first_time to track first-purchase order volume over time.

Anchor to orders_returning
orders_returning

The number of orders placed by customers who had bought from you before. Use orders_returning to track repeat order volume over time.

Anchor to quantity_ordered
quantity_ordered

The number of items ordered before returned or reversed quantities are taken out. Use quantity_ordered to track ordered item volume over time or by product.

Anchor to quantity_ordered_per_order
quantity_ordered_per_order

The average number of items ordered per order before returned or reversed quantities are taken out. Use quantity_ordered_per_order to track typical basket size over time.

Anchor to rate_of_staff_assisted_sales
rate_of_staff_assisted_sales

The share of sales revenue assisted by a staff member, shown as a percentage. Use rate_of_staff_assisted_sales to understand how much revenue involves staff assistance over time or by retail location.

Anchor to return_fees
return_fees

Fees associated with returns, in your store's currency. Use return_fees to track return fee amounts over time or by return reason.

Anchor to returning_customer_rate
returning_customer_rate

The share of customers in your results who had bought from you before.

Returning customer rate = returning customers / customers

Anchor to returning_customers
returning_customers

The number of customers who placed an order after a previous purchase. Use returning_customers to track repeat customer activity over time or by grouping.

Anchor to reversed_quantity
reversed_quantity

Number of items removed from orders

Anchor to reversed_quantity_rate
reversed_quantity_rate

Percentage of items removed from orders out of total items sold

Anchor to sales_reversals
sales_reversals

Value removed from orders through refunds, returns, cancellations, or edits

Anchor to shipping_charge_discounts
shipping_charge_discounts

Discounts applied to shipping charges, in your store's currency. Use shipping_charge_discounts to track shipping discount amounts over time.

Anchor to shipping_charge_taxes
shipping_charge_taxes

Taxes charged on shipping, in your store's currency. Use shipping_charge_taxes to report shipping tax amounts over time or by destination.

Anchor to shipping_charges
shipping_charges

The amount customers spent on shipping before shipping discounts and shipping taxes are factored into total shipping, in your store's currency. Use shipping_charges to track shipping revenue over time.

Anchor to shipping_reversals
shipping_reversals

Shipping charges removed from orders

Anchor to tax_reversals
tax_reversals

Tax amounts removed from orders

Anchor to taxes
taxes

Taxes charged on sales, in your store's currency. Use taxes to report total tax amounts over time or by destination fields.

Anchor to taxes_excluding_gift_cards
taxes_excluding_gift_cards

Taxes charged on sales excluding taxes from gift card sales, in your store's currency. Use taxes_excluding_gift_cards when you want tax amounts without gift card tax included.

Customer gratuities added to sales, in your store's currency. Use tips to track tip amounts over time or by retail location.

Anchor to total_sales
total_sales

The full amount customers spent, including taxes, shipping, duties, and fees, in your store's currency.

Total sales = net sales + additional fees + duties + shipping charges + taxes

Anchor to total_sales_first_time
total_sales_first_time

The full amount spent by customers making their first purchase, in your store's currency. Use total_sales_first_time to track revenue from newly acquired customers over time or by channel.

Anchor to total_sales_returning
total_sales_returning

The full amount spent by customers who had bought from you before, in your store's currency. Use total_sales_returning to track repeat customer revenue over time or by channel.

Anchor to total_sales_reversals
total_sales_reversals

Total value removed from orders, including products, shipping, taxes, and fees

Total sales reversals = net sales reversals + shipping reversals + sale reversal fees + tax reversals

Anchor to total_shipping_charges
total_shipping_charges

The full shipping amount customers spent, in your store's currency. It reflects shipping charges after shipping discounts and shipping taxes are included. Use total_shipping_charges to track total shipping revenue over time.

Total shipping charges = shipping charges - shipping discounts + shipping taxes

Anchor to discounts_returned
discounts_returned

Discount values no longer applied when discounted products are removed from orders

Deprecated

Deprecated since 2026-07. Replaced by discount_reversals

Anchor to gross_returns
gross_returns

Value of items removed from orders before discounts and taxes

Deprecated

Deprecated since 2026-07. Replaced by gross_sales_reversals

Anchor to net_returns
net_returns

Value of items removed from orders after discounts, before taxes

Net returns = gross returns + discounts returned

Deprecated

Deprecated since 2026-07. Replaced by net_sales_reversals

Anchor to quantity_returned
quantity_returned

Number of items removed from orders

Deprecated

Deprecated since 2026-07. Replaced by reversed_quantity

Anchor to returned_quantity_rate
returned_quantity_rate

Percentage of items removed from orders out of total items sold

Deprecated

Deprecated since 2026-07. Replaced by reversed_quantity_rate

Anchor to returns
returns

Value removed from orders through refunds, returns, cancellations, or edits

Deprecated

Deprecated since 2026-07. Replaced by sales_reversals

Anchor to shipping_returned
shipping_returned

Shipping charges removed from orders

Deprecated

Deprecated since 2026-07. Replaced by shipping_reversals

Anchor to taxes_returned
taxes_returned

Tax amounts removed from orders

Deprecated

Deprecated since 2026-07. Replaced by tax_reversals

Anchor to total_returns
total_returns

Total value removed from orders, including products, shipping, taxes, and fees

Total returns = net returns + shipping returned + return fees + taxes returned

Deprecated

Deprecated since 2026-07. Replaced by total_sales_reversals


Attributes of your data that let you look more granularly at aspects of the data. Group and filter by dimensions to shape the rows your query returns.

Note

You can also group by or filter on custom metafields for customers, orders, products, and variants. Reference a metafield as <owner>.metafields.<namespace>.<key>, where <owner> is customer, order, product, or product_variant. To query a metafield, its definition must have the analyticsQueryable capability enabled. Learn more about metafields.

Dimensions you can use when querying FROM sales.

Anchor to agentic_sales_channel
agentic_sales_channel

The AI agent or assistant that directly helped facilitate the sale. Values are Google AI Mode and Gemini, Microsoft Copilot, and Shop.

Anchor to assisting_staff_id
assisting_staff_id

The unique Shopify identifier for the staff member who assisted with the retail sale. Use assisting_staff_id to filter to a specific staff member, or use it with assisting_staff_member_name to show readable labels.

Anchor to billing_address_id
billing_address_id

The unique Shopify identifier for the billing address on the order. Use billing_address_id to filter to a specific billing address, or use billing location fields for readable results.

Anchor to channel_id
channel_id

The unique Shopify identifier for the multi-channel app sales channel. Use channel_id to filter to a specific channel by its Shopify identifier.

Anchor to cost_is_recorded
cost_is_recorded

Whether cost of goods sold is recorded for the product sale. You can filter by cost_is_recorded to focus on sales with or without cost data. Values are true and false.

Anchor to customer_id
customer_id

The unique Shopify identifier for the customer on the sale. Use customer_id to break results down by customer, or use it with customer_name or customer_email to show readable labels.

The day a sale happened.

Anchor to day_of_week
day_of_week

The day of week a sale happened, with values Monday through Sunday.

Anchor to discount_line_id
discount_line_id

The unique Shopify identifier for the discount line on the sale. Use discount_line_id to filter to a specific discount application.

Anchor to excludes_post_order_adjustments
excludes_post_order_adjustments

Whether the sale reflects the original order state before adjustments made after the order was created. You can filter by excludes_post_order_adjustments when you want original order activity. Values are true and false.

The hour a sale happened.

Anchor to hour_of_day
hour_of_day

The hour of day a sale happened, with values 0 through 23.

Anchor to is_discounted_sale
is_discounted_sale

Whether the sale had a discount applied. You can filter by is_discounted_sale to separate discounted sales from full-price sales. Values are true and false.

Anchor to is_pos_sale
is_pos_sale

Whether the sale was made in person at a physical retail (POS) location. You can filter by is_pos_sale to separate in-store sales from other sales. Values are true and false.

Anchor to is_sale_adjustment
is_sale_adjustment

Whether the sale reflects an adjustment. You can filter by is_sale_adjustment to focus on adjustment activity. Values are true and false.

Anchor to is_sales_reversal
is_sales_reversal

Label specifying whether the transaction reverses a previous sale

Anchor to line_item_id
line_item_id

The unique Shopify identifier for the line item on the sale. Use line_item_id to filter to a specific item within an order.

Anchor to line_type
line_type

The kind of sales line represented, such as Product, Shipping, Duty, and Tip. You can group or filter by line_type to review sales amounts by line category.

Anchor to minute
minute

The minute a sale happened.

Anchor to month
month

The month a sale happened.

Anchor to month_of_year
month_of_year

The month of the year a sale happened, with values 1 through 12.

Anchor to months_since_first_purchase
months_since_first_purchase

The number of months between the customer's first order and this order, reported in your store's time zone. A value of -1 means this order is the customer's first order. You can group or filter by months_since_first_purchase to analyze customer repeat timing.

Anchor to new_or_returning_customer
new_or_returning_customer

Whether an order came from a customer's very first purchase (New) or a later one (Returning). You can filter or group by new_or_returning_customer to compare acquisition against repeat business. Values are New and Returning.

Anchor to order_id
order_id

The unique Shopify identifier for the order. Use order_id to filter to a specific order or break results down by order, or use it with order_name to show customer-facing labels.

Anchor to order_or_sales_reversal
order_or_sales_reversal

Label specifying whether the transaction adds or removes value from sales

Anchor to pos_location_id
pos_location_id

The unique Shopify identifier for the physical retail location. Use pos_location_id to filter to a specific POS location, or use it with pos_location_name to show readable labels.

Anchor to product_id
product_id

The unique Shopify identifier for the product, which can include multiple variants. Use product_id to filter to a specific product, or use it with product_title to show readable labels.

Anchor to product_variant_id
product_variant_id

The unique Shopify identifier for the product variant. Use product_variant_id to filter to a specific variant, or use it with product_variant_title or product_variant_sku to show readable labels.

Anchor to quarter
quarter

The quarter a sale happened.

Anchor to quarters_since_first_purchase
quarters_since_first_purchase

The number of quarters between the customer's first order and this order, reported in your store's time zone. A value of -1 means this order is the customer's first order. You can group or filter by quarters_since_first_purchase to analyze customer repeat timing.

Anchor to refund_id
refund_id

The unique Shopify identifier for the refund. Use refund_id to filter to a specific refund in sales and returns results.

Anchor to sale_id
sale_id

The unique Shopify identifier for the sale. Use sale_id to filter to a specific sale.

Anchor to sale_sales_channel_id
sale_sales_channel_id

The unique Shopify identifier for the sales channel where the sale happened. Use sale_sales_channel_id to filter to a specific sales channel when you need the identifier.

Anchor to sales_channel
sales_channel

Name of the sales channel where the customer made a purchase

Anchor to sales_line_item_group_id
sales_line_item_group_id

The unique Shopify identifier for the bundle connected to the sale. Use sales_line_item_group_id to filter to a specific bundle, or use it with bundle_title to show readable labels.

Anchor to second
second

The second a sale happened.

Anchor to shipping_address_id
shipping_address_id

The unique Shopify identifier for the shipping address on the order. Use shipping_address_id to filter to a specific shipping address, or use shipping location fields for readable results.

Anchor to shop_id
shop_id

The unique Shopify identifier for your store. Use shop_id with shop_name to show readable store labels.

Anchor to staff_id
staff_id

The unique Shopify identifier for the staff member associated with the order. Use staff_id to filter to a specific staff member, or use it with staff_member_name to show readable labels.

Anchor to subscription_or_one_time
subscription_or_one_time

Whether the product sale was a one-time purchase or a subscription purchase. You can group or filter by subscription_or_one_time to compare subscription and one-time sales. Values are One-time and Subscription.

The week a sale happened.

Anchor to week_of_year
week_of_year

The week of the year a sale happened, with values 1 through 53.

Anchor to weeks_since_first_purchase
weeks_since_first_purchase

The number of weeks between the customer's first order and this order, reported in your store's time zone. A value of -1 means this order is the customer's first order. You can group or filter by weeks_since_first_purchase to analyze customer repeat timing.

The year a sale happened.

Anchor to years_since_first_purchase
years_since_first_purchase

The number of years between the customer's first order and this order, reported in your store's time zone. A value of -1 means this order is the customer's first order. You can group or filter by years_since_first_purchase to analyze long-term repeat timing.

Anchor to assisting_staff_member_name
assisting_staff_member_name

Name of the staff member assisting with the retail sale

Anchor to shop_name
shop_name

Name of your store

Anchor to billing_city
billing_city

City of the billing address

Anchor to billing_company
billing_company

B2B customer associated with the billing address

Anchor to billing_country
billing_country

Country of the billing address (e.g., United States, Canada)

Anchor to billing_postal_code
billing_postal_code

Postal code of the billing address

Anchor to billing_region
billing_region

State or province of the billing address (e.g., California, Ontario)

Anchor to abandoned_checkout_date
abandoned_checkout_date

Date the customer most recently abandoned a cart

Anchor to customer_account_status
customer_account_status

The customer's account state, with values Declined, Disabled, Enabled, and Invited.

Anchor to customer_added_date
customer_added_date

The day the customer record was added, reported in your store's time zone.

Anchor to customer_created_by_app_id
customer_created_by_app_id

The Shopify identifier for the app that created the customer.

Anchor to customer_email
customer_email

Email address of the customer

Anchor to customer_email_domain
customer_email_domain

The part of the customer's email address after the @ symbol, such as gmail.com or your company's domain.

Anchor to customer_language
customer_language

Language associated with the customer

Anchor to customer_name
customer_name

Full name of the customer

Anchor to customer_email_subscription_status
customer_email_subscription_status

The customer's email marketing subscription state, with values such as Invalid, Not subscribed, Pending, and Subscribed.

Anchor to customer_cities
customer_cities
<>

All cities in the customer's history of addresses

Anchor to customer_countries
customer_countries
<>

All countries from the customer's address history. Values are country codes such as US, CA, GB, and AU.

Anchor to customer_regions
customer_regions
<>

All states or provinces from the customer's address history. Values are region codes such as US-CA, US-NY, CA-ON, and GB-ENG.

Anchor to customer_amount_spent
customer_amount_spent

The customer's all-time spend is shown in your store's currency.

Anchor to customer_last_order_date
customer_last_order_date

The day the customer most recently placed an order, reported in your store's time zone.

Anchor to customer_number_of_orders
customer_number_of_orders

Number of orders the customer has placed across all time

Anchor to first_order_sales_channel
first_order_sales_channel

The sales channel where the customer's first order was placed, shown as a channel name such as Online Store or POS.

Anchor to customer_cohort_month
customer_cohort_month

The month of the customer's first order, reported in your store's time zone.

Anchor to customer_cohort_quarter
customer_cohort_quarter

The quarter of the customer's first order, reported in your store's time zone.

Anchor to customer_cohort_week
customer_cohort_week

The week of the customer's first order, reported in your store's time zone.

Anchor to customer_first_order_date
customer_first_order_date

The day the customer placed their first order, reported in your store's time zone.

Anchor to first_order_referring_channel
first_order_referring_channel

Referring channel associated with the customer's first order

Anchor to first_order_traffic_type
first_order_traffic_type

Type of traffic associated with the customer's first order

Anchor to first_order_has_subscription
first_order_has_subscription

Whether the customer's first order included a subscription purchase, with values true and false.

Anchor to first_order_products
first_order_products
<>

Products bought together in the customer's first order

Anchor to predicted_spend_tier
predicted_spend_tier

The customer's predicted spend tier for the next year, with values Low, Medium, and High.

Anchor to customer_sms_subscription_status
customer_sms_subscription_status

The customer's SMS marketing subscription state, with values such as Not subscribed, Pending, Redacted, and Subscribed.

Anchor to customer_tag
customer_tag

Tag associated with the customer

Anchor to customer_tags
customer_tags
<>

Set of tags associated with the customer

Anchor to rfm_group
rfm_group

A customer relationship label based on recency, frequency, and monetary spend. Values include Champions, Loyal, Needs attention, and At risk.

Anchor to discount_class
discount_class

What the discount applies to, with values Order, Shipping, and Product.

Anchor to discount_code
discount_code

Promotional code entered by customer or applied automatically to receive the discount

Anchor to discount_id
discount_id

The unique Shopify identifier for the discount. Use discount_id with discount_name to show readable labels.

Anchor to discount_method
discount_method

How the discount was triggered, with values Automatic, Manual, Discount code, and Script.

Anchor to discount_name
discount_name

The code or title used to identify the discount.

Anchor to discount_shipping_price
discount_shipping_price

The shipping cost before the shipping discount was applied, in your store's currency.

Anchor to discount_shipping_title
discount_shipping_title

Display name of the shipping discount when it was applied

Anchor to discount_title
discount_title

Title of the discount when it was applied

Anchor to discount_type
discount_type

Whether the discount reduces the price by a fixed amount or a percentage, with values Fixed amount and Percentage.

Anchor to discount_value
discount_value

The amount discounted, in your store's currency.

Anchor to price_rule_discount_title
price_rule_discount_title

Title of the discount attached to a price rule when it was applied

Anchor to price_rule_discount_type
price_rule_discount_type

The price rule's discount type, with values Fixed amount, Percentage, and App. App is used for discounts created by third-party Shopify apps.

Anchor to price_rule_discount_value
price_rule_discount_value

The discount amount based on a price rule, in your store's currency.

Anchor to price_rule_type
price_rule_type

The price rule's discount type and activation method. Values include Fixed amount (code), Percentage (automatic), Shipping (code), and Buy X Get Y (automatic).

Anchor to product_title_at_time_of_sale
product_title_at_time_of_sale

The product name as it appeared when the item was sold.

Anchor to product_type_at_time_of_sale
product_type_at_time_of_sale

The product type or category assigned when the item was sold.

Anchor to product_variant_compare_at_price
product_variant_compare_at_price

The compare-at price of the product variant when the item was sold, in your store's currency.

Anchor to product_variant_price
product_variant_price

The price of the product variant when the item was sold, in your store's currency.

Anchor to product_variant_sku_at_time_of_sale
product_variant_sku_at_time_of_sale

The SKU of the product variant when the item was sold.

Anchor to product_variant_title_at_time_of_sale
product_variant_title_at_time_of_sale

The variant name as it appeared when the item was sold.

Anchor to product_vendor_at_time_of_sale
product_vendor_at_time_of_sale

The vendor assigned to the product when the item was sold.

Anchor to collective_supplier
collective_supplier

Supplier of the product sourced through Shopify Collective

Anchor to is_b2b_order
is_b2b_order

Whether the order is a B2B order, with values true and false.

Anchor to is_canceled_order
is_canceled_order

Whether the order is canceled, with values true and false.

Anchor to order_checkout_currency
order_checkout_currency

The currency the buyer saw at checkout when placing the order. Values are currency codes such as USD, CAD, EUR, and GBP.

Anchor to order_fulfillment_status
order_fulfillment_status

The order's fulfillment state, with values Fulfilled, Partial, Restocked, and Unfulfilled.

Anchor to order_includes_duties
order_includes_duties

Whether the order includes duties, with values true and false.

Anchor to order_name
order_name

The name or number of the order as the customer sees it.

Anchor to order_payment_status
order_payment_status

The order's payment state, such as Authorized, Paid, Partially refunded, or Pending.

Anchor to order_sales_channel
order_sales_channel

The sales channel where the order was placed, shown as a channel name such as Online Store or POS.

Anchor to order_sales_channel_id
order_sales_channel_id

The unique Shopify identifier for the order's sales channel. Use order_sales_channel_id with order_sales_channel to show readable channel labels.

Anchor to is_shop_referral_order
is_shop_referral_order

Whether the order was referred from the Shop app or shop.app, with values true and false.

Anchor to order_landing_page_path
order_landing_page_path

Path of the first page of the user session that resulted in the order

Anchor to order_landing_page_url
order_landing_page_url

First page of the user session that resulted in the order

Anchor to order_marketing_event_id
order_marketing_event_id

Shopify identifier for the marketing event associated with the order

Anchor to order_referrer_domain
order_referrer_domain

Domain of the site that led to the order

Anchor to order_referrer_name
order_referrer_name

The readable name of the site that led to the order.

Anchor to order_referrer_path
order_referrer_path

Path of the site that led to the order

Anchor to order_referrer_site
order_referrer_site

Site that led to the order

Anchor to order_referrer_source
order_referrer_source

The referrer type that led to the order, such as organic or email.

Anchor to order_referrer_url
order_referrer_url

External page that referred a customer and led to the order

Anchor to order_utm_campaign
order_utm_campaign

UTM name of the campaign associated with the order

Anchor to order_utm_content
order_utm_content

The UTM content value associated with the order, often used to distinguish ads, links, or content variations.

Anchor to order_utm_medium
order_utm_medium

The UTM medium associated with the order, such as email, social, or paid search.

Anchor to order_utm_source
order_utm_source

The UTM source associated with the order, such as Google, Facebook, or a newsletter.

Anchor to order_utm_term
order_utm_term

The UTM term associated with the order, often used for paid search keywords or other tracked terms.

Anchor to number_of_products_bought_together
number_of_products_bought_together

Total unique products in the same order

Anchor to number_of_variants_bought_together
number_of_variants_bought_together

The number of unique product variants in the same order, with each SKU counted a single time.

Anchor to products_bought_together
products_bought_together
<>

The product names that appear in the same order.

Anchor to products_bought_together_ids
products_bought_together_ids
<>

The Shopify product identifiers for products in the same order.

Anchor to variants_bought_together
variants_bought_together
<>

The product variant labels that appear in the same order, such as size, color, or style combinations.

Anchor to company_id
company_id

The unique Shopify identifier for the company. Use company_id with company_name to show readable company labels.

Anchor to company_name
company_name

Name of the company that placed the order

Anchor to company_location_id
company_location_id

The unique Shopify identifier for the company location. Use company_location_id with company_location_name to show readable company location labels.

Anchor to company_location_name
company_location_name

The company location or branch that placed the order

Anchor to referring_channel
referring_channel

Marketing channel that referred the customer to place the order

Anchor to referring_medium
referring_medium

The marketing medium that referred the customer to place the order, such as email, social, or search.

Anchor to referring_platform
referring_platform

The marketing platform that referred the customer to place the order, such as Google, Facebook, or Instagram.

Anchor to traffic_type
traffic_type

The type of traffic that led to the order, such as organic, paid, or direct.

Anchor to order_marketing_event_target
order_marketing_event_target

The platform or channel where the marketing activity was deployed, such as Email, Facebook, Google, or Instagram.

Anchor to order_marketing_event_type
order_marketing_event_type

The type of marketing activity that led to the order, such as Ad, Affiliate, Newsletter, or Retargeting. PLA means Product Listing Ads, and SEO means Search Engine Optimization.

Anchor to market
market

Market you've defined in Shopify, like a geographical market or customer group

Anchor to markets
markets
<>

Markets or customer segments associated with the order

Anchor to order_cancellation_reason
order_cancellation_reason

The reason specified for the order cancellation, such as Customer, Other, Fraud, or Inventory.

Anchor to order_risk_level
order_risk_level

The fraud risk level Shopify assigned to the order, with values Low, Medium, High, None, and Pending.

Anchor to order_is_shopify_protect_covered
order_is_shopify_protect_covered

Whether the order has met Shopify Protect fulfillment requirements, including proper shipping and tracking, with values true and false.

Anchor to order_is_shopify_protect_eligible
order_is_shopify_protect_eligible

Whether the order qualifies for Shopify Protect, with values true and false.

Anchor to order_is_shopify_protect_protected
order_is_shopify_protect_protected

Whether the order has full Shopify Protect coverage against fraud, with values true and false.

Anchor to order_tag
order_tag

Tag associated with the order

Anchor to order_tags
order_tags
<>

Set of tags associated with the order

Anchor to rollout_id
rollout_id

Unique identifier for the rollout or feature flag exposed to the order

Anchor to rollout_ids
rollout_ids
<>

All rollout or feature flag identifiers exposed to the order.

Anchor to rollout_treatment_id
rollout_treatment_id

Unique identifier for the specific treatment exposed to the order

Anchor to rollout_treatment_ids
rollout_treatment_ids
<>

Array of all treatment identifiers exposed to the order

Anchor to agentic_referring_channel
agentic_referring_channel

The AI agent or assistant that referred the session to your online store, with values ChatGPT, Google AI Mode and Gemini, Microsoft Copilot, and Shop.

Anchor to channel_handle
channel_handle

Name of the marketing channel or platform that drove the marketing engagement

Anchor to marketing_activity_id
marketing_activity_id

The unique Shopify identifier for the marketing activity. Use marketing_activity_id with marketing_activity_title to show readable activity labels.

Anchor to marketing_activity_status
marketing_activity_status

Current status of the marketing activity (such as Active or Paused)

Anchor to marketing_activity_title
marketing_activity_title

Name of the marketing activity

Anchor to marketing_activity_url_parameter_key
marketing_activity_url_parameter_key

URL parameter key for the marketing activity

Anchor to marketing_activity_url_parameter_value
marketing_activity_url_parameter_value

URL parameter value for the marketing activity

Anchor to marketing_automation_id
marketing_automation_id

Unique ID that Shopify uses to identify the marketing automation

Anchor to marketing_delivery_channel
marketing_delivery_channel

Channel through which the marketing activity is delivered

Anchor to marketing_event_id
marketing_event_id

Unique identifier for the associated marketing event

Anchor to marketing_platform
marketing_platform

The marketing platform that created the marketing activity, shown as a platform name.

Anchor to page_host
page_host

The host name of the session landing page.

Anchor to page_path
page_path

The path of the session landing page.

Anchor to page_url
page_url

The URL of the first page viewed in the session.

Anchor to referrer_url
referrer_url

External page that led to an online store session

Anchor to utm_campaign
utm_campaign

UTM name of the campaign associated with the session

Anchor to utm_content
utm_content

The UTM content value associated with the session, often used to distinguish ads, links, or content variations.

Anchor to utm_medium
utm_medium

The UTM medium associated with the session, such as email, social, or paid search.

Anchor to utm_source
utm_source

The UTM source associated with the session, such as Google, Facebook, or a newsletter.

Anchor to utm_term
utm_term

The UTM term associated with the session, often used for paid search keywords or other tracked terms.

Anchor to pos_location_name
pos_location_name

Name of your physical retail location

Anchor to product_status
product_status

The product's current publishing state, with values Active, Archived, Draft, Suspended, and Unlisted.

Anchor to product_title
product_title

Display name of the product that your customers see

Anchor to product_type
product_type

Type (category) that you've assigned to the product

Anchor to product_vendor
product_vendor

Vendor of the product

Anchor to product_collection
product_collection

Collection associated with the product

Anchor to product_collections
product_collections
<>

Set of collections associated with the product

Anchor to app_product_creation
app_product_creation

The app that created the product, shown as an app name.

Anchor to product_tag
product_tag

Tag associated with the product

Anchor to product_tags
product_tags
<>

Set of tags associated with the product

Anchor to product_variant_abc_grade
product_variant_abc_grade

The ABC grade assigned to the product variant based on its share of revenue. A-grade variants account for about 80% of revenue, B-grade for 15%, and C-grade for 5%.

Anchor to product_variant_sku
product_variant_sku

SKU of the product variant

Anchor to product_variant_title
product_variant_title

Display name of the product variant

Anchor to is_unverified_return
is_unverified_return

Whether the return is unverified, with values true and false.

Anchor to return_reason
return_reason

The reason the item was returned, such as Changed my mind, Damaged or defective, Too big, or Received the wrong item.

Anchor to bundle_product_id
bundle_product_id

The unique Shopify identifier for the bundle product. Use bundle_product_id with bundle_title to show readable bundle labels.

Anchor to bundle_title
bundle_title

The bundle name as it appeared when the bundle was created.

Anchor to line_item_is_bundle
line_item_is_bundle

Whether the line item is a bundle, with values true and false.

Anchor to shipping_city
shipping_city

City of the shipping address

Anchor to shipping_company
shipping_company

Company of the shipping address

Anchor to shipping_country
shipping_country

Country of the shipping address (e.g., United States, Canada)

Anchor to shipping_postal_code
shipping_postal_code

Postal code of the shipping address

Anchor to shipping_region
shipping_region

State or province of the shipping address (e.g., California, Ontario)

Anchor to staff_member_name
staff_member_name

Name of the staff member associated with the order

Anchor to is_return_related
is_return_related

Label specifying whether the transaction reverses a previous sale

Anchor to order_or_return
order_or_return

Label specifying whether the transaction adds or removes value from sales

Deprecated

Deprecated since 2026-07. Replaced by order_or_sales_reversal


Use these expressions inside a MATCHES filter to keep sales rows that have at least one related record matching the parameters. Each parameter filters on a dimension or metric of the related records.

Anchor to customer.orders_placed
customer.orders_placed

Orders the customer placed, filterable by order date, source app, location, order count, and spend.

Anchor to customer.products_purchased
customer.products_purchased

Products the customer bought, filterable by product ID, purchase date, quantity per order, and total quantity.

Anchor to customer.shopify_email.bounced
customer.shopify_email.bounced

Emails that bounced for the customer, filterable by marketing activity, bounce date, and bounce count.

Anchor to customer.shopify_email.clicked
customer.shopify_email.clicked

Emails the customer clicked, filterable by marketing activity, click date, and click count.

Anchor to customer.shopify_email.delivered
customer.shopify_email.delivered

Emails delivered to the customer, filterable by marketing activity, delivery date, and delivery count.

Anchor to customer.shopify_email.marked_as_spam
customer.shopify_email.marked_as_spam

Emails the customer marked as spam, filterable by marketing activity, spam-report date, and spam-report count.

Anchor to customer.shopify_email.opened
customer.shopify_email.opened

Emails the customer opened, filterable by marketing activity, open date, and open count.

Anchor to customer.shopify_email.unsubscribed
customer.shopify_email.unsubscribed

Email unsubscribe events for the customer, filterable by marketing activity, unsubscribe date, and unsubscribe count.

Anchor to customer.store_credit_accounts
customer.store_credit_accounts

Store credit accounts for the customer, filterable by balance, currency, expiry date, and most recent credit date.

Anchor to customer.storefront_event.collection_viewed
customer.storefront_event.collection_viewed

Collection pages the customer viewed, filterable by collection ID, view date, and view count.

Anchor to customer.storefront_event.product_viewed
customer.storefront_event.product_viewed

Product pages the customer viewed, filterable by product ID, view date, and view count.

Anchor to customer.within_distance
customer.within_distance

Customers with an address within a distance of a location, filterable by coordinates and radius.


  • profitability: Pairs revenue with landed cost for margin and profit per order, not just top-line sales.
  • payments: Drops to the transaction level for payout reconciliation, payment method comparison, and fee analysis.
  • campaign_sales: Attributes sales back to marketing campaigns to measure acquisition spend against revenue.

Was this page helpful?