Using Liquid Language Template

Rather than show the same content across all your wallet passes and text messages, you’ll likely want to personalize mobile experiences with the use of variables. To do so, Vibes uses a system known as the Liquid Template Language framework from Shopify.

In the scenarios below, we’ll demonstrate a few ways you may want to use the tags and filters to output data for your customer. However, keep in mind that the most comprehensive information about Liquid Template Language is found in Shopify’s documentation.

What is Liquid Template Language?

This framework makes it possible to insert variables to your mobile passes and messages, which will change for each customer based on their unique customer data. We often refer to these variables and their outputs as “tokens” or “variable tags”.

In addition to simply displaying variables, the language’s Liquid Format Filters allow you to edit the formatting, append additional data, remove data, make calculations (including date manipulation), and much more.

Date & Time Format Filters

Format filters take a field and format it into a human-readable output. Dates are stored in ISO 8601 format in the UTC timezone.

Commonly Used Filters

Below is a table of some commonly used format filters. Please note th is not an exhaustive list, and users should refer to Shopify's documentation for more.

FilterDescriptionExample Output for 20240101T000000Z
%dDay of the month represented in 2 digits01
%mMonth of the year represented in 2 digits01
%BMonth of the year written out completelyJanuary
%bMonth of the year abbreviated into 3 charactersJan
%yYear represented in 2 digits24
%YYear represented in 4 digits2024
%jDay of the year, from 1 to 3661
%HHour of the day, 24-hour clock (00 to 23)00
%IHour of the day, 12-hour clock (01 to 12)01
%MMinute of the hour (00 to 59)00
%SSecond of the minute (00 to 59)00
%ADay of the week written out completelyMonday
%aDay of the week abbreviated into 3 charactersMon
%uDay of the week in number form, with Monday equaling 11
%wDay of the week in number form, with Sunday equaling 12

Commonly Used Formats

FormatExample Output for 20240101T000000Z
"%d/%m/%Y"01/01/2024
"%m-%d-%y"01-01-2024
"%B %d, %Y"January 01, 2024

📘

Additional resources

See Shopify's liquid cheat sheet for more information.