Include content in your snippets conditionally using the {if} command

Hey Text Blaze community! :fire: I wanted to share some cool snippets that can be made with Text Blaze's {if} command.

The Text Blaze {if command} allows you to conditionally use content in your snippets. The command lets you either include or exclude content based on conditions that you set within a snippet itself.

Using the {if} command can help you get more out of your snippets and create templates for any scenario.

Note: You can learn more about the {if} command on our recent YouTube video on it.

Useful Examples of the {if} command

Time-Based Greeting

if-launch-greetings

This snippet allows you to insert a greeting based on the time of day. Depending on your current time, the snippet will insert a different greeting. For example, if your current time is after 12:00 pm but before 5:00 pm, it will insert “Good afternoon.”

Good {if: {time: H} < 12}morning {elseif: {time: H} < 17}afternoon {elseif: {time: H} >12} afternoon{else}evening{endif}


Message That Depends on Who You’re Talking to

if-launch-client-message

This snippet allows you to send a message depending on the person that emailed/messaged you. For example, if a coworker messages you, it sends them a calendar link to schedule a meeting with you. On the other hand, if a client messages you with a problem, it sends them a message saying you’ll get back to them with a solution.

This is a generic template, so feel free to customize it to automatically add messages to whoever you are talking to.

{note}Message to: {formmenu: coworker; default=client (with problem); potential client; client (without problem); name=message}{endnote: trim=no}
{if: message=="coworker"}Hello! Feel free to schedule a time with me to catch up: https://calendar.google.com/calendar/u/0/r/appointment.
{elseif: message=="client (with problem)"} I'm sorry you're experiencing this issue. I'll look into it and get back to you once I find a solution.
{elseif: message=="potential client"}Hello! If you're interested in Text Blaze, please check out our site (blaze.today)!
{elseif: message=="client (without problem)"}Hello! Are you enjoying Text Blaze? I'm excited to hear what you think!{endif: trim=yes}


Message depending on customer status

if-launch-customer-notes

This snippet can be used to send an automated message regarding the status of a customer. For example, if they are new, you can suggest guides for them to review. If they are having issues, you can tell them you will look into it.

Again, feel free to customize these as needed.

{note}Customer notes snippet {formmenu: new customer; default=has problem; is happy; take next steps; name=customernotes; multiple=no}{endnote}
{if: customernotes=="new customer"}Hello, glad to have you on board! Please refer to our guides and videos to get started.{endif: trim=yes}
{if: customernotes=="has problem"}I'll take a look at your problem and see what I can figure out. I'll get back to you as soon as possible. {endif: trim=yes}
{if: customernotes=="is happy"}I'm glad you are enjoying our product! Please reach out if you have any questions :){endif: trim=yes}
{if: customernotes=="take next steps"}We appreciate your support. In fact, we're happy to provide you with free access.{endif: trim=yes}


Automated Response to Scheduled Meeting

if-launch-meeting-scheduled

This snippet can be used to quickly send an automated message to someone who scheduled a meeting with you. The {if} command along with the {formtoggle} command help to dynamically include content based on your selections.

Thanks for scheduling a meeting with me to discuss the upcoming initiative. Here are some details to prepare you for our meeting on {formdate: MMMM Do YYYY; name=meetingdate; start={time: YYYY-MM-DD}}:

{formtoggle: name=Usemymeetinglink; default=no}- The meeting will happen on my Zoom bridge, Join Meeting - Zoom {endformtoggle}
{formtoggle: name=includeagenda; default=no}- This will be our agenda: {formparagraph: name=agenda}{endformtoggle}
{formtoggle: name=managerattending; default=no}- as an FYI, my manager will be attending, too.{endformtoggle}

{if: Includeagenda=="no"}Could you let me know what you had in mind for an agenda?{else}Let me know if that agenda looks good to you.{endif: trim=no}

{if: managerattending}My manager will be attending just to keep them in the loop about what's happening.{endif: trim=yes}

{if: Usemymeetinglink=="no"}Since we're not using my Zoom link, do you have a virtual meeting link you could provide for our meeting?{else}I'll see you on my Zoom link on {=meetingdate}.{endif: trim=no}

If you have any questions about the {if} command, check our community, refer to our guide, or email support@blaze.today.

2 Likes