Sales by discount

Sales attributed to the discounts that touched them, at discount grain — a line carrying two discounts appears under both. Covers DISCOUNTED sales only, so its sales totals are the discounted subset rather than the store's.

21 fields — 11 dimensions, 10 metrics. Date clauses (SINCE, UNTIL, DURING) use createdAt.

The live, authoritative list is always GET /v1/datasets — this page is regenerated from the same catalog, but the endpoint reflects exactly what is deployed.

Query it

FROM sales_discounts
  SHOW applied_discounts
  GROUP BY discount_name
  SINCE -30d

See Querying with SoloQL for the language.

This dataset is queryable through SoloQL; it has no record-retrieval endpoint.

Fields

FieldTypeRoleDescription
discount_namestringdimensionThe discount's code if it has one, otherwise its title — Shopify groups both under this one column.
discount_methodstringdimensionHow the discount was triggered — a code the customer entered, an automatic rule, a manual edit, or a script.
discount_typestringdimensionWhether the discount took a percentage off or a fixed amount.
discount_classstringdimensionWhat the discount was aimed at — specific products, the whole order, or nothing in particular for a manual edit.
order_namestringdimensionThe order number the discounted line belongs to.
order_or_sales_reversalstringdimensionWhether the row is a sale or a reversal.
reasonstringdimensionWhy the sale line exists — ORDER for the original sale, ORDER_EDIT for order-edit additions, RETURN or REFUND for reversals.
cancelledbooleandimensionWhether the order carrying the discount was cancelled.
applied_discountsmoneymetricDiscount money taken off the sale by THIS discount, shown negative the way Shopify shows it. A line carrying two discounts splits its discount between them.
applied_discount_amountmoneymetricDiscount money taken off the sale by this discount, as a positive number.
discounted_ordersnumbermetricDistinct orders this discount was applied to. An order carrying two discounts counts under both, so these do not sum to the store's order count.
gross_salesmoneymetricLine item price times quantity, before discounts, returns and taxes — for discounted lines only.
net_salesmoneymetricGross sales minus discounts and returns — for discounted lines only.
total_salesmoneymetricNet sales plus taxes and shipping — for discounted lines only.
discountsmoneymetricThe LINE's total discount, all applications together. Differs from applied_discounts on a line carrying more than one discount, where that column splits the same money per discount.
sales_reversalsmoneymetricValue of items removed from orders — returns, cancellations and order edits — before discounts and taxes.
taxesmoneymetricTotal tax on the discounted line.
shipping_chargesmoneymetricAmount customers spent on shipping.
storestringdimensionThe shop the record belongs to. Filter with WHERE store IN ('Shop name') or GROUP BY store.
store_idstringdimensionThe shop's raw identifier — what an export or the API reports. Same shops as Store, shown as ids.
store_domainstringdimensionThe shop's myshopify.com domain. Filter with WHERE store_domain = 'shop.myshopify.com'.