---
title: "Change a Message With \"If/Else\" Logic"
description: an overview of if/else statements
---

[Skip to content](https://support.encorepro.com/change-a-message-with-if/else#main-content)

[Get Help](https://support.encorepro.com/kb-tickets/new?hsLang=en) [Customer portal](https://support.encorepro.com/portal?hsLang=en)

[![EP Support](https://support.encorepro.com/hs-fs/hubfs/EP%20Support.png?width=175&height=43&name=EP%20Support.png)](https://support.activitystream.com/?hsLang=en)

- [Encore Pro](https://support.encorepro.com/)
- Yesplan
  
  Show submenu for Yesplan

    - [Manual](https://manual.yesplan.be)
    - [Learning](https://learning.yesplan.be)
- [Portal](https://support.encorepro.com/portal)
- Legacy Tools
  
  Show submenu for Legacy Tools

    - [Activity Stream](https://support.encorepro.com/activity-stream)
    - [crowdEngage](https://support.encorepro.com/crowdengage)

Open main navigation

Close main navigation

- [Encore Pro](https://support.encorepro.com/)
- Yesplan
  
  Show submenu for Yesplan

    - [Manual](https://manual.yesplan.be)
    - [Learning](https://learning.yesplan.be)
- [Portal](https://support.encorepro.com/portal)
- Legacy Tools
  
  Show submenu for Legacy Tools

    - [Activity Stream](https://support.encorepro.com/activity-stream)
    - [crowdEngage](https://support.encorepro.com/crowdengage)
- [Get Help](https://support.encorepro.com/kb-tickets/new)
- [Customer portal](https://support.encorepro.com/portal)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [Knowledge Base](https://support.encorepro.com/?hsLang=en)
2. [crowdEngage](https://support.encorepro.com/crowdengage?hsLang=en)
3. [Templating](https://support.encorepro.com/crowdengage?hsLang=en#templating)

# Change a Message With "If/Else" Logic

## Send one message that says different things to different people - a different door for the stalls, a drinks note only VIPs see.                                              The Criteria Builder decides who gets a whole step; if/else changes the wording inside a single message everyone receives.

Criteria Builder vs if/else — which to use

Both target by customer, but at different levels:

- **[Criteria Builder](https://support.encorepro.com/target-recipients-with-the-criteria-builder?hsLang=en)** — sends an entire flow step to a chosen group (e.g. a text only to the stalls). Reach for this first; it's simpler.
- **if/else** — keeps one message going to everyone, but swaps a line based on who's reading it. Use it when the message is 90% the same and you just want one detail to differ.

 The building block

An `if` always has to be closed with an `endif`:

```
{% if customer.first_name == "John" %} ... {% endif %}
```

So this shows a line **only** to customers named John — everyone else sees nothing there:``To give everyone else different wording, add `else`:

```
{% if customer.first_name == "John" %}Your name is John!{% else %}Your name is not John.{% endif %}
```

Now Johns gets "Your name is John!" and everyone else gets "Your name is not John."

Where it earns its keep  
This can be used for various different criteria, where a customer is sitting, their ticket type, if they are a member etc. 

**A line only VIPs see, based on ticket type:**

```
{% if "VIP" in ticket_types %} Please remember to collect your complimentary drink before the show {% endif %} 
```

Two things matter with logic: the code has to be valid for crowdEngage, and the values (area names, ticket types) have to match your ticketing system exactly. Always test on yourself before sending live — and if you'd like us to build or check a template, email support@encorepro.com

- [Get Started](https://support.encorepro.com/get-started?hsLang=en)
- [Shows](https://support.encorepro.com/shows?hsLang=en)
- [Audience](https://support.encorepro.com/audience?hsLang=en#main-content)

    - [Segments](https://support.encorepro.com/audience?hsLang=en#segments)
    - [Lists](https://support.encorepro.com/audience?hsLang=en#lists)
- [Campaigns](https://support.encorepro.com/campaigns?hsLang=en#main-content)

    - [Email](https://support.encorepro.com/campaigns?hsLang=en#email)
    - [SMS](https://support.encorepro.com/campaigns?hsLang=en#sms)
    - [Lead Capture](https://support.encorepro.com/campaigns?hsLang=en#lead-capture)
- [Automations](https://support.encorepro.com/automations?hsLang=en)
- [Dashboards](https://support.encorepro.com/dashboards?hsLang=en)
- [Yesplan](https://support.encorepro.com/yesplan?hsLang=en)
- [Activity Stream](https://support.encorepro.com/activity-stream?hsLang=en#main-content)

    - [Access & Navigation](https://support.encorepro.com/activity-stream?hsLang=en#access-navigation)
    - [Dashboards & Overviews](https://support.encorepro.com/activity-stream?hsLang=en#dashboards-overviews)
    - [Customers & Segmentation](https://support.encorepro.com/activity-stream?hsLang=en#customers-segmentation)
    - [Campaigns & Email](https://support.encorepro.com/activity-stream?hsLang=en#campaigns-email)
    - [Working with Activity Stream](https://support.encorepro.com/activity-stream?hsLang=en#working-with-activity-stream)
    - [Integrations](https://support.encorepro.com/activity-stream?hsLang=en#integrations)
- [crowdEngage](https://support.encorepro.com/crowdengage?hsLang=en#main-content)

    - [Messaging](https://support.encorepro.com/crowdengage?hsLang=en#messaging-1)
    - [Preorders](https://support.encorepro.com/crowdengage?hsLang=en#preorders)
    - [Mobile Ticket](https://support.encorepro.com/crowdengage?hsLang=en#mobile-ticket)
    - [Templating](https://support.encorepro.com/crowdengage?hsLang=en#templating)
    - [Resources](https://support.encorepro.com/crowdengage?hsLang=en#resources)

[![encore-logo-black-1](https://support.encorepro.com/hs-fs/hubfs/encore-logo-black-1.png?width=200&height=30&name=encore-logo-black-1.png "encore-logo-black-1")](https://www.activitystream.com)

<https://www.facebook.com/Activitystream> <https://twitter.com/2activitystream> <https://www.youtube.com/channel/UCQe3g-C4tAbZ9Qs0kV26EQw> <https://www.linkedin.com/company/activitystream/> [mailto:support@activitystream.com](mailto:support@activitystream.com)

Copyright © 2026, Encore Pro