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

# Channel Mapping (sm_channel + sm_sub_channel)

> How SourceMedium assigns sm_channel and sm_sub_channel, including custom rules and standard reporting categories.

`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 a channel total does not look right, it is often a channel mapping issue, a missing custom rule, or a difference between SourceMedium and the external report you are comparing against.

## What gets mapped

Key fields:

* `sm_channel`: primary channel classification
* `sm_sub_channel`: optional secondary breakdown

Additional platform and source fields may be available in your warehouse for investigation, depending on your data sources.

## 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 use Shopify's sales channel as an additional mapping input. This helps separate marketplace, retail, app, and standard ecommerce activity when those signals are available.

## Default and system-generated channels

Some channel values are generated by SourceMedium's standard logic even if your team did not create a custom rule. Common categories include standard ecommerce, retail, wholesale, marketplace, draft, exchange, replacement, and excluded orders.

Dashboard labels may be friendlier than the warehouse values. If you are querying BigQuery directly, use the values present in your own warehouse rather than copying labels from a dashboard screenshot.

If a new channel appears unexpectedly, first check whether the order has source, tag, sales channel, discount code, or SKU details that explain the classification. Then check whether a custom Configuration Sheet rule now matches that order.

## Troubleshooting a mapping issue

<Steps>
  <Step title="Check the raw inputs">
    Confirm the order's UTMs, tags, discount codes, SKUs, source, and sales channel. Mapping rules can only use values present on the order.
  </Step>

  <Step title="Check custom rules">
    Review the Channel Mapping tab in your Configuration Sheet for matching rules.
  </Step>

  <Step title="Check freshness">
    Configuration Sheet changes appear after the relevant data and dashboard refreshes complete.
  </Step>

  <Step title="Send a specific example">
    If the result still looks wrong, send SourceMedium the order ID, expected channel, actual channel, and the rule you expected to apply.
  </Step>
</Steps>

## Where to start

* For customer-facing channel definitions, see [Sales Channel (sm\_channel)](/data-transformations/order-segmentation/sales-channel).
* For “how do I create or override channels?”, see [Create Custom Channel Mappings](/data-inputs/configuration-sheet/how-can-i-create-order-channels-and-subchannels).

## What to send SourceMedium

If a mapping still looks wrong after checking the order inputs and Configuration Sheet, send SourceMedium the order ID, expected channel, actual channel, date range, and the report or query where you noticed the issue.
