Skip to main content
Use Conditions in template and channel settings to control whether content sends. Conditions can reference values from the Send API data object or the User Profile. If you want to disable the entire notification, set conditions in Template Settings. To disable specific channels, set conditions in Channel settings.
For a conceptual overview of when to use template conditions vs channel conditions, see Channel Settings.
  • Channel conditions only apply to the channel where you set them.
  • User 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.

Setting Send Conditions

For Notifications and Channels

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

Channel Settings

For Content Blocks

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

Setting Conditions

  1. Select the condition source, then choose the property and value you want to evaluate.
You can access nested values using dot notation.
Conditions Source
  1. Set the property name, operator, and value that controls whether the notification, channel, or content block is disabled.
Condition Operators
If you set multiple conditions, all conditions must be met to disable the message.
Multiple Conditions

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:
{
  "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.
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.
{
  "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.

What’s Next

Channel Settings

Configure per-channel behavior, conditions, and integrations.

Email Address Fields

Set From, Reply-To, CC, and BCC values.

General Settings

Manage template IDs, event mapping, tags, and publishing.

Variable Not Found

Prevent sends when required template variables are missing.