Using conditions for personalization

In this article

Introduction to Conditions

How to create a condition

Examples of conditions




Introduction to Conditions


Conditions allow you to personalize your email design dynamically with conditional statements. This is a valuable tool if you need to send one version of your email to one group and an alternate version to another group.


if/then statements

WordFly conditions follow traditional if/then statements that use data fields and operators.


Tag component Definition Example
IF This is the minimum condition. If conditions can be used alone or at the top of a chain. When a new condition is dropped into an email, it defaults to an if statement. {{if(##DataField## == A) then (A statement) endif}}
ELSE IF Optional. You can chain together as many as needed. Else If conditions can only appear in the middle or end of chain. {{if(##DataField## == A) then (A statement) endif elseif(##DataField## == B) then (B statement) endelseif else(Statement if no conditions are met) endelse}}
ELSE Optional. Use this as a fallback when needed. Else conditions can only appear at the end of chain {{if(##DataField## == A) then (A statement) endif elseif(##DataField## == B) then (B statement) endelseif else(Statement if no conditions are met) endelse}}
END Added automatically. End will end a minimum condition/statement (endif) to allow another (endelseif) to begin; or it will end (endelse) the conditional tag. {{if(##DataField## == A) then (A statement) endif elseif(##DataField## == B) then (B statement) endelseif else(Statement if no conditions are met) endelse}}



Conditions use operators to set data relations and key off statements. The operator tells WordFly what connection to make with the data field in the if part of the conditional statement.


Example: {{if(##DataField## == A) then (A statement) endif}}


In this example, WordFly is looking for DataField to be equal to A in order for the minimum condition to be met to display the A statement. Any subscribers that have data equal to this DataField will see the A statement.


Note: Only certain operators are available depending on the data field selected. For example, with a preference data field, only equal or does not equal operators are available.


Available operators:

  • ==  equal to
  • != does not equal
  • contains
  • does not contain
  • > greater than
  • >= great than or equal to
  • < less than
  • <= less than or equal to


What to expect using conditions:

  • In Modern Editor, use the Conditions toggle in the left panel to drag and drop a condition to the right panel.
  • After dropping the condition, set the type, data field, operator, and value parameters of the condition on the edit content panel (left side). If you don't find the data field you need, you can create a new one.
  • Once dropped, conditions can’t be dragged. If you drop it in the wrong spot, simply delete it and drag over a new one.
  • Conditions cannot be nested inside each other.
  • While nesting conditions is not possible, WordFly does support including a simple dynamic tag (Example: {{##First Name## || Friend}}) in a block that has a condition wrapping it. 
  • Deleting a condition will not delete the content inside of it.
  • Are you a current Dynamic Tags hand-coder? Use caution if you already have existing hand-coded dynamic tags inside a block and want to use our Conditions feature to add more. If you manually add new dynamic tag code in a block, you might break things. Be careful and remember to test.
  • Testing is extremely important. Under the Testing tab of your email campaign, test how the condition is working with Subscriber Preview or by updating the default test list. Learn more




How to create a condition

Conditions live in Modern Editor on the blocks tab. Use the blocks toggle to select conditions. Then pull the conditions block over to the preview panel.


To create a chain of conditions, the conditions need to be touching and directly adjacent to each other. Start by creating individual blocks in your email for the content you need to show to different audiences. Then drop a Condition around each block and set the data field and requirements need to display it. When your email is sent, it will display the content to the subscribers who meet those requirements.


1. Open your email design in Modern Editor


2. Add all your content blocks that need to be conditional to the email design

Building your content first helps lay the foundation for conditions. Add image blocks, text blocks, or whatever you need to display for various subscribers.


3. Toggle to conditions from the left panel


4. Drag and drop the conditions block over to the right panel


5. The condition will wrap around your content block

The condition block cannot be moved at this point. Other blocks can be moved around.



6. Adjust the condition on the left panel

The condition settings include Type, Data Field, Operator and Value.

  • Types are if, elseif, or else. The first and minimum condition starts with if. The last condition in a chain must start with else.
  • Data fields are created under Subscribers > Data Fields and define fields for merging list and subscriber data.
  • Operators help set data relations.
  • Values define data fields. Your data values must match your list or subscriber data exactly.


7. To build on the condition, drag and drop another condition directly below the first one to continue the chain with elseif

Continue adding Type elseif condition blocks as needed to extend it as many times as needed.


8. To end the condition, drag and drop another condition below the last elseif to define the final else condition

The condition must end with a Type else condition block.



9. The final tag with two conditions and an else chained together looks like this in the design



10. Be sure to test

Testing is extremely important with conditions. You'll want to make sure your data and conditions are set up correctly so the right people will see the right thing. Use Subscriber Preview to see what your subscribers will see. If your data field is a List Data Field and you send a test email, you will need to add the list data for the recipients in the Default Test List. Learn more




Examples of conditions

Let’s say you have three messages you want to display in your email based on their audience type:

  • VIP
  • Member
  • All of your other subscribers

For this example, let’s also say you store those VIP and Member values in a data field called Audience. To get started, you would create a content block for each audience in your email. Then drop a Condition around each area. For each condition you would select the type (IF, ELSE IF, or ELSE), the data field (Audience), and the requirements needed to display that block (data equals VIP or Member). In plain language the conditions would be saying:

  • IF the Audience data field is equal to VIP, show this content.
  • (Or) ELSE IF the Audience data field is equal to Member, show this content.
  • (Otherwise) ELSE, show this content to everyone else.





My conditional blocks aren’t working.

  • Check for data field Values. Is the value correct? Does it match in punctuation and capitalization?
  • Check condition Types. Conditions always start with if and end with else.