You can use if/else statements to insert different content for different customers, or for different events.
If and else statements use a curly bracket and a percentage sign, like this:
{% if customer.first_name == "John" %}
Remember that any if statement always needs an ending:
{% endif %}
So a full message template could look something like this:
{% if customer.first_name == "John" %}Your name is John!{% else %}Your name is not John.{% endif %}
You'll notice we've added an else statement into the snippet above. This is optional, but helpful for defining a default message.
For a customer with the first name "John", the above template would send:
Your name is John!
Otherwise, it would send:
Your name is not John.
Although these examples aren't particularly interesting, if/else statements give you a lot of flexibility. For example, you could add extra content for your members, or use different language for different audience segments.