Skip to main content
Order analytics table for revenue, profitability, refunds, and channel performance analysis.
  • Grain: One row per sm_order_key.
  • Date field: order_processed_at_local_datetime.
  • Filters to start with: is_order_sm_valid = TRUE (drops voided, cancelled, uncollectible, draft and refunded orders, and orders cancelled for fraud or a declined payment), and sm_channel for segmentation.
  • Platform caveat: TikTok Shop coverage may be limited.
  • Joins: obt_order_lines via sm_order_key (1:many), obt_customers via sm_customer_key (many:1), and dim_orders via sm_order_key (1:1).

When to use this table

Use obt_orders for anything counted or summed per order: revenue, order counts, refunds, discounts, channel and campaign performance, new versus repeat customers. It already joins customer, attribution, and channel context, so most questions need no joins. Use obt_order_lines when the question is about products, and obt_customers when it is about customers rather than orders. Always filter is_order_sm_valid = TRUE unless you deliberately want cancelled or otherwise excluded orders. The flag is also FALSE for orders outside the Online DTC, Amazon, Retail, Wholesale and TikTok Shop sales channels, and for zero-revenue orders when your store excludes them. To see which rule set an order’s channel, sub-channel, or order type, use fct_order_classification_matches. Keep revenue and order-count queries here: joining all of its rows multiplies orders.

Example query

Net revenue and order count by month and sales channel for the last 12 months:

More query examples

Columns

When reporting-currency conversion is enabled, standard order money fields such as order_net_revenue and order_total_revenue use the workspace reporting currency. Use the order_original_* fields to reconcile against the source. See Reporting Currency.