circle-exclamation
This documentation is currently under development. Certain sections are not yet complete and will be added shortly.

Liquid

DotLiquid on The Wallet Crew template Editor

This guide shows how to use DotLiquid templating inside The Wallet Crew platform to build smarter passes, personalise content, and automate the right message at the right moment.

No developer required for the basics.

What’s inside

The two building blocks

Everything in DotLiquid comes down to two types of tags:

Everything else is just text that gets printed as-is.

Showing a value on a pass

circle-info

If you type {{ }} you will see a list of the possible variables.

Put any data field between {{ }} and it shows up on the pass.

What the customer sees on their pass:

circle-info

If the field is empty, nothing shows. No error, no blank label.

Assign and create your own variable

Need to compute something, label it, and reuse it? Use assign.

Or build it from existing data:

if / elsif / else — smart content per customer

This is where passes get smart. Show different content depending on who’s holding the card.

Always close with {% endif %}. It is the most common mistake.

Real Wallet Crew use case: show a different back-of-pass message per tier.

unless condition

unless runs the block when the condition is not true. Great for opt-out logic.

Reads nicely in plain English: unless push is disabled, show this.

Operators, how to compare things

Operator
What it does
Pass example

==

Exactly equal

tier == "Gold"

!=

Not equal

tier != "Standard"

>

Greater than

points > 500

<

Less than

points < 100

>=

Greater than or equal

points >= 500

<=

Less than or equal

points <= 99

and

Both must be true

points > 100 and active == true

or

At least one true

tier == "Gold" or tier == "Platinum"

contains

Includes this value

tags contains "event_guest"

case / when, clean multi-tier logic

When comparing the same field against many possible values, case is cleaner than stacking elsif.

Perfect for loyalty tiers, event ticket categories, or coupon-type labels.

Filters, transform any value

Filters change a value before displaying it. Use the | pipe:

Chain them left to right:

String filters

Filter
What it does
Example
Result

upcase

ALL CAPS

{{ "hello" | upcase }}

HELLO

downcase

all lowercase

{{ "HELLO" | downcase }}

hello

capitalize

First letter uppercase

{{ "marie" | capitalize }}

Marie

strip

Remove surrounding spaces

{{ " hi " | strip }}

hi

replace

Swap a word

{{ "Bonjour Monde" replace: "Monde", Marie" }}

Bonjour Marie

truncate

Cut to N characters

{{ "Long message here" | truncate: 10 }}

Long me

append

Add to the end

{{ "Gold" append: "Member" }}

Gold Member

prepend

Add to the start

{{ "Member" | prepend: "VIP" }}

VIP Member

Real example: clean up a name that came in messy from a form.

Number filters

Filter
What it does
Example
Result

plus

Add

{{ customer.points

plus: 50 }}`

390

minus

Subtract

{{ customer.points

minus: 200 }}`

140

times

Multiply

{{ price

times: 1.2 }}`

120

divided_by

Divide

{{ points

divided_by: 10 }}`

34

modulo

Remainder

{{ points

modulo: 100 }}`

40

round

Round to N decimals

{{ 9.876

round: 2 }}`

9.88

ceil

Always round up

{{ 9.1

ceil }}`

10

floor

Always round down

{{ 9.9

floor }}`

9

Show points until next tier:

Array filters

Filter
What it does

first

First item in a list

last

Last item in a list

size

How many items

join

Combine items into a string

sort

Sort alphabetically or by field

uniq

Remove duplicates

map

Pull one property from all items

where

Filter items by a field value

Show how many rewards a customer has available:

List all active store locations:

Date formatting

Apply the date filter with a format string to display dates cleanly on a pass.

Format tokens:

Token
What it gives
Example

%d

Day

26

%M

Month

3

%y

Short year

25

%A

Full day name

Wednesday

%m

Minutes

30

%H

UTC hour with european standard

13

%h

UTC hour with american standard

1

%s

Seconds

18

%H:%M

Time (24h)

14:30

Shorthand tokens without %:

Token
What it gives
Example

D

Day, month, year

Thursday, March 26

H

UTC hour with european standard

13

M

Months

3

d

Day

26

h

UTC hour with american standard

1

m

Minutes

30

s

Seconds

18

y

Short year

26

H:M

Time (24h)

14:30

Real pass example:

Valid until 31 December 2025

Date Formatting example in our template editor
Date Formatting example in our template editor

Date arithmetic

Add or subtract time from a date. The trick is to convert to seconds first, do the maths, then reformat.

1 day = 86400 seconds.

Handy reference:

Duration
Seconds

1 day

86 400

7 days

604 800

30 days

2 592 000

90 days

7 776 000

1 year

31 536 000

Date flags — is this pass still valid?

Compare a pass date against today to show contextual messages.

Event ticket use case: show a different label before vs after the event.

circle-exclamation

now / today

'now' gives the current moment. Use it anywhere today’s date is needed.

With a friendly format:

Marie, here's your status on Wednesday 25 March 2025.

Combining date filters

Chain multiple steps together to compute, compare, and display dates in one flow.

Show days remaining on a coupon:

Show a renewal reminder 30 days before expiry:

capture — build a message block

capture lets you construct a full string and save it for later. Nothing is displayed until the variable is rendered.

Great for building a push notification body, a back-of-pass description, or any content block that needs to be assembled in steps before showing it.

Questions? Reach out to your Wallet Crew contact or check the Knowledge Basearrow-up-right. Happy templating

Last updated