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
| Field | Type | Role | Description |
|---|---|---|---|
discount_name | string | dimension | The discount's code if it has one, otherwise its title — Shopify groups both under this one column. |
discount_method | string | dimension | How the discount was triggered — a code the customer entered, an automatic rule, a manual edit, or a script. |
discount_type | string | dimension | Whether the discount took a percentage off or a fixed amount. |
discount_class | string | dimension | What the discount was aimed at — specific products, the whole order, or nothing in particular for a manual edit. |
order_name | string | dimension | The order number the discounted line belongs to. |
order_or_sales_reversal | string | dimension | Whether the row is a sale or a reversal. |
reason | string | dimension | Why the sale line exists — ORDER for the original sale, ORDER_EDIT for order-edit additions, RETURN or REFUND for reversals. |
cancelled | boolean | dimension | Whether the order carrying the discount was cancelled. |
applied_discounts | money | metric | Discount 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_amount | money | metric | Discount money taken off the sale by this discount, as a positive number. |
discounted_orders | number | metric | Distinct 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_sales | money | metric | Line item price times quantity, before discounts, returns and taxes — for discounted lines only. |
net_sales | money | metric | Gross sales minus discounts and returns — for discounted lines only. |
total_sales | money | metric | Net sales plus taxes and shipping — for discounted lines only. |
discounts | money | metric | The 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_reversals | money | metric | Value of items removed from orders — returns, cancellations and order edits — before discounts and taxes. |
taxes | money | metric | Total tax on the discounted line. |
shipping_charges | money | metric | Amount customers spent on shipping. |
store | string | dimension | The shop the record belongs to. Filter with WHERE store IN ('Shop name') or GROUP BY store. |
store_id | string | dimension | The shop's raw identifier — what an export or the API reports. Same shops as Store, shown as ids. |
store_domain | string | dimension | The shop's myshopify.com domain. Filter with WHERE store_domain = 'shop.myshopify.com'. |