Skip to main content
The sm_channel field groups orders for reporting based on:
  • Sales channel — Online DTC, Amazon, Retail, 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

ChannelDescription
Online DTCDirect-to-consumer orders from your online store
AmazonOrders from Amazon Seller Central (direct integration)
Amazon via ShopifyAmazon orders flowing through Shopify
TikTok ShopOrders from TikTok Shop (direct integration)
TikTok Shop via ShopifyTikTok Shop orders flowing through Shopify
RetailPoint-of-sale and physical retail orders
WholesaleB2B and bulk orders
Partners / AffiliatesGRIN and affiliate platform orders
MiraklMarketplace orders via Mirakl
ExchangedExchange and replacement orders
Draft OrdersManually created draft orders
ExcludedOrders tagged with sm-exclude-order

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.
-- This tag takes absolute precedence
WHERE order_tags CONTAINS 'sm-exclude-order''Excluded'
Excluded orders won’t appear in Executive Summary metrics or LTV calculations. 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:
Source SystemAssigned Channel
tiktok_shopTikTok Shop
amazonAmazon

Priority 3: Shopify Marketplace Detection

For Shopify orders, marketplace signals derived from the order source trigger specific channel mappings:
ConditionAssigned Channel
Order source contains amazonAmazon via Shopify
Sales channel is TikTok ShopTikTok Shop via Shopify

Priority 4: Config Sheet Rules

Your custom channel mapping rules are evaluated next. These rules can match on:
AttributeDescriptionExample
sourceUTM sourceutm_source=influencer
mediumUTM mediumutm_medium=affiliate
source_mediumCombined source/mediumfacebook / cpc
campaignUTM campaignutm_campaign=wholesale_q1
discount_codesApplied discount codesWHOLESALE50
order_tagsShopify order tagswholesale, b2b
skusProduct SKUs in the orderBULK-*
shopify_sales_channelShopify app/sourceShop App

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:
ConditionAssigned Channel
GRIN app ordersPartners / Affiliates
Tags contain wholesale, faire, wholesalerWholesale
Tags contain exchange, returnly_exchange, ex-###Exchanged
POS or Leap app ordersRetail
Draft order sourceDraft Orders
Tags contain miraklMirakl
Everything elseOnline DTC

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 falls back to the channel name, 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

Each order includes a channel_map_debug field that shows:
  1. Input values - The UTMs, tags, and other attributes evaluated
  2. Matched rule - Which config sheet rule (if any) was applied
  3. Output - The resulting channel, sub_channel, and vendor
This is useful for troubleshooting why an order was assigned to a particular channel.

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:
IF order.customer.tags CONTAINS "wholesale"
OR order.discount_code CONTAINS "WHOLESALE-"
THEN add_tag "wholesale"

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.