For the complete documentation index, see llms.txt. This page is also available as Markdown.

Custom Liquid filters

Filters are simple methods that modify the output of numbers, strings, variables, and objects. They are placed within an output tag {{ }} and are denoted by a pipe character |. In addition to the standard filters, Stockeo also provides custom filters.

base64_encode

Encodes the provided input into Base64 format. If the input is binary data, it is directly converted into a Base64 string; otherwise, the input is first converted into a UTF-8 byte representation before encoding.

{{ "Hello World!" | base64_encode }}
SGVsbG8gV29ybGQh

base64_decode

Decodes a Base64-encoded string back into its original form. The decoded binary data is then interpreted as UTF-8 text and returned as a readable string.

{{ "SGVsbG8gV29ybGQh" | base64_decode }}
Hello World!

ensure_array

Ensures that the value is always returned as an array. If the input value is null or undefined, an empty array is returned. If the value is already an array, it is returned unchanged. Otherwise, the value is wrapped in a single-element array.

gzip

Compresses the provided input using the GZIP compression algorithm with a high compression level. It outputs the result as compressed binary data, which can optionally be encoded in Base64 using the base64_encode custom Liquid filter.

json

Converts a string, or object, into JSON format.

json_parse, parse_json

Allows parsing string in a format compliant with JSON file requirements into an object. It enables access to individual fields within the object using dot notation.

Example CSV file containing carrier, tracking number, and tracking URL fields
Example tracking data CSV file
Example of using the json_parse Liquid filter to parse JSON data in Fulfilleo
Using the json_parse Liquid filter

moment

Returns a current or specified time converted to a desired time zone.

The filter has two parameters: a date format and a time zone identifier.

format
description
example value

DD

Two-digit day of the month (with leading zeros)

01 to 31

MM

Two-digit representation of the month

01 to 12

YY

Two-digit representation of the year

26

YYYY

Four-digit representation for the year

2026

HH

Two-digit representation of the hour in 24-hour format

00 to 23

hh

Two-digit representation of the hour in 12-hour format

01 to 12

A

Upper-case 'AM' or 'PM' based on the given time

AM or PM

a

Lower-case 'am' or 'pm' based on the given time

am or pm

mm

Two-digit representation of the minute

00 to 59

ss

Two-digit representation of the second

00 to 59

This filter can be used, for example, in the File Path field of an FTP channel to match files whose names contain date or time information, allowing the automation to process only tracking data files generated on the current day or during the current hour.

strip_all

Strips tabs, spaces, and newlines (all whitespace) from the entire string.

Last updated