if and for. You write them in the email’s design, between the placeholders you already use. For the placeholders themselves, see Personalizing an email. For ready-made snippets, see Liquid recipes.
Show a section to some recipients only
Wrap the section inif and endif. Recipients who don’t match never see it, and you don’t need to do anything else.
person.title, person.companyName, or person.lifecycleStage.
Switch between two versions
Addelse to show something different to everyone who doesn’t match.
else out, everyone else sees nothing.
Repeat a list
To show a different number of bullet points each time, usefor over a copy field whose type is array.
points as an array.
Run a promotion for a limited time
Compare today’s date to an end date you keep in a copy field. allGood works out the email when it sends, so a nurture email that goes out over many months picks the right version each time.2026-12-01, so the comparison orders correctly. Because the date sits in the copy, you can change it without editing the design.
- The date is fixed when the email sends. A recipient who opens it a week later still sees the version that was live when it sent. If the end date matters, state it in the email.
- Time zones: the send time is likely in UTC, so the cutoff can shift by up to a day for some of your recipients.
- Preview shows today. To check the after-the-date version, move the end date back for a moment.
- Review perennial emails. Once a promotion ends, your email shows the fallback or nothing. Note the end date where reviewers will see it.
What can go wrong
- A misspelled field counts as empty.
{% if person.titel == "VP" %}quietly means false for everyone. Preview the email as a real person who should match. - Keep required footer items outside conditions. Your unsubscribe link and postal address must appear in every recipient’s message. See Before an email can send.
- Wrap whole sections. Put a condition around an entire
mj-section, not around onemj-columnof a multi-column section. - One bad render stops the whole send. If your email fails to render for one recipient, the whole send fails. Before you publish, preview it as someone with blank fields.
- Only standard Liquid works. There are no custom filters.