---
title: "Aborting Messages"
slug: "liquid-tags-aborting-messages"
updated: 2026-03-24T13:29:42Z
published: 2026-03-24T13:29:42Z
canonical: "academy.insiderone.com/liquid-tags-aborting-messages"
---

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

# Aborting Messages

Use {% abort_message %} to cancel a message and prevent it from being sent.

## Syntax

All four forms are valid.

```plaintext
{% abort_message "reason" %}
{% abort_message 'reason' %}
{% abort_message("reason") %}
{% abort_message('reason') %}
```

You can use it as follows without a reason (defaults to "Template aborted").

```plaintext
{% abort_message %}
```

## How does it work?

- The message is **not** **delivered**.
- The abort reason is **logged** for debugging.
- Content after the tag is **not** **rendered**.
- This is a controlled cancellation, but not an error.

## Common patterns

You can abort if the required data is missing.

```plaintext
{% if email == blank %}
  {% abort_message "No email address on file" %}
{% endif %}

{% if name == blank %}
  {% abort_message "Missing user name" %}
{% endif %}
```

You can abort based on the user state.

```plaintext
{% if c_loyalty_tier == blank %}
  {% abort_message "User not enrolled in loyalty program" %}
{% endif %}

Hello {{ name }}, your {{ c_loyalty_tier }} member offer is inside...
```

You can abort when the personalised data is unavailable.

```plaintext
{% if c_last_purchased_product == blank %}
  {% abort_message "No purchase history for replenishment campaign" %}
{% endif %}

Still stocking up on {{ c_last_purchased_product }}?
```

You can apply multiple guard checks at the top.

```plaintext
{% if email == blank %}{% abort_message "No email" %}{% endif %}
{% if name == blank %}{% abort_message "No name" %}{% endif %}
{% if c_loyalty_tier == blank %}{% abort_message "Not a loyalty member" %}{% endif %}

Hello {{ name }}, your exclusive {{ c_loyalty_tier }} offer awaits...
```

The abort reason string is recorded in the message activity log. You can use descriptive reasons to make debugging easier.
