Skip Message (Stop Sending)

Overview

You may find yourself in a scenario where you want to skip/suppress a message for a user based on some logic in the content itself. This tag allows you to do so.

{% skip_message message:"<user defined message>" %}

All message skips caused by this liquid tag will be recorded as "Message Skipped" event in User's journey with:

  • reason = custom_skip

  • reason_detail = <user defined message>

For example, code snippets that can be included on top or within the personalization logic of any message.

Use Cases

Skip if there is no data in the external feed:

{% if ext_feed == empty %} {% skip_message message:"No data in feed"}


Skip if a user received a message within the last 2 days:

{% assign today_date = 'now' | date: '%s' %}
{% assign pre_date = last_contacted | date: '%s' %}
{% assign diffSeconds = today_date | minus: pre_date %}
{% assign diffDays = diffSeconds | divided_by: 3600 | divided_by: 24 %}
{% if diffDays < 2 %}
{% skip_message message:"Last contacted within last 2 days" %}
{% endif%}