See related
No related articles

Use conditional text in shortcuts

Last Update: Aug 2025 • Est. Read Time: 3 MIN
To check plan availability, see the pricing page.

Sometimes, you'll want to tailor your response based on the customer's identity or the specifics of their request. That's where conditional shortcuts come in.

For example, if your return policy varies by billing tier, you can use a conditional shortcut to automatically send one message to Diamond-tier customers and a different message to all other customers.

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


In this article

When to use conditional text

Use conditional text when:

  • A field might be empty or unknown
  • You only want to show something if it’s true (like if someone is a loyalty member)
  • You want to prevent placeholders from showing up blank in your message

Examples of conditional logic in shortcuts

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}}


Example 1: Show the Loyalty Tier only if it exists

You want to include a customer’s loyalty tier in your message, but only if that information is available. If the field is empty, nothing should be sent.

If you use the shortcut without conditional text:

Thanks for being a {{customer.loyaltyTier}} member!


And the loyalty tier is missing, this could result in:

Thanks for being a member!

To avoid that, wrap your message in a conditional block:

{{#if customer.loyaltyTier}}
Thanks for being a {{customer.loyaltyTier}} member!
{{/if}}


To use this text in your message:

  • Copy the whole block, including {{#if}} and {{/if}}
  • Replacecustomer.loyaltyTier if you're checking a different field

What customers will see

If this is true...The message looks like this:
customer.loyaltyTier = GoldThanks for being a Gold member!
customer.loyaltyTier is empty(No message is sent)


Example 2: Show a message only if the customer is subscribed

If you're storing a true/false value for a customer's subscription status, you can use a conditional block like this:

{{#if customer.subscribed}}
You're subscribed to product updates!
{{/if}}


To use this text in your message:

  • Copy the full block, including {{#if}} and {{/if}}
  • Replacecustomer.subscribed if you're checking a different Boolean field

What customers will see

If this is true…The message looks like this:
customer.subscribed = trueYou're subscribed to product updates!
customer.subscribed = false or not set(No message is sent)


Example 3: Use contains to check if a channel is part of the conversation

You can use contains to check whether a specific value, like a channel, tag, or label, is included in a list of values, so you can send a specific message when that value is present. For example, you might want to check if "email" is one of the channels in a conversation. You can do this by using a conditional block with contains like this:

{{#if (contains conversation.channels "email")}}
  Thank you for contacting our support team via email. We'll respond to your inquiry at {{customer.email}} within 24 hours.
{{else}}
  Thank you for reaching out to our support team. We'll get back to you as soon as possible through your preferred contact method.
{{/if}}


To use this text in your message:

  • Copy the full block, including {{#if}} and {{/if}}
  • Replaceemail with the channel you want to check for (for example, chat, SMS, etc).

What customers will see

If the email channel is included in the conversation...The message looks like this:
Yes (conversation.channels contains "email")Thank you for contacting our support team via email. We'll respond to your inquiry at John@email.com within 24 hours.
NoThank you for reaching out to our support team. We'll get back to you as soon as possible through your preferred contact method.


Related articles