Follow

HOW TO CREATE COMMUNICATION TEMPLATES WITH CONDITIONS

Conditional expressions in WINK help you control who sees what in your email/SMS. When you add conditional expressions to a specific block of content, it will show only to the recipients who meet the conditions you set.

In this article, you'll learn about conditional expressions and how to use them.

 

Before you start

Here are some things to know before you begin this process.

  • Make sure you're familiar with how to create a communication template in WINK. To learn more, check out How to Create Communication Templates.
  • If you have more than one recipient, make sure you use the correct dynamic fields and conditions for the recipients you plan to send to.
  • Conditional expressions don't work in email subject lines.
  • Conditional expressions can become complex very quickly, so be sure to template thoroughly before sending to your recipients. If you want to do something extensive, contact WINK Support for assistance.

How it works

Conditional Expressions work similar to programming languages. At the start of your conditional content, you'll add an opening expression with certain operators and values. You'll then add a closing expression at the end of your conditional content in the same content block as the opening expression. 

 

Conditional expressions can do a lot, and you may want to include multiple sets of conditional expressions in your template.

 

Available operators

Operator Definition
== equal to

!=

not equal to
> greater than
< less than
>= greater than or equal to
<= less than or equal to

 

Conditional expression statements will support IF, ELSE, and ELSEIF logic, as represented in this table.

 

Name Definition Example
IF Use IF to indicate the content to display if the {dynamic.Field} value is true.

{IF({dynamic.Field})} content to display

{ENDIF}

ELSE Use ELSE to indicate alternative content to display if the {dynamic.Field} value is false.

{IF({dynamic.Field})} content to display

{ELSE} alternative content to display

{ENDIF}

ELSEIF Use ELSEIF to specify a new {dynamic.Field} to be matched against if the first {dynamic.Field} value is false.

{IF({dynamic.Field1})} content to display

{ELSEIF({dynamic.Field2})} alternative content to display

{ENDIF}

 

Here is a complete example of a conditional appointment confirmation SMS where different locations offer different promotions. 

 

Dear {Patient.FirstName},

Your appointment has been scheduled at {Appointment.StartTime} on {Appointment.StartDate}. If you wish to reschedule, please contact us as soon as possible.

{IF({Store.ID} == 1)}

Buy one set of lenses, and receive the second at 50% off!!

{ELSEIF({Store.ID} == 2)}

Buy one pair of glasses, and get the second pair at 50% off!!

{ELSE}

Buy two pair of glasses, and get the third pair FREE!!

{ENDIF}

Conditions apply.

Thank-You,

{Store.CompanyName}
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk