---
title: sales_taxes
description: >-
  Reference for the ShopifyQL `sales_taxes` table. Every metric and dimension,
  paired with worked example queries.
api_version: 2026-07
source_url:
  html: >-
    https://shopify.dev/docs/api/shopifyql/latest/schemas/sales_revenue/sales_taxes
  md: >-
    https://shopify.dev/docs/api/shopifyql/latest/schemas/sales_revenue/sales_taxes.md
api_name: shopifyql
---

# sales\_​taxes

The `sales_taxes` [schema](https://shopify.dev/docs/api/shopifyql/latest/schemas) captures tax amounts applied to sales lines. It's best used when your reporting needs sale, order, product, channel, POS, address, staff, or line-type context.

### Use cases

* **Tax by line type**: Group [`sales_taxes`](#salestaxesmetric-propertydetail-salestaxes) by [`line_type`](#salestaxesdimension-propertydetail-linetype) to split tax across products, shipping, and other line types.
* **Managed Markets**: Compare [`sales_taxes`](#salestaxesmetric-propertydetail-salestaxes) and [`managed_markets_taxes`](#salestaxesmetric-propertydetail-managedmarketstaxes) by month to separate domestic tax from tax collected on cross-border Managed Markets orders.
* **Channel and product**: Break down tax amounts by [`sales_channel`](#salestaxesdimension-propertydetail-saleschannel), [`pos_location_id`](#salestaxesdimension-propertydetail-poslocationid), or [`product_id`](#salestaxesdimension-propertydetail-productid) to see where your tax liability comes from.
* **Address context**: Use [`billing_address_id`](#salestaxesdimension-propertydetail-billingaddressid) and [`shipping_address_id`](#salestaxesdimension-propertydetail-shippingaddressid) when connecting tax records to address-level context.

Examples

### Examples

* ####

  ##### Description

  Rank the top 50 country and sales-channel pairs by \`sales\_taxes\` last quarter. This example uses \[\`WITH GROUP\_TOTALS\`]\(/docs/api/shopifyql/latest/syntax/with#group-total-columns) to add a per-country subtotal across channels.

  ##### ShopifyQL

  ```shopifyql
  FROM sales_taxes
    SHOW sales_taxes
    WHERE filed_by_channel = 'filed'
    GROUP BY tax_country, sales_channel WITH TOTALS, GROUP_TOTALS
    DURING last_quarter
    ORDER BY sales_taxes DESC
    LIMIT 50
  VISUALIZE sales_taxes TYPE stacked_bar
  ```

* ####

  ##### Description

  Track \`sales\_taxes\` by sales channel as a monthly stacked area over the last 12 months. This example adds \[\`GROUP\_TOTALS\`]\(/docs/api/shopifyql/latest/syntax/with#group-total-columns) to return a \`sales\_taxes\_\_month\_totals\` column beside the per-channel bands, summing each month's tax across all channels.

  ##### ShopifyQL

  ```shopifyql
  FROM sales_taxes
    SHOW sales_taxes
    GROUP BY sales_channel WITH GROUP_TOTALS
    TIMESERIES month
    SINCE startOfMonth(-12m) UNTIL today
    ORDER BY month ASC
  VISUALIZE sales_taxes TYPE stacked_area
  ```

* ####

  ##### Description

  Track weekly \`sales\_taxes\` across this quarter, each week compared to the quarter before. This example uses \[\`COMPARE TO previous\_period\`]\(/docs/api/shopifyql/latest/syntax/compare-to) to benchmark your date range against the equal-length period right before it.

  ##### ShopifyQL

  ```shopifyql
  FROM sales_taxes
    SHOW sales_taxes
    TIMESERIES week WITH PERCENT_CHANGE
    DURING this_quarter
    COMPARE TO previous_period
    ORDER BY week ASC
  VISUALIZE sales_taxes TYPE bar
  ```

***

## Metrics

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_taxes`.

* **managed\_​markets\_​taxes**

  **MONEY**

  Sales taxes collected from Global-e when Global-e buys from you and sells to customers, in your store's currency.

* **sales\_​taxes**

  **MONEY**

  The amount of tax applied to sales, in your store's currency. Use [`sales_taxes`](#salestaxesmetric-propertydetail-salestaxes) to report tax amounts over time or by location, tax name, or sales channel.

### MONEY

A monetary amount representing currency values such as prices, revenue, costs, and discounts.

```ts
```

***

## Dimensions

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.

Dimensions you can use when querying `FROM sales_taxes`.

* **billing\_​address\_​id**

  **IDENTITY**

  The unique Shopify identifier for the billing address. Use [`billing_address_id`](#salestaxesdimension-propertydetail-billingaddressid) with [`billing_city`](#salestaxesdimension-propertydetail-billingcity), [`billing_region`](#salestaxesdimension-propertydetail-billingregion), or [`billing_country`](#salestaxesdimension-propertydetail-billingcountry) to show readable billing address details.

* **day**

  **DAY\_TIMESTAMP**

  The day a tax was applied to a sale.

* **day\_​of\_​week**

  **DAY\_OF\_WEEK**

  The weekday a tax was applied to a sale, with values Monday through Sunday.

* **filed\_​by\_​channel**

  **STRING**

  Whether the sales channel filed taxes for the transaction, with values Filed, Not filed, and Unspecified.

* **hour**

  **HOUR\_TIMESTAMP**

  The hour a tax was applied to a sale.

* **hour\_​of\_​day**

  **HOUR\_OF\_DAY**

  The hour of day a tax was applied to a sale, with values 0 through 23.

* **line\_​item\_​id**

  **IDENTITY**

  The unique Shopify identifier for the line item that the tax is tied to. Use [`line_item_id`](#salestaxesdimension-propertydetail-lineitemid) to filter taxes for a specific item on an order.

* **line\_​type**

  **STRING**

  The kind of sales charge the tax applies to, such as Product, Shipping, Duty, or Additional fee.

* **merchant\_​of\_​record\_​country**

  **STRING**

  The country where the merchant of record bought your products before selling them to customers

* **merchant\_​of\_​record\_​region**

  **STRING**

  The region where the merchant of record bought your products before selling them to customers

* **minute**

  **MINUTE\_TIMESTAMP**

  The minute a tax was applied to a sale.

* **month**

  **MONTH\_TIMESTAMP**

  The month a tax was applied to a sale.

* **month\_​of\_​year**

  **MONTH\_OF\_YEAR**

  The month of year a tax was applied to a sale, with values 1 through 12.

* **order\_​id**

  **IDENTITY**

  The unique Shopify identifier for the order that the tax belongs to. Use [`order_id`](#salestaxesdimension-propertydetail-orderid) to filter to a specific order or break tax results down by order.

* **order\_​or\_​sales\_​reversal**

  **STRING**

  Label specifying whether the transaction adds or removes value from sales

* **pos\_​location\_​id**

  **IDENTITY**

  The unique Shopify identifier for your physical retail location. Use [`pos_location_id`](#salestaxesdimension-propertydetail-poslocationid) to filter tax results for a specific POS location.

* **product\_​id**

  **IDENTITY**

  The unique Shopify identifier for the product on the taxed line. Use [`product_id`](#salestaxesdimension-propertydetail-productid) to filter to a specific product or break tax results down by product.

* **product\_​variant\_​id**

  **IDENTITY**

  The unique Shopify identifier for the product variant on the taxed line. Use [`product_variant_id`](#salestaxesdimension-propertydetail-productvariantid) to filter to a specific variant or break tax results down by variant.

* **quarter**

  **QUARTER\_TIMESTAMP**

  The quarter a tax was applied to a sale.

* **sale\_​sales\_​channel\_​id**

  **IDENTITY**

  The unique Shopify identifier for the sales channel where the sale happened. Use [`sale_sales_channel_id`](#salestaxesdimension-propertydetail-salesaleschannelid) to filter to a specific sales channel when you know its identifier.

* **sales\_​channel**

  **STRING**

  Name of the sales channel where the customer made a purchase

* **sales\_​tax\_​id**

  **IDENTITY**

  The unique Shopify identifier for the sales tax entry. Use [`sales_tax_id`](#salestaxesdimension-propertydetail-salestaxid) to filter to a specific tax entry.

* **second**

  **SECOND\_TIMESTAMP**

  The second a tax was applied to a sale.

* **shipping\_​address\_​id**

  **IDENTITY**

  The unique Shopify identifier for the shipping address. Use [`shipping_address_id`](#salestaxesdimension-propertydetail-shippingaddressid) with [`shipping_city`](#salestaxesdimension-propertydetail-shippingcity), [`shipping_region`](#salestaxesdimension-propertydetail-shippingregion), or [`shipping_country`](#salestaxesdimension-propertydetail-shippingcountry) to show readable shipping address details.

* **shop\_​id**

  **IDENTITY**

  The unique Shopify identifier for your store. Use [`shop_id`](#salestaxesdimension-propertydetail-shopid) with [`shop_name`](#salestaxesdimension-propertydetail-shopname) to show readable store labels.

* **staff\_​id**

  **IDENTITY**

  The unique Shopify identifier for the staff member associated with the order. Use [`staff_id`](#salestaxesdimension-propertydetail-staffid) to filter taxes tied to a specific staff member.

* **tax\_​city**

  **STRING**

  The city where the tax was applied. Use [`tax_city`](#salestaxesdimension-propertydetail-taxcity) to review sales taxes by tax location.

* **tax\_​country**

  **STRING**

  The country used as the tax location for the sale.

* **tax\_​name**

  **STRING**

  The name of the tax applied to the sale. Use [`tax_name`](#salestaxesdimension-propertydetail-taxname) to review amounts for specific taxes, such as a regional sales tax or value added tax.

* **tax\_​rate**

  **PERCENT**

  The rate used for the tax, shown as a percentage. Use [`tax_rate`](#salestaxesdimension-propertydetail-taxrate) to group or filter taxes by the rate applied.

* **tax\_​region**

  **STRING**

  The state, province, or region where the tax was applied. Use [`tax_region`](#salestaxesdimension-propertydetail-taxregion) to review sales taxes by tax region.

* **week**

  **WEEK\_TIMESTAMP**

  The week a tax was applied to a sale.

* **week\_​of\_​year**

  **WEEK\_OF\_YEAR**

  The week of year a tax was applied to a sale, with values 1 through 53.

* **year**

  **YEAR\_TIMESTAMP**

  The year a tax was applied to a sale.

* **billing\_​city**

  **STRING**

  City of the billing address

* **billing\_​company**

  **STRING**

  B2B customer associated with the billing address

* **billing\_​country**

  **STRING**

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

* **billing\_​postal\_​code**

  **STRING**

  Postal code of the billing address

* **billing\_​region**

  **STRING**

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

* **shop\_​name**

  **STRING**

  Name of your store

* **product\_​title\_​at\_​time\_​of\_​sale**

  **STRING**

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

* **product\_​type\_​at\_​time\_​of\_​sale**

  **STRING**

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

* **product\_​variant\_​compare\_​at\_​price**

  **MONEY**

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

* **product\_​variant\_​price**

  **MONEY**

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

* **product\_​variant\_​sku\_​at\_​time\_​of\_​sale**

  **STRING**

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

* **product\_​variant\_​title\_​at\_​time\_​of\_​sale**

  **STRING**

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

* **product\_​vendor\_​at\_​time\_​of\_​sale**

  **STRING**

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

* **is\_​b2b\_​order**

  **BOOLEAN**

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

* **is\_​canceled\_​order**

  **BOOLEAN**

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

* **order\_​checkout\_​currency**

  **STRING**

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

* **order\_​fulfillment\_​status**

  **STRING**

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

* **order\_​includes\_​duties**

  **BOOLEAN**

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

* **order\_​name**

  **STRING**

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

* **order\_​payment\_​status**

  **STRING**

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

* **order\_​sales\_​channel**

  **STRING**

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

* **order\_​sales\_​channel\_​id**

  **IDENTITY**

  The unique Shopify identifier for the order's sales channel. Use [`order_sales_channel_id`](#salestaxesdimension-propertydetail-ordersaleschannelid) with [`order_sales_channel`](#salestaxesdimension-propertydetail-ordersaleschannel) to show readable channel labels.

* **is\_​shop\_​referral\_​order**

  **BOOLEAN**

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

* **order\_​landing\_​page\_​path**

  **STRING**

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

* **order\_​landing\_​page\_​url**

  **STRING**

  First page of the user session that resulted in the order

* **order\_​marketing\_​event\_​id**

  **IDENTITY**

  Shopify identifier for the marketing event associated with the order

* **order\_​referrer\_​domain**

  **STRING**

  Domain of the site that led to the order

* **order\_​referrer\_​name**

  **STRING**

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

* **order\_​referrer\_​path**

  **STRING**

  Path of the site that led to the order

* **order\_​referrer\_​site**

  **STRING**

  Site that led to the order

* **order\_​referrer\_​source**

  **STRING**

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

* **order\_​referrer\_​url**

  **STRING**

  External page that referred a customer and led to the order

* **order\_​utm\_​campaign**

  **STRING**

  UTM name of the campaign associated with the order

* **order\_​utm\_​content**

  **STRING**

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

* **order\_​utm\_​medium**

  **STRING**

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

* **order\_​utm\_​source**

  **STRING**

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

* **order\_​utm\_​term**

  **STRING**

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

* **number\_​of\_​products\_​bought\_​together**

  **INTEGER**

  Total unique products in the same order

* **number\_​of\_​variants\_​bought\_​together**

  **INTEGER**

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

* **products\_​bought\_​together**

  **ARRAY\<STRING>**

  The product names that appear in the same order.

* **products\_​bought\_​together\_​ids**

  **ARRAY\<INTEGER>**

  The Shopify product identifiers for products in the same order.

* **variants\_​bought\_​together**

  **ARRAY\<STRING>**

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

* **company\_​id**

  **IDENTITY**

  The unique Shopify identifier for the company. Use [`company_id`](#salestaxesdimension-propertydetail-companyid) with [`company_name`](#salestaxesdimension-propertydetail-companyname) to show readable company labels.

* **company\_​name**

  **STRING**

  Name of the company that placed the order

* **company\_​location\_​id**

  **IDENTITY**

  The unique Shopify identifier for the company location. Use [`company_location_id`](#salestaxesdimension-propertydetail-companylocationid) with [`company_location_name`](#salestaxesdimension-propertydetail-companylocationname) to show readable company location labels.

* **company\_​location\_​name**

  **STRING**

  The company location or branch that placed the order

* **referring\_​channel**

  **STRING**

  Marketing channel that referred the customer to place the order

* **referring\_​medium**

  **STRING**

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

* **referring\_​platform**

  **STRING**

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

* **traffic\_​type**

  **STRING**

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

* **order\_​marketing\_​event\_​target**

  **STRING**

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

* **order\_​marketing\_​event\_​type**

  **STRING**

  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.

* **market**

  **STRING**

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

* **markets**

  **ARRAY\<STRING>**

  Markets or customer segments associated with the order

* **order\_​cancellation\_​reason**

  **STRING**

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

* **order\_​risk\_​level**

  **STRING**

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

* **order\_​is\_​shopify\_​protect\_​covered**

  **BOOLEAN**

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

* **order\_​is\_​shopify\_​protect\_​eligible**

  **BOOLEAN**

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

* **order\_​is\_​shopify\_​protect\_​protected**

  **BOOLEAN**

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

* **order\_​tag**

  **STRING**

  Tag associated with the order

* **order\_​tags**

  **ARRAY\<STRING>**

  Set of tags associated with the order

* **agentic\_​referring\_​channel**

  **STRING**

  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.

* **channel\_​handle**

  **STRING**

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

* **marketing\_​activity\_​id**

  **IDENTITY**

  The unique Shopify identifier for the marketing activity. Use [`marketing_activity_id`](#salestaxesdimension-propertydetail-marketingactivityid) with [`marketing_activity_title`](#salestaxesdimension-propertydetail-marketingactivitytitle) to show readable activity labels.

* **marketing\_​activity\_​status**

  **STRING**

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

* **marketing\_​activity\_​title**

  **STRING**

  Name of the marketing activity

* **marketing\_​activity\_​url\_​parameter\_​key**

  **STRING**

  URL parameter key for the marketing activity

* **marketing\_​activity\_​url\_​parameter\_​value**

  **STRING**

  URL parameter value for the marketing activity

* **marketing\_​automation\_​id**

  **IDENTITY**

  Unique ID that Shopify uses to identify the marketing automation

* **marketing\_​delivery\_​channel**

  **STRING**

  Channel through which the marketing activity is delivered

* **marketing\_​event\_​id**

  **IDENTITY**

  Unique identifier for the associated marketing event

* **marketing\_​platform**

  **STRING**

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

* **page\_​host**

  **STRING**

  The host name of the session landing page.

* **page\_​path**

  **STRING**

  The path of the session landing page.

* **page\_​url**

  **STRING**

  The URL of the first page viewed in the session.

* **referrer\_​url**

  **STRING**

  External page that led to an online store session

* **utm\_​campaign**

  **STRING**

  UTM name of the campaign associated with the session

* **utm\_​content**

  **STRING**

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

* **utm\_​medium**

  **STRING**

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

* **utm\_​source**

  **STRING**

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

* **utm\_​term**

  **STRING**

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

* **pos\_​location\_​name**

  **STRING**

  Name of your physical retail location

* **product\_​status**

  **STRING**

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

* **product\_​title**

  **STRING**

  Display name of the product that your customers see

* **product\_​type**

  **STRING**

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

* **product\_​vendor**

  **STRING**

  Vendor of the product

* **product\_​collection**

  **STRING**

  Collection associated with the product

* **product\_​collections**

  **ARRAY\<STRING>**

  Set of collections associated with the product

* **product\_​tag**

  **STRING**

  Tag associated with the product

* **product\_​tags**

  **ARRAY\<STRING>**

  Set of tags associated with the product

* **product\_​variant\_​abc\_​grade**

  **STRING**

  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%.

* **product\_​variant\_​sku**

  **STRING**

  SKU of the product variant

* **product\_​variant\_​title**

  **STRING**

  Display name of the product variant

* **shipping\_​city**

  **STRING**

  City of the shipping address

* **shipping\_​company**

  **STRING**

  Company of the shipping address

* **shipping\_​country**

  **STRING**

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

* **shipping\_​postal\_​code**

  **STRING**

  Postal code of the shipping address

* **shipping\_​region**

  **STRING**

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

* **staff\_​member\_​name**

  **STRING**

  Name of the staff member associated with the order

* **order\_​or\_​return**

  **STRING**

  **deprecated**

  Label specifying whether the transaction adds or removes value from sales

  **Deprecated:**

  Deprecated since `2026-07`. Replaced by [`order_or_sales_reversal`](#salestaxesdimension-propertydetail-orderorsalesreversal)

### IDENTITY

A unique identifier for a Shopify resource such as a customer, product, or order.

```ts
```

### DAY\_TIMESTAMP

A date value truncated to day precision.

```ts
```

### DAY\_OF\_WEEK

A day within a week, used for weekday-based grouping and filtering.

```ts
```

### STRING

A sequence of characters representing text data.

```ts
```

### HOUR\_TIMESTAMP

A timestamp truncated to hour precision.

```ts
```

### HOUR\_OF\_DAY

An hour within a day, typically represented as an integer from 0 to 23.

```ts
```

### MINUTE\_TIMESTAMP

A timestamp truncated to minute precision.

```ts
```

### MONTH\_TIMESTAMP

A date value representing the start of a month.

```ts
```

### MONTH\_OF\_YEAR

A month number within a year.

```ts
```

### QUARTER\_TIMESTAMP

A date value representing the start of a fiscal quarter.

```ts
```

### SECOND\_TIMESTAMP

A timestamp truncated to second precision.

```ts
```

### PERCENT

A percentage value represented as a decimal, where 0.25 represents 25%.

```ts
```

### WEEK\_TIMESTAMP

A date value representing the start of a week.

```ts
```

### WEEK\_OF\_YEAR

A week number within a year.

```ts
```

### YEAR\_TIMESTAMP

A date value representing the start of a year.

```ts
```

### BOOLEAN

A true or false value representing binary states.

```ts
```

### INTEGER

A whole number without decimal places, used for counts, quantities, and other discrete numeric values.

```ts
```

### ARRAY

A list of values. The element type appears inside angle brackets, such as ARRAY\<STRING>.

```ts
```

***
