Skip to main content
sm_channel is one of the highest-impact dimensions in SourceMedium. It controls how orders roll up into dashboards and many Query Library recipes. If you see “too many orders in online_dtc” or “TikTok Shop isn’t separated”, it’s usually a channel mapping issue (or missing override rules).

What gets mapped

Key fields:
  • sm_channel: primary channel classification
  • sm_sub_channel: optional secondary breakdown
  • sm_default_channel: the fallback channel that would apply if no override rules match
  • sm_order_sales_channel: source-system sales channel (when available) used as an input to mapping

Override inputs (high level)

Channel mapping rules can evaluate signals like:
  • UTMs (source/medium/campaign)
  • Order tags
  • Discount codes
  • SKUs
  • Shopify sales channel / order source

Sales channel specific overrides

For Shopify orders, SourceMedium can expose Shopify’s sales channel (e.g., pos, TikTok Shop, Instagram, Shop App) as an additional mapping input. This enables rules like “map POS orders to retail” or “map TikTok Shop via Shopify to a separate channel”.

Where to start

Quick debugging query

SELECT
  sm_order_key,
  sm_channel,
  sm_sub_channel,
  sm_default_channel,
  sm_order_sales_channel,
  source_system_sales_channel,
  sm_utm_source_medium
FROM `your_project.sm_transformed_v2.obt_orders`
WHERE is_order_sm_valid = TRUE
  AND order_processed_at_local_datetime >= DATETIME_SUB(CURRENT_DATETIME(), INTERVAL 30 DAY)
ORDER BY order_processed_at_local_datetime DESC
LIMIT 200;