Skip to main content
The sm_channel field groups orders for reporting based on:
  • Sales channel: Online DTC, Amazon, Retail, Wholesale, TikTok Shop
  • Integration path: direct integration (Amazon) vs flowing through Shopify (Amazon via Shopify)
  • Acquisition source: Partners / Affiliates (e.g., GRIN)
  • Special order types: Exchanges, Draft Orders, Excluded
This is one of the most important dimensions for segmenting your business performance.

Standard Channel Values

Only the channels marked Yes count toward is_order_sm_valid. Orders in every other channel are left out of reporting that filters on it, such as valid-order revenue, order counts and LTV. They stay in your order data, and rpt_executive_summary_daily keeps each of those channels as its own rows.

Channel Determination Hierarchy

SourceMedium evaluates each order through this priority sequence:

Priority 1: Exclusion Tag

Orders with the sm-exclude-order tag are always assigned to the Excluded channel, regardless of any other signals.
Excluded orders are not valid orders, so is_order_sm_valid filters and LTV calculations leave them out. rpt_executive_summary_daily still keeps them as their own excluded channel rows, so choose the channels you want when you query it. Use this tag for test orders, internal orders, or any orders that shouldn’t count in analytics.

Priority 2: Source System Override

Orders from direct platform integrations (not flowing through Shopify) are assigned based on their source:

Priority 3: Shopify Marketplace Detection

For Shopify orders, marketplace signals derived from the order source trigger specific channel mappings: Without a direct TikTok Shop connection, TikTok Shop orders in Shopify default to Online DTC and count as valid.

Priority 4: Config Sheet Rules

Your custom channel mapping rules are evaluated next. They do not apply to the Amazon and TikTok Shop orders from priorities 2 and 3, or to orders the default logic below assigns to Retail or Mirakl, whatever the rules say. Custom channel mapping rules can match on: Rules compare with Equals, Contains, or In, ignoring case. Wildcards such as BULK-* are not supported. To match every SKU that includes BULK-, use Contains with the value BULK-.

Create Custom Channel Mappings

Step-by-step guide to setting up your own channel mapping rules

Priority 5: Default Logic

If no config sheet rules match, these defaults apply based on order attributes:

Sub-Channel (sm_sub_channel)

The sm_sub_channel field provides additional granularity within a channel. The value is determined by:
  1. For Amazon orders: Derived from fulfillment channel:
    • Fulfilled by Amazon: FBA orders
    • Fulfilled by Merchant: Merchant-fulfilled orders
  2. For all other orders: Uses your config sheet sub_channel if set. Otherwise it falls back to the order’s default channel (sm_default_channel, the channel before config sheet rules), or Unknown as a last resort.
Sub-channels are most commonly used to segment Online DTC orders by marketing source (e.g., separating influencer orders from general paid social).

Debugging Channel Assignment

To understand why an order landed in a specific channel, start with fct_order_classification_matches. Filter to classification = 'sm_channel' (or 'sm_sub_channel') and is_deciding_rule = TRUE to see the rule that set the value. Then pull the inputs that mapping rules match against (sales channel and UTMs) to see why a rule did or did not match:
If the inputs don’t match what you expected, the order is usually missing UTMs, or a Configuration Sheet rule needs to be added or updated.

Best Practices

Use Tags for Non-UTM Segmentation

For orders that don’t have reliable UTM data (wholesale, B2B, exchanges), use Shopify order tags and set up config sheet rules to match them.

Set Up Shopify Flow Automation

Automate consistent tagging with Shopify Flow:

Review Channel Distribution Regularly

Check the Orders Deep Dive module to ensure orders are being assigned to the expected channels. If you see unexpected Online DTC orders, they may need config sheet rules.

Channel Mapping Guide

Standard channel labels, Shopify Flow tagging, and how to customize the rules

Orders Deep Dive

Analyze orders by channel in your dashboard