Advanced Personalization for Text Messages
Text-Em-All offers a personalized text messaging option that will allow you to add personalized fields to your new conversations such as first or last name. Our software also allows advanced users to use conditional statements to create super customized text messages.
if
Executes a block of code only if a certain condition is true.
Input:
{% if notes == "Washington St." %} Your trash pickup will be delayed. {% endif %}
Unless
The opposite of if - executes a block of code only if a certain condition is not met.
Input:
{% unless notes == "Washington St." %} Your trash pickup will be on time. {% endunless %}
Output:
Your trash pickup will be on time.
elsif/ else
Adds more conditions within an if or unless block.
Input:
{%if firstname == "john"%} Hey John! {%elsif firstname=="sam"%} Hey Sam! {%else%} Hi Stranger! {%endif%}
Output:
Hi Stranger!
case/when
Creates a switch statement to compare a variable with different values. case
initializes the switch statement, and when
compares its values.
Input:
{%firstname="Sam"%} {%casehandle%} {%when"sam"%} This is Sam {%when"john"%} This is John {%else%} This is not Sam nor John {%endcase%}
Output:
This is Sam