Text variables allow you to insert dates, times, and even the sender's name into messages automatically. When combined with Message Templates and Scenarios, these variables can add vital information to alerts with ease.
For example, you can use a date variable to make sure your dispatcher never types in the wrong date again.
In the example below, I'm editing a template to add in {{@date_mdy}}
, which will be substituted with the current date in the format mm/dd/yyyy.
Using this template, I never have to type in today's date when I send this "Campus Closed" message. The Omnilert system will always insert the date for me.
There are many possible text variables that you can use to present different date and time formats, as well as other info, such as the sender's name.
Available Text Variables:
The following is a chart of the available text variables that you can embed into your message content:
variable | description | example output |
{{@time_his}} | Message time in 24-hour clock format (hours, minutes, seconds) | 09:07:21 |
{{@time_hist}} | Message time in 24-hour clock with time zone | 09:07:21 EDT |
{{@time_gis}} | Message time in 12-hour clock format | 9:07:21 |
{{@time_gisa}} | Message time in 12-hour clock format with AM/PM | 9:07:21 AM |
{{@time_gisat}} | Message time in 12-hour clock format with AM/PM and time zone | 9:07:21 AM EDT |
{{@date_dow_short}} | Today's day of the week, in a short format. | Wed |
{{@date_dow}} | Today's day of the week, in long format | Wednesday |
{{@date_mdy}} | Current date, shorthand (mm-dd-yyyy) | 03-18-2020 |
{{@date_med}} | Current date, medium format | Wed, Mar 18, 2020 |
{{@date_long}} | Current date, long format (Best for voice templates!) | Wednesday, March 18, 2020 |
{{@date_mdyhms}} | Current date with the current time | 03-18-2020 09:07:21 |
{{@date_mdyhmst}} | Current date, time and time zone | 03-18-2020 09:07:21 EDT |
{{@date_ymd}} | Current date, yyyy-mm-dd format | 2020-03-18 |
{{@date_ymdhms}} | Current date and time, yyyy-mm-dd format | 2020-03-18 09:07:21 |
{{@date_ymdhmst}} | Current date and time, yyyy-mm-dd /w time zone | 2020-03-18 09:07:21 EDT |
{{@time_hiadmj}} | Current time and the date in shorthand, AM/PM, day, mmm dd | 10:57:53 EDT 09:07 AM, Wed, Mar 18 |
{{@tomorrow_date_dow_short}} | Tomorrow's day of the week, short | Thu |
{{@tomorrow_date_dow}} | Tomorrow's day of the week, long | Thursday |
{{@tomorrow_date_mdy}} | Tomorrow's date, shorthand | 03-19-2020 |
{{@tomorrow_date_med}} | Tomorrow's date, medium format | Thu, Mar 19, 2020 |
{{@tomorrow_date_long}} | Tomorrow's date, long format (Best for voice) | Thursday, March 19, 2020 |
{{@tomorrow_date_mdyhms}} | Tomorrow's date and time | 03-19-2020 09:07:21 |
{{@tomorrow_date_mdyhmst}} | Tomorrow's date and time with time zone | 03-19-2020 09:07:21 EDT |
{{@tomorrow_date_ymd}} | Tomorrow's date, yyyy-mm-dd | 2020-03-19 |
{{@tomorrow_date_ymdhms}} | Tomorrow's date. yyyy-mm-dd /w time | 2020-03-19 09:07:21 |
{{@tomorrow_date_ymdhmst}} | Tomorrow's date. yyyy-mm-dd /w time and time zone | 2020-03-19 09:07:21 EDT |
{{@account_name}} | The text value of your Account Name setting. | Sample Organization |
{{@admin_username}} | Sending admin's username | jdoe |
{{@admin_firstname}} | Sending admin's first name | John |
{{@admin_lastname}} | Sending admin's last name | Doe |
{{@admin_fullname}} | Sending admin's full name (first and last) | John Doe |
Tips / Tricks:
- Pick the right variable for the job. Certain variables are more appropriate for text messages (SMS) than other media, such as voice calls. For example, you might want to use a "long" date in a voice call, but shorthand in SMS. (Time values will not read properly for Text-to-Speech voice calls.)
- Watch out for creeping message length. Remember that a variable is a placeholder. It is possible that the variable's length will be shorter than the text it represents. Keep this in mind when composing messages to endpoints with strict limits, like SMS and Twitter!
Comments
0 comments
Please sign in to leave a comment.