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

# Using Send Conditions

> Use send conditions to disable notifications, channels, or content blocks based on `data` or `profile` values.

Use `Conditions` in template and channel settings to control whether content sends. Conditions can reference values from the [Send API](/api-reference/send/send-a-message) `data` object or the [User Profile](/api-reference/user-profiles/get-a-profile).

If you want to disable the *entire* notification, set conditions in [Template Settings](/platform/content/template-settings/general-settings). To disable specific channels, set conditions in [Channel settings](/platform/sending/channel-settings).

<Note>
  For a conceptual overview of when to use template conditions vs channel conditions, see [Channel Settings](/platform/sending/channel-settings#conditions).
</Note>

<Info>
  * Channel conditions only apply to the channel where you set them.
  * [User preferences](/api-reference/user-preferences/get-users-preferences) take precedence over channel conditions. If a user has `custom_routing` configured, only their selected channels are considered. Channel conditions still run for those channels, but cannot override the user's selection.
  * A channel can be disabled by using [missing variable guardrails](/platform/content/template-settings/variable-not-found).
</Info>

## Setting Send Conditions

### For Notifications and Channels

Open template settings or channel settings, then select the Conditions tab.

<Frame caption="Template Settings">
  <img src="https://mintcdn.com/courier-4f1f25dc/oLXFxRwf6FuGv1s3/assets/platform/content/send-conditions-settings.png?fit=max&auto=format&n=oLXFxRwf6FuGv1s3&q=85&s=47f16c4b3bba847aa10bf62366ae3d02" alt="Template Settings" width="466" height="298" data-path="assets/platform/content/send-conditions-settings.png" />
</Frame>

<br />

<Frame caption="Channel Settings">
  <img src="https://mintcdn.com/courier-4f1f25dc/oLXFxRwf6FuGv1s3/assets/platform/content/send-conditions-channel-settings.png?fit=max&auto=format&n=oLXFxRwf6FuGv1s3&q=85&s=c20e31ae655536ebca1167af70df8374" alt="Channel Settings" width="1224" height="738" data-path="assets/platform/content/send-conditions-channel-settings.png" />
</Frame>

### For Content Blocks

Open the conditional settings modal from the content block you wish to set conditions to.

<Frame caption="Content Block Conditions">
  <img src="https://mintcdn.com/courier-4f1f25dc/oLXFxRwf6FuGv1s3/assets/platform/content/send-conditions-filter.png?fit=max&auto=format&n=oLXFxRwf6FuGv1s3&q=85&s=2565c30d8bc0c131e03328f286369b57" alt="Content Block Conditions" width="1082" height="456" data-path="assets/platform/content/send-conditions-filter.png" />
</Frame>

## Setting Conditions

1. Select the condition source, then choose the property and value you want to evaluate.

<Tip>
  You can access nested values using dot notation.
</Tip>

<Frame caption="Conditions Source">
  <img src="https://mintcdn.com/courier-4f1f25dc/oLXFxRwf6FuGv1s3/assets/platform/content/send-conditions-condition-filter.png?fit=max&auto=format&n=oLXFxRwf6FuGv1s3&q=85&s=fc89797ba03211f82575c324b9a9cb5d" alt="Conditions Source" width="686" height="286" data-path="assets/platform/content/send-conditions-condition-filter.png" />
</Frame>

2. Set the property name, operator, and value that controls whether the notification, channel, or content block is disabled.

<Frame caption="Condition Operators">
  <img src="https://mintcdn.com/courier-4f1f25dc/oLXFxRwf6FuGv1s3/assets/platform/content/send-conditions-operator.png?fit=max&auto=format&n=oLXFxRwf6FuGv1s3&q=85&s=d85e07ff463db2eb83a04289cefe9637" alt="Condition Operators" width="692" height="506" data-path="assets/platform/content/send-conditions-operator.png" />
</Frame>

<Warning>
  If you set multiple conditions, **all** conditions must be met to disable the message.
</Warning>

<Frame caption="Multiple Conditions">
  <img src="https://mintcdn.com/courier-4f1f25dc/oLXFxRwf6FuGv1s3/assets/platform/content/send-conditions-double.png?fit=max&auto=format&n=oLXFxRwf6FuGv1s3&q=85&s=998109dd42a102131076e2006f1285b1" alt="Multiple Conditions" width="688" height="309" data-path="assets/platform/content/send-conditions-double.png" />
</Frame>

## Channel Conditions in JSON

Channel conditions can also be configured directly in the Send API using the `message.channels` object. Each channel can include an `if` property containing a JavaScript conditional expression.

### Basic Example

Skip SMS for premium users in Europe:

```json theme={null}
{
  "message": {
    "to": { "user_id": "user_123" },
    "template": "order-confirmation",
    "data": {
      "order_id": "ORD-12345",
      "region": "europe"
    },
    "channels": {
      "sms": {
        "if": "profile.custom.subscription_tier === 'premium' && data.region === 'europe'"
      }
    }
  }
}
```

### Custom Routing with Channel Conditions

When using custom routing, channel conditions must be explicitly provided in `message.channels`. Conditions from the template's default routing are not automatically preserved.

<Warning>
  When you specify a `routing` object in your message, channel conditions from the template's default routing strategy are not automatically included. Add channel conditions explicitly in `message.channels` if you want them evaluated.
</Warning>

```json theme={null}
{
  "message": {
    "to": { "user_id": "user_123" },
    "template": "order-confirmation",
    "data": {
      "order_id": "ORD-12345",
      "urgency": "high"
    },
    "routing": {
      "method": "single",
      "channels": ["email", "sms", "push"]
    },
    "channels": {
      "sms": {
        "if": "data.urgency === 'high'"
      }
    }
  }
}
```

For more examples and details, see [Channel Settings - Channel Conditions in JSON](/platform/sending/channel-settings#channel-conditions-in-json).

## What's Next

<CardGroup cols={2}>
  <Card title="Channel Settings" href="/platform/sending/channel-settings" icon="sliders">
    Configure per-channel behavior, conditions, and integrations.
  </Card>

  <Card title="Email Address Fields" href="/platform/content/template-settings/email-fields" icon="envelope">
    Set `From`, `Reply-To`, `CC`, and `BCC` values.
  </Card>

  <Card title="General Settings" href="/platform/content/template-settings/general-settings" icon="gear">
    Manage template IDs, event mapping, tags, and publishing.
  </Card>

  <Card title="Variable Not Found" href="/platform/content/template-settings/variable-not-found" icon="triangle-exclamation">
    Prevent sends when required template variables are missing.
  </Card>
</CardGroup>
