Skip to content

Abort messages

Optionally, you can use the abort_message("optional reason for aborting") Liquid message tag within conditionals to prevent sending a message to a user. This reference article lists some examples of how this feature can be used in marketing campaigns.

Test sends with abort_message()

abort_message() stops the send for users who don’t meet your condition. The message won’t appear on their profile and won’t count toward deliveries or frequency capping.

If test sends never arrive, preview as a user who satisfies the abort condition, then on Test Send enable Override recipients’ attributes with current preview user’s attributes (or add a Content Test Group member who qualifies).

Abort message if “Number Games Attended” = 0

For example, let’s say that you did not want to send a message to customers who have not attended a game:

1
2
3
4
5
6
7
{% if custom_attribute.${Number_Game_Attended} == 1 %}
Loved the game? Get 10% off your second one with code SAVE10.
{% elsif custom_attribute.${Number_Game Attended} > 1 %}
Love the games? Get 10% off your next one with code SAVE10.
{% else %}
{% abort_message() %}
{% endif %}

This message will only send to customers who are known to have attended a game.

Message English speaking customers only

You can message English-speaking customers only by creating an “if” statement that’ll match when a customer’s language is English and an “else” statement that will abort the message for anyone who does not speak English or does not have a language on their profile.

1
2
3
4
5
6
{% if ${language} == 'en' %}
Send this message in English!
{% else %}
{% abort_message() %}
{% endif %}

By default Braze will log a generic error message to your Message Activity Log:

1
{% abort_message %} called

You can also have the abort message log something to your Message Activity Log by including a string inside the parentheses:

1
{% abort_message('language was nil') %}

Message error log in the Developer Console with an abort message of "language was nil".

Query for abort messages

You can use Query Builder or your own data warehouse, if it’s connected to Braze, to query for specific abort messages that are triggered when Liquid logic causes a message to abort.

When abort logic is evaluated

The timing of abort logic evaluation depends on the message channel.

Push, email, SMS, webhooks, and Content Cards

Abort logic is evaluated at send time, when Braze processes the message for delivery.

In-app messages

Abort logic is evaluated for templated in-app messages only at the time the in-app message is triggered (for example, when the user performs the trigger event or starts a session), not when the message is initially sent to the device. In-app messages are delivered to the SDK on session start and cached locally; the Liquid—including any abort_message() calls—is executed when the trigger condition is met.

Troubleshooting high abort rates

If a campaign or Canvas step shows many users entered but few sends, or deliveries look lower than expected, abort logic is a common cause—especially when Liquid requires attributes, catalog data, or list values that are missing at evaluation time.

Check the Message Activity Log

  1. In the Braze dashboard, open the Message Activity Log for the campaign or Canvas message step.
  2. Filter for abort-related entries. By default, Braze logs {% abort_message %} called. If you passed a reason string to abort_message(), that text appears instead.
  3. Note whether aborts cluster on one channel (for example email only) or across channels in the same Canvas.

Verify attributes and Liquid at send time

For push, email, SMS, webhooks, and Content Cards, abort logic runs when Braze processes the message for delivery—not when the user entered a Canvas or when a trigger event fired earlier.

  • Confirm required custom attributes, event properties, or catalog fields are set on the user before the Message step runs.
  • Add explicit nil or empty checks before calling abort_message(). An else branch that aborts when a value is missing stops the send for any user without that data.
  • If personalization depends on a list, segment, or Connected Content response, confirm that data is available when the Message step executes. A user can enter a Canvas before list membership or downstream data is ready.

Canvas-specific behavior

If a Message step is aborted in a Canvas, the user does not exit the Canvas. Instead, they proceed to the next step. Aborts affect only the send count for that Message step.

When diagnosing Canvas aborts:

  • Compare entered users on the Message step to sent users on the same step.
  • If only one channel aborts, review channel-specific Liquid or subscription status for that step.
  • If aborts spike after a list or catalog update, check whether the Message step ran before the update completed.

Validate with preview and test sends

Preview as a user in the message composer whose profile matches an affected recipient. For test sends, enable Override recipients’ attributes with current preview user’s attributes when your abort logic depends on profile data.

For more abort examples, see Query for abort messages.

Considerations

The abort_message() Liquid message tag prevents messages from sending to users, meaning the message won’t display on user profiles, and won’t count toward deliveries or frequency capping.

New Stuff!