Skip to content
Start a Free 14-Day Trial

Filters

Apply filters to dynamic fields in appointment messages so your event or client information appears exactly as you want.

Filters can be used to augment fields.

They are referenced inside of fields using the following format:

{{ field_name | FILTER }}

They can be chained together if needed:

{{ field_name | FILTER1 | FILTER2 }}

Some filters accept parameters. In that case, you can use the following syntax:

{{ field_name | FILTER: PARAMETER }}

If you would like to give a 3-hour time window to your clients in the message based on the start time, then you could use the following as your template:

Your installer will be arriving between {{ event.start_time | time }} and {{ event.start_time | add_minutes: 180 | time }}

In the above example, the first field uses the time filter to change the event.start_time from something that looks like 2016-06-06 14:00:00 -0700 to 2:00 PM. The second field uses the add_minutes filter to add 180 minutes to the start time and then output the time — in this case, 5:00 PM. The result would be:

Your installer will be arriving between 2:00 PM and 5:00 PM

The Liquid templating language comes with a set of filters out of the box (see the Liquid filter reference). Apptoto adds and enhances some of the filters.

The following filters are designed to work specifically with the {{ event.start_time }} and {{ event.end_time }} fields.

FilterDescription
dateApptoto enhances this filter by properly formatting the date based on your locale. If you use the %A format, it will say “Sunday” if your locale is set to English, and “Domingo” if your locale is set to Spanish. The locale is set on your Account tab. (Localized)
date_fullDate format filter that changes the date to say “Tuesday, October 15th”. (Localized)
date_and_time_fullDate format filter that changes the date to say “Tuesday, October 15th at 2:00pm”. (Localized)
date_phraseDate format filter that changes the date to say “6/21”. (Localized)
date_with_yearDate format filter that changes the date to say “6/21/1977”. (Localized)
day_with_dateDate format filter that changes the date to say “Wednesday the 30th July 2012”. (Localized)
timeDate format filter that changes the date to say “3:00pm”.
time_24Date format filter that changes the date to say “15:00”.
day_and_timeDate format filter. Results in “tomorrow at 8:00am” if the date is tomorrow or “on Saturday, November 23rd at 2:00pm” if the date is after that.
tomorrowAdvances the date forward one day. e.g. {{event.start_time | tomorrow | date_full}} would result in “Wednesday, October 16th”.
yesterdayRetreats the date backward one day. e.g. {{event.start_time | yesterday | date_full}} would result in “Monday, October 14th”.
beginning_of_weekFinds the Monday immediately before the date provided.
add_minutesAdvances the time forward by N minutes. e.g. {{ event.start_time | add_minutes: 30 | date: "%l:%M %p"}} would result in “4:30 pm” if the start time of the appointment was at 4:00pm.
browser_timeShows the time to the user in the time zone of the browser. This is only available on the Appointment Page. e.g. {{ event.start_time | browser_time }} would show the time to the client in their time zone.
browser_date_and_timeSame as browser_time except it includes the date.
FilterDescription
defaultAllows you to specify a default for a field. e.g. {{ event.data.service | default: 'Haircut' }} would result in “Haircut” being used in the message if the event didn’t have the service specified. This is applicable for all types of data (not just strings), but is mostly used for strings.
everything_beforeExtracts everything before a character in a string. e.g. if you put “haircut – fred” in the title and want Apptoto to include everything before the ”-” in the message, then you could use: {{ event.title | everything_before: "-" }}.
everything_afterSame as everything_before but includes everything after.
say_digitsTells the text-to-speech engine to say individual digits, not whole numbers. e.g. {{ participant.phone | say_digits }}.
capitalizeCapitalizes the string by making the first letter of the first word uppercase.
line_afterFinds the line after a string. e.g. {{ event.content | line_after: 'Send To:' }}.
lines_afterFinds N lines after a string. e.g. {{ event.content | lines_after: 'Send To:', 2 }} would find the 2 lines after the line containing “Send To”.
play_mp3Calls only. Plays whatever MP3 file you link to during the call. e.g. {{ 'https://api.twilio.com/cowbell.mp3' | play_mp3 }}.
pauseCalls only. Pauses for X seconds. e.g. {{ '3' | pause }} will pause for 3 seconds.
html_to_textConverts HTML to text.