Перейти к содержимому

IF

Example conditional statements using the integer variable:

<if condition="MessageDay == 1">
  <p>A new month has begun.</p>
</if>

Example conditional statement based on the string variable:

<if condition="SubscriberFirstname == 'John'">
  <p>Happy Name Day!</p>
</if>

Example conditional statements based on the custom subscriber property being a string variable:

<if condition="(string)SubscriberProperty('CurrentCity') == 'New York'">
We’ve special offers for New York area here ...
</if>

Example conditional statement based on the custom subscriber property being an integer variable:

<if condition="(int)SubscriberProperty('age') < 18">
Great offer for teenagers!
</if>

Example conditional statement based on the custom subscriber property being a boolean variable:

<if condition="(int)SubscriberProperty('has_children') == 1">
For all the children toys we’ve a 30% discount!
</if>

Example complex condition (a OR b):

<if condition="SubscriberFirstname == 'Paddy' || SubscriberGeoCountry == 'IR'">
<p>Happy St. Patrick's Day!</p>
</if>