See related

Conditional shortcut text

Last Update: Oct 2024 • Est. Read Time: 2 MIN
To check plan availability, see the pricing page.

There are times when you might want to send different responses to a user depending on the who the customer is or what they're asking about.

For example, let's say you offer a different return policy depending on the user's billing tier. Conditional shortcuts offer you the flexibility to send one policy when the customer or conversation's custom attribute is set to value1, and send a different response when it's set to value2.    

Who can access this feature?
User typesAdmins can access the Shortcuts page.


Here are some examples of how to use conditional statements in shortcuts:

If Boolean (true/false) is equal to True

{{#ifCond conversation.custom.isBoolValueBool "==" "1"}}
  This boolean is set!!
{{else}}
  this boolean is false
{{/ifCond}}


If Text or String equals Value

{{#ifCond customer.custom.userBillingTierStr "==" "Diamond"}}
  Our return policy is 60 days for Diamond users.
{{else}}
  Our return policy is 30 days for Platinum users.
{{/ifCond}}


If a number is greater than X

{{#ifCond customer.custom.orderCountNum ">=" "1"}}
  I'm sorry you're having issues with your order.
{{else}}
  Hmm, I don't see your order in our system, do you mind sending me the order number?
{{/ifCond}}


Field values in conditional shortcut text

You can extend the flexibility of conditional shortcut text by including field values such as, {{../customer.firstName}} in the output text. Field values allow you to add customized text customized text that's relevant to the properties of a customer or conversation, while also further personalizing the message with other available values.

Because the value is being inserted into the existing structure of the conditional formatting, you will need to call this using the standard curly brackets with the addition of ../ before the field name. Here is an example of how that would look:

{{#ifCond customer.custom.subscriptionTier ">=" "Platinum"}}
  Welcome to the VIP club, {{../customer.firstName}}!
{{else}}
  Welcome to the club, {{../customer.firstName}}!
{{/ifCond}}

Related articles