> ## Documentation Index
> Fetch the complete documentation index at: https://docs.queryful.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Orders

> One row per order on the day it was placed: totals, refunds, status, tags, discount codes and where the customer came from.

One row per order on the day it was placed: totals, refunds, status, tags, discount codes and where the customer came from.

## Example

```sql theme={null}
FROM orders
  SHOW order_count, subtotal
  GROUP BY sales_channel
  SINCE startOfMonth(-1m) UNTIL today
  ORDER BY order_count DESC
```

## Metrics

| Metric | Type | Description |
| - | - | - |
| `order_count` | Number | Number of orders placed in the period, cancelled ones included. |
| `subtotal` | Currency | Order subtotals: line items after discounts, before shipping and taxes. |
| `order_discounts` | Currency | Discounts on the orders. |
| `shipping` | Currency | Shipping charged on the orders. |
| `tax` | Currency | Tax on the orders. |
| `order_total` | Currency | What customers were charged when they ordered, shipping and taxes included. |
| `refunded` | Currency | Amount refunded on the orders so far. |
| `current_total` | Currency | Order totals after edits, returns and refunds. |
| `average_order_total` | Currency | Order total per order. |
| `customers` | Number | Customers who placed the orders, each counted once. |
| `new_customers` | Number | Customers for whom the order was their first. |
| `returning_customers` | Number | Customers who had ordered before. |
| `current_subtotal` | Currency | The orders' subtotals as they stand now, after edits and removals. |
| `current_discounts` | Currency | The orders' discounts as they stand now. |
| `current_tax` | Currency | The orders' tax as it stands now. |
| `current_shipping` | Currency | The orders' shipping charges as they stand now. |
| `original_order_total` | Currency | What the orders came to when they were placed, before edits and refunds. |
| `cart_discounts` | Currency | Discounts on the orders' carts as a whole, not their lines. |
| `net_payment` | Currency | Payments received for the orders less what was refunded. |
| `total_received` | Currency | Everything received for the orders, before refunds. |
| `total_capturable` | Currency | Authorized payments on the orders not yet captured. |
| `refunded_shipping` | Currency | Shipping refunded on the orders. |
| `refund_discrepancy` | Currency | The difference between what was refunded and what the refunds itemize. |
| `cash_rounding` | Currency | Rounding on cash payments and refunds (in some countries cash is rounded to 5c). |
| `items_after_edits` | Number | Items on the orders as they stand now, after edits and removals. |
| `total_duties` | Currency | Duties charged on the orders. |
| `total_tips` | Currency | Tips customers added at checkout. |
| `total_additional_fees` | Currency | Additional fees charged on the orders, such as import fees. |
| `total_outstanding` | Currency | What customers still owe on the orders. |
| `average_order_weight` | Number | The average weight of an order, in kilograms. |
| `high_risk_orders` | Number | Orders Shopify's fraud analysis marked as high risk. |
| `high_fraud_risk_rate` | Percent | The share of orders marked as high risk, as Shopify's report shows it. |
| `orders_canceled_for_fraud` | Number | Orders canceled with fraud as the reason. |
| `shopify_protect_orders` | Number | Orders Shopify Protect covered against fraud. |
| `average_days_to_conversion` | Number | The average days between a customer's first visit and their order. |
| `overdue_payment_amount` | Currency | What's owed on orders past their payment due date and not yet paid. |

## Dimensions

| Dimension | Description |
| - | - |
| `order_name` | Order name, such as #1001. |
| `hour_of_day` | The hour of day the order was placed, from 0 to 23. |
| `day_of_week` | The day of week the order was placed, Monday through Sunday. |
| `processed_at` | When the order was processed, in the shop's timezone. |
| `order_payment_status` | Paid, partially refunded, refunded, pending and so on. |
| `order_fulfillment_status` | Fulfilled, partially fulfilled, unfulfilled and so on. |
| `sales_channel` | The sales channel the order came through. |
| `order_source` | Where the order was placed: web, pos, or a channel app. |
| `is_canceled_order` | Whether the order was cancelled. |
| `discount_code` | The code entered, if any. An order with several discounts counts under each. |
| `order_tag` | Order tag. An order with several tags counts under each, so totals across tags overlap. |
| `order_landing_page_url` | The first page the customer landed on before ordering. |
| `order_referrer_url` | The page that sent the customer on their first visit. |
| `order_utm_source` | UTM source of the first visit. |
| `order_utm_medium` | UTM medium of the first visit. |
| `order_utm_campaign` | UTM campaign of the first visit. |
| `order_utm_term` | UTM term of the first visit, such as a paid search keyword. |
| `order_utm_content` | UTM content of the first visit, such as which ad or link was clicked. |
| `new_or_returning_customer` | New when the order was the customer's first, Returning when they had ordered before. Empty without a customer. |
| `months_since_first_purchase` | Whole months between the customer's first order and this one. |
| `weeks_since_first_purchase` | Whole weeks between the week of the customer's first order and this one's. |
| `quarters_since_first_purchase` | Whole quarters between the customer's first order and this one. |
| `is_b2b_order` | Whether the order was placed for a B2B company. |
| `is_pos_sale` | Whether the sale was made through the Point of Sale channel. |
| `pos_location_name` | The point of sale location the sale was made at. |
| `customer_id` | The customer's Shopify ID. |
| `customer_name` | The customer's full name. |
| `customer_email` | The customer's email address. |
| `customer_email_domain` | The part of the customer's email after the @, such as gmail.com. |
| `customer_country` | The country of the customer's default address. |
| `customer_region` | The state or province of the customer's default address, such as US-CA. |
| `customer_city` | The city of the customer's default address, with its country and region (GB-ENG-London). |
| `customer_tag` | Customer tag. A customer with several tags counts under each, so totals across tags overlap. |
| `customer_language` | The customer's language. |
| `customer_account_status` | The customer's account state: DECLINED, DISABLED, ENABLED or INVITED. |
| `customer_email_subscription_status` | The customer's email marketing state, such as SUBSCRIBED or NOT\_SUBSCRIBED. |
| `customer_sms_subscription_status` | The customer's SMS marketing state, such as SUBSCRIBED or NOT\_SUBSCRIBED. |
| `customer_product_subscription_status` | Whether the customer has product subscriptions, such as ACTIVE or NEVER\_SUBSCRIBED. |
| `customer_number_of_orders` | The number of orders the customer has placed, all time. |
| `customer_amount_spent` | The customer's all-time spend, in your store's currency. |
| `customer_added_date` | The day the customer was added, in your store's timezone. |
| `customer_first_order_date` | The day the customer placed their first order, in your store's timezone. |
| `customer_last_order_date` | The day the customer most recently placed an order, in your store's timezone. |
| `customer_cohort_month` | The month of the customer's first order. |
| `customer_cohort_quarter` | The quarter of the customer's first order. |
| `customer_cohort_week` | The week of the customer's first order. |
| `customer_countries` | Every country in the customer's addresses, as codes such as GB, US. |
| `customer_regions` | Every state or province in the customer's addresses, such as US-CA, US-NY. |
| `customer_cities` | Every city in the customer's addresses, with its country and region. |
| `first_order_sales_channel` | The sales channel of the customer's first order. |
| `first_order_product` | A product on the customer's first order. A first order with several products counts under each, so totals across products overlap. |
| `second_order_product` | A product on the customer's second order (None without one). A second order with several products counts under each. |
| `second_order_month` | The month of the customer's second order. |
| `first_order_has_subscription` | Whether the customer's first order included a subscription purchase. |
| `first_order_utm_source` | The UTM source of the visit that led to the customer's first order. |
| `first_order_utm_medium` | The UTM medium of the visit that led to the customer's first order. |
| `first_order_utm_campaign` | The UTM campaign of the visit that led to the customer's first order. |
| `first_order_landing_page_url` | The first page of the visit that led to the customer's first order. |
| `first_order_referrer_url` | The site that sent the customer on the visit that led to their first order. |
| `first_order_delivery` | How the customer's first order arrived: on\_time, late, no\_promise, not\_delivered or not\_fulfilled. Ours: set it beside repeat customer rate to see whether late deliveries cost repeat custom. |
| `customer_churn_risk` | Where a repeat customer stands against their usual gap between orders: on\_track, due (past it) or overdue (past twice it). one\_time for a single order. |
| `customer_expected_next_order_date` | The customer's last order date plus their usual gap between orders. Empty for one-time customers. |
| `rfm_group` | Shopify's customer group by recency, frequency and spend, such as champions, loyal or at\_risk. |
| `predicted_spend_tier` | Shopify's predicted spend for the customer over the next year: low, medium or high. |
| `market` | The market the order belongs to, as Shopify reports it. |
| `company_name` | The B2B company that placed the order. |
| `company_location_name` | The B2B company location the order was for. |
| `app_name` | The app or channel that created the order, such as Online Store, Point of Sale or Draft Orders. |
| `order_number` | The order's number without its prefix, such as 1001. |
| `order_confirmation_number` | The code the customer sees on their order confirmation. |
| `order_customer_language` | The language the customer placed the order in, such as en-GB. |
| `order_accepts_marketing` | Whether the customer agreed to marketing when they ordered: true or false. |
| `order_return_status` | Where the order's returns stand: No return, Return requested, In progress, Returned and so on. |
| `order_edit_request_status` | Whether the customer asked to change the order, and where that stands. |
| `order_tax_exempt` | Whether the order was exempt from tax: true or false. |
| `order_duties_included` | Whether duties were included in the prices: true or false. |
| `order_requires_shipping` | Whether anything on the order needs shipping: true or false. |
| `order_fully_paid` | Whether the order is paid in full: true or false. |
| `order_confirmed` | Whether the order is confirmed (stock reserved): true or false. |
| `merchant_of_record_app` | The app that sold the order as merchant of record, if not the store itself. |
| `order_product_network` | Whether the order came through Shopify's product network: true or false. |
| `order_source_identifier` | The id the channel that created the order gave it, such as a POS device's reference. |
| `order_customer_currency` | The currency the customer paid in. |
| `last_visit_landing_page` | The page the visit the customer ordered in started on. |
| `last_visit_referrer_url` | The page that sent the customer on the visit they ordered in. |
| `last_visit_utm_source` | UTM source of the visit the customer ordered in. |
| `last_visit_utm_medium` | UTM medium of the visit the customer ordered in. |
| `last_visit_utm_campaign` | UTM campaign of the visit the customer ordered in. |
| `last_visit_utm_content` | UTM content of the visit the customer ordered in. |
| `last_visit_utm_term` | UTM term of the visit the customer ordered in. |
| `first_visit_referral_code` | The referral code on the customer's first visit. |
| `last_visit_referral_code` | The referral code on the visit the customer ordered in. |
| `first_visit_source_description` | Shopify's description of where the first visit came from. |
| `last_visit_source_description` | Shopify's description of where the visit the customer ordered in came from. |
| `first_visit_marketing_event` | The marketing event (campaign) behind the customer's first visit. |
| `last_visit_marketing_event` | The marketing event (campaign) behind the visit the customer ordered in. |
| `po_number` | The purchase order number on the order. |
| `order_tax_id` | The tax ID the buyer gave at checkout, such as a VAT number. |
| `business_entity` | The legal entity that sold the order (stores selling as more than one). |
| `sales_sub_channel` | The part of the channel the order came from, such as Instagram within Facebook & Instagram. |
| `is_marketplace_order` | Whether the order came from a marketplace channel: true or false. |
| `taxes_included` | Whether the order's prices include tax: true or false. |
| `order_edited` | Whether the order was edited after it was placed: true or false. |
| `order_closed` | Whether the order is closed (archived): true or false. |
| `shipping_country` | The country the order ships to. |
| `shipping_region` | The state or province the order ships to. |
| `shipping_city` | The city the order ships to. |
| `shipping_postcode` | The postcode the order ships to. |
| `shipping_company` | The company in the shipping address. |
| `shipping_address` | The first line of the shipping address. |
| `billing_country` | The country in the billing address. |
| `billing_region` | The state or province in the billing address. |
| `billing_city` | The city in the billing address. |
| `billing_postcode` | The postcode in the billing address. |
| `billing_company` | The company in the billing address. |
| `order_risk_level` | The fraud risk level Shopify assigned to the order: High, Medium, Low, None or Pending. |
| `order_risk_recommendation` | What Shopify's fraud analysis recommends: Accept, Investigate, Cancel or None. |
| `order_is_shopify_protect_protected` | Whether Shopify Protect covered the order against fraud: true or false. |
| `order_is_shopify_protect_covered` | Whether the order met Shopify Protect's fulfilment requirements, with proper shipping and tracking: true or false. |
| `order_is_shopify_protect_eligible` | Whether the order was eligible for Shopify Protect: true or false. |
| `shipping_method` | The shipping method the customer chose, as it reads at checkout. |
| `shipping_method_source` | Where the shipping rate came from: shopify, or the carrier or app that calculated it. |
| `days_to_conversion` | Days between the customer's first visit and the order. |
| `sessions_before_order` | The visits Shopify recorded on the way to the order. |
| `first_visit_source` | Where the customer's first visit came from, such as google or an email. |
| `first_visit_source_type` | The kind of source of the first visit: search, social, email, direct and so on. |
| `first_visit_date` | The day of the customer's first visit before the order, in the store's timezone. |
| `last_visit_source` | Where the visit the customer ordered in came from, such as google or an email. |
| `last_visit_source_type` | The kind of source of the visit the customer ordered in: search, social, email, direct and so on. |
| `customer_order_index` | Which of the customer's orders this is: 1 for their first, 2 for their second and so on. |
| `payment_terms` | The order's payment terms, such as Net 30 or Due on fulfillment. |
| `payment_due_date` | When payment for the order falls due, in the store's timezone. |
| `payment_overdue` | Whether the order's payment is past its due date and not yet paid: true or false. |
| `discount_names` | Every discount on the order by name, automatic ones included, comma separated. |
| `order_referrer_source` | The kind of site that referred the order: search, social, email, direct and so on. |
| `order_referrer_name` | The site that referred the order, such as Google or Instagram. |
| `is_shop_referral_order` | Whether the Shop app referred the order: true or false. |
| `traffic_type` | How Shopify classes the visit the order is credited to: paid, organic, direct or unknown. |
| `referring_channel` | The channel Shopify credits the order to, such as google, klaviyo or direct. |
| `referring_medium` | The kind of channel Shopify credits the order to: search, email, sms, social and so on. |
| `marketing_channel` | The marketing channel Shopify credits the order to, such as google\_ads or meta\_ads. |
| `marketing_platform` | The platform behind the channel Shopify credits the order to, such as google or meta. |
| `agentic_sales_channel` | The AI agent the order came through, if any. |
| `customer_segment` | Each segment the customer is in. A customer in several counts under each, so totals overlap. |
| `discount_name` | The code or title that identifies the discount. An order with several discounts counts under each. |
| `discount_title` | The discount's title when it was applied. An order with several discounts counts under each. |
| `discount_method` | How the discount was applied: Automatic, Manual, Discount code or Script. An order with several discounts counts under each. |
| `discount_class` | What it applied to: Order, Product or Shipping. An order with several discounts counts under each. |
| `discount_type` | Fixed amount or Percentage. An order with several discounts counts under each. |
| `order_attribute` | Each order attribute as name: value. A row with several counts under each, so totals overlap. |
| `order_attribute_name` | Each order attribute's name, without its value. |

## Filters

| Filter | Type | Description |
| - | - | - |
| `hour_of_day` | Text | The hour of day the order was placed, from 0 to 23. |
| `processed_at` | Date | When the order was processed, in the shop's timezone. |
| `new_or_returning_customer` | Text | New when the order was the customer's first, Returning when they had ordered before. Empty without a customer. |
| `months_since_first_purchase` | Number | Whole months between the customer's first order and this one. |
| `weeks_since_first_purchase` | Number | Whole weeks between the week of the customer's first order and this one's. |
| `quarters_since_first_purchase` | Number | Whole quarters between the customer's first order and this one. |
| `is_b2b_order` | Yes or no | Whether the order was placed for a B2B company. |
| `is_pos_sale` | Yes or no | Whether the sale was made through the Point of Sale channel. |
| `pos_location_name` | Text | The point of sale location the sale was made at. |
| `customer_id` | Text | The customer's Shopify ID. |
| `customer_email_domain` | Text | The part of the customer's email after the @, such as gmail.com. |
| `customer_region` | Text | The state or province of the customer's default address, such as US-CA. |
| `customer_city` | Text | The city of the customer's default address, with its country and region (GB-ENG-London). |
| `customer_language` | Text | The customer's language. |
| `customer_email_subscription_status` | Text | The customer's email marketing state, such as SUBSCRIBED or NOT\_SUBSCRIBED. |
| `customer_sms_subscription_status` | Text | The customer's SMS marketing state, such as SUBSCRIBED or NOT\_SUBSCRIBED. |
| `customer_product_subscription_status` | Text | Whether the customer has product subscriptions, such as ACTIVE or NEVER\_SUBSCRIBED. |
| `customer_number_of_orders` | Number | The number of orders the customer has placed, all time. |
| `customer_amount_spent` | Number | The customer's all-time spend, in your store's currency. |
| `customer_added_date` | Date | The day the customer was added, in your store's timezone. |
| `customer_first_order_date` | Date | The day the customer placed their first order, in your store's timezone. |
| `customer_last_order_date` | Date | The day the customer most recently placed an order, in your store's timezone. |
| `customer_cohort_month` | Date | The month of the customer's first order. |
| `customer_cohort_quarter` | Date | The quarter of the customer's first order. |
| `customer_cohort_week` | Date | The week of the customer's first order. |
| `customer_countries` | Text | Every country in the customer's addresses, as codes such as GB, US. |
| `customer_regions` | Text | Every state or province in the customer's addresses, such as US-CA, US-NY. |
| `customer_cities` | Text | Every city in the customer's addresses, with its country and region. |
| `second_order_month` | Text | The month of the customer's second order. |
| `first_order_has_subscription` | Yes or no | Whether the customer's first order included a subscription purchase. |
| `first_order_utm_medium` | Text | The UTM medium of the visit that led to the customer's first order. |
| `first_order_utm_campaign` | Text | The UTM campaign of the visit that led to the customer's first order. |
| `first_order_landing_page_url` | Text | The first page of the visit that led to the customer's first order. |
| `first_order_referrer_url` | Text | The site that sent the customer on the visit that led to their first order. |
| `first_order_delivery` | Text | How the customer's first order arrived: on\_time, late, no\_promise, not\_delivered or not\_fulfilled. Ours: set it beside repeat customer rate to see whether late deliveries cost repeat custom. |
| `customer_expected_next_order_date` | Date | The customer's last order date plus their usual gap between orders. Empty for one-time customers. |
| `predicted_spend_tier` | Text | Shopify's predicted spend for the customer over the next year: low, medium or high. |
| `market` | Text | The market the order belongs to, as Shopify reports it. |
| `company_name` | Text | The B2B company that placed the order. |
| `company_location_name` | Text | The B2B company location the order was for. |
| `app_name` | Text | The app or channel that created the order, such as Online Store, Point of Sale or Draft Orders. |
| `order_confirmation_number` | Text | The code the customer sees on their order confirmation. |
| `order_customer_language` | Text | The language the customer placed the order in, such as en-GB. |
| `order_accepts_marketing` | Text | Whether the customer agreed to marketing when they ordered: true or false. |
| `order_edit_request_status` | Text | Whether the customer asked to change the order, and where that stands. |
| `order_tax_exempt` | Text | Whether the order was exempt from tax: true or false. |
| `order_duties_included` | Text | Whether duties were included in the prices: true or false. |
| `order_requires_shipping` | Text | Whether anything on the order needs shipping: true or false. |
| `order_confirmed` | Text | Whether the order is confirmed (stock reserved): true or false. |
| `merchant_of_record_app` | Text | The app that sold the order as merchant of record, if not the store itself. |
| `order_product_network` | Text | Whether the order came through Shopify's product network: true or false. |
| `order_source_identifier` | Text | The id the channel that created the order gave it, such as a POS device's reference. |
| `last_visit_landing_page` | Text | The page the visit the customer ordered in started on. |
| `last_visit_referrer_url` | Text | The page that sent the customer on the visit they ordered in. |
| `last_visit_utm_medium` | Text | UTM medium of the visit the customer ordered in. |
| `last_visit_utm_content` | Text | UTM content of the visit the customer ordered in. |
| `last_visit_utm_term` | Text | UTM term of the visit the customer ordered in. |
| `first_visit_referral_code` | Text | The referral code on the customer's first visit. |
| `last_visit_referral_code` | Text | The referral code on the visit the customer ordered in. |
| `first_visit_source_description` | Text | Shopify's description of where the first visit came from. |
| `last_visit_source_description` | Text | Shopify's description of where the visit the customer ordered in came from. |
| `first_visit_marketing_event` | Text | The marketing event (campaign) behind the customer's first visit. |
| `last_visit_marketing_event` | Text | The marketing event (campaign) behind the visit the customer ordered in. |
| `is_marketplace_order` | Text | Whether the order came from a marketplace channel: true or false. |
| `order_closed` | Text | Whether the order is closed (archived): true or false. |
| `shipping_company` | Text | The company in the shipping address. |
| `shipping_address` | Text | The first line of the shipping address. |
| `billing_region` | Text | The state or province in the billing address. |
| `billing_company` | Text | The company in the billing address. |
| `order_risk_recommendation` | Text | What Shopify's fraud analysis recommends: Accept, Investigate, Cancel or None. |
| `shipping_method_source` | Text | Where the shipping rate came from: shopify, or the carrier or app that calculated it. |
| `first_visit_source` | Text | Where the customer's first visit came from, such as google or an email. |
| `first_visit_source_type` | Text | The kind of source of the first visit: search, social, email, direct and so on. |
| `first_visit_date` | Text | The day of the customer's first visit before the order, in the store's timezone. |
| `agentic_sales_channel` | Text | The AI agent the order came through, if any. |
| `order_name` | Text | Order name, such as #1001. |
| `order_payment_status` | Text | PAID, PARTIALLY\_REFUNDED, REFUNDED, PENDING and so on. |
| `order_fulfillment_status` | Text | FULFILLED, PARTIALLY\_FULFILLED, UNFULFILLED and so on. |
| `sales_channel` | Text | The sales channel the order came through. |
| `order_source` | Text | Where the order was placed: web, pos, or a channel app. |
| `discount_code` | Text | The order's discount codes, comma separated. Use contains to match one code. |
| `order_tag` | Text | The order's tags, comma separated. Use contains to match one tag. |
| `note` | Text | The order note. |
| `order_landing_page_url` | Text | First visit landing page. |
| `order_referrer_url` | Text | First visit referrer. |
| `order_utm_source` | Text | UTM source of the first visit. |
| `order_utm_medium` | Text | UTM medium of the first visit. |
| `order_utm_campaign` | Text | UTM campaign of the first visit. |
| `order_utm_term` | Text | UTM term of the first visit. |
| `order_utm_content` | Text | UTM content of the first visit. |
| `is_canceled_order` | Yes or no | Whether the order was cancelled. |
| `order_total` | Number | The order's total price. |
| `discount_name` | Text | The order's discounts by code or title, comma separated. Use contains to match one. |
| `customer_name` | Text | The customer's full name. |
| `customer_email` | Text | The customer's email address. |
| `customer_country` | Text | The country of the customer's default address. |
| `customer_tag` | Text | The customer's tags, comma separated. Use contains to match one tag. |
| `rfm_group` | Text | Shopify's RFM group, such as loyal. |
| `first_order_sales_channel` | Text | The sales channel of the customer's first order. |
| `first_order_utm_source` | Text | The UTM source of the visit that led to the customer's first order. |
| `customer_churn_risk` | Text | on\_track, due, overdue or one\_time. |
| `customer_account_status` | Text | The customer's account state, such as ENABLED. |
| `order_attribute_name` | Text | Order attribute names, comma separated. Use contains to match one. |
| `order_attribute_value` | Text | Order attribute values, comma separated. Use contains to match one. |
| `traffic_type` | Text | How Shopify classes the visit the order is credited to: paid, organic, direct or unknown. |
| `referring_channel` | Text | The channel Shopify credits the order to, such as google, klaviyo or direct. |
| `referring_medium` | Text | The kind of channel Shopify credits the order to: search, email, sms, social and so on. |
| `marketing_channel` | Text | The marketing channel Shopify credits the order to, such as google\_ads or meta\_ads. |
| `marketing_platform` | Text | The platform behind the channel Shopify credits the order to, such as google or meta. |
| `order_return_status` | Text | Where the order's returns stand. |
| `order_fully_paid` | Yes or no | Whether the order is paid in full. |
| `order_customer_currency` | Text | The currency the customer paid in. |
| `last_visit_utm_campaign` | Text | UTM campaign of the visit the customer ordered in. |
| `last_visit_utm_source` | Text | UTM source of the visit the customer ordered in. |
| `po_number` | Text | The purchase order number. |
| `order_tax_id` | Text | The tax ID the buyer gave at checkout. |
| `business_entity` | Text | The legal entity that sold the order. |
| `sales_sub_channel` | Text | The part of the channel the order came from. |
| `taxes_included` | Yes or no | Whether the order's prices include tax. |
| `order_edited` | Yes or no | Whether the order was edited after it was placed. |
| `order_weight` | Number | The order's total weight in kilograms. |
| `order_outstanding` | Number | What the customer still owes on the order. |
| `shipping_country` | Text | The country the order ships to. |
| `shipping_region` | Text | The state or province the order ships to. |
| `shipping_city` | Text | The city the order ships to. |
| `shipping_postcode` | Text | The postcode the order ships to. |
| `billing_country` | Text | The country in the billing address. |
| `billing_city` | Text | The city in the billing address. |
| `billing_postcode` | Text | The postcode in the billing address. |
| `order_risk_level` | Text | High, Medium, Low, None or Pending. |
| `order_is_shopify_protect_protected` | Yes or no | Whether Shopify Protect covered the order. |
| `order_is_shopify_protect_covered` | Yes or no | Whether the order met Shopify Protect's fulfilment requirements. |
| `order_is_shopify_protect_eligible` | Yes or no | Whether the order was eligible for Shopify Protect. |
| `order_referrer_source` | Text | search, social, email, direct and so on. |
| `order_referrer_name` | Text | The site that referred the order. |
| `is_shop_referral_order` | Yes or no | Whether the Shop app referred the order. |
| `shipping_method` | Text | The shipping method chosen at checkout. |
| `days_to_conversion` | Number | Days between the first visit and the order. |
| `last_visit_source` | Text | Where the visit the customer ordered in came from. |
| `last_visit_source_type` | Text | Search, social, email, direct and so on. |
| `customer_order_index` | Number | Which of the customer's orders this is: 1 for their first. |
| `payment_terms` | Text | Net 30, Due on fulfillment and so on. |
| `payment_due_date` | Date | When payment falls due. |
| `payment_overdue` | Yes or no | Past its due date and not yet paid. |
| `discount_names` | Text | Discount names on the order, comma separated. Use contains to match one. |
| `customer_segment` | Text | Customers in the segment: one row per order, so totals stay whole. |

## Linked records

Fields of the records this dataset reaches can be shown, grouped by and filtered on, written with a dot after the record (for example `order.name`). Each record's page lists its fields.

| Write | Record | Reached through |
| - | - | - |
| `order.<field>` | [Order](https://docs.queryful.app/queryfulql/records/order.md) | Order |
| `order.customer.<field>` | [Customer](https://docs.queryful.app/queryfulql/records/customer.md) | Order › Customer |
| `order.customer.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Order › Customer › Company |
| `order.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Order › Company |
| `order.company_location.<field>` | [Company location](https://docs.queryful.app/queryfulql/records/company_location.md) | Order › Company location |
| `order.company_location.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Order › Company location › Company |
| `order.location.<field>` | [Location](https://docs.queryful.app/queryfulql/records/location.md) | Order › Location |
| `order.market.<field>` | [Market](https://docs.queryful.app/queryfulql/records/market.md) | Order › Market |
| `customer.<field>` | [Customer](https://docs.queryful.app/queryfulql/records/customer.md) | Customer |
| `customer.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Customer › Company |
| `company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Company |
| `company_location.<field>` | [Company location](https://docs.queryful.app/queryfulql/records/company_location.md) | Company location |
| `company_location.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Company location › Company |
| `location.<field>` | [Location](https://docs.queryful.app/queryfulql/records/location.md) | Location |
| `shop.<field>` | [Store](https://docs.queryful.app/queryfulql/records/shop.md) | Store |

## Related datasets

* [Sales](https://docs.queryful.app/queryfulql/datasets/sales.md)
* [Order line items](https://docs.queryful.app/queryfulql/datasets/order_lines.md)
* [Returns](https://docs.queryful.app/queryfulql/datasets/returns.md)
* [Restocks](https://docs.queryful.app/queryfulql/datasets/refund_lines.md)
* [Refunds](https://docs.queryful.app/queryfulql/datasets/refunds.md)
* [Sales taxes](https://docs.queryful.app/queryfulql/datasets/sales_taxes.md)
* [Write-offs](https://docs.queryful.app/queryfulql/datasets/sale_write_offs.md)
* [Profitability](https://docs.queryful.app/queryfulql/datasets/profitability.md)
* [Agentic sales](https://docs.queryful.app/queryfulql/datasets/agentic_sales.md)
* [Products bought together](https://docs.queryful.app/queryfulql/datasets/product_pairs.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.