How do I write dynamic values and date calculations in automation field-update actions?

Last updated: August 25, 2026

Dynamic Values and the Function Pipeline

Field-update actions in Luminous support a template syntax that lets you calculate values at the moment the rule runs — instead of hard-coding a static value.


Basic placeholder syntax

Wrap any field name in double curly braces to insert its current value:

{{ order_number }}
{{ customer_name }}
{{ order_total }}
{{ created_at }}

Function pipeline syntax

Chain functions with a pipe (|) operator to transform a starting value:

{{ 'now'|addDays(30)|date('Y-m-d') }}

This reads as: start from right now → add 30 days → format as YYYY-MM-DD.

Available starting values

Value

Meaning

'now'

Current date and time

'today'

Current date at midnight

'yesterday'

Yesterday at midnight

'tomorrow'

Tomorrow at midnight

'value'

The field's existing value

Any date string

e.g. '2025-01-15'

Date manipulation functions

Function

Effect

Example

addDays(N)

Add N days

'now'|addDays(7)

subDays(N)

Subtract N days

'now'|subDays(14)

date_modify(str)

PHP-style modification

'now'|date_modify('+3 months')

startOfDay()

Set time to 00:00:00

'today'|startOfDay

endOfDay()

Set time to 23:59:59

'today'|endOfDay

date(format)

Format output

|date('Y-m-d')

Text functions

Function

Effect

upper

Convert to UPPERCASE

lower

Convert to lowercase


Using order field values as parameters

You can read a field's current value and use it inside a function:

{{ 'now'|addDays([custom_field_Days_to_Ship]:90)|date('Y-m-d') }}

This reads: add the value of the "Days to Ship" custom field to today; if that field is empty, null, or zero, use 90 as the fallback.

Syntax: [field_name]:fallback_value

A field is treated as empty when it is: null, an empty string, zero (0), or the string "0".


Common recipes

Goal

Template

Ship date = today + 30 days

{{ 'now'|addDays(30)|date('Y-m-d') }}

Ship date from custom field, 90-day fallback

{{ 'now'|addDays([custom_field_Days_to_Ship]:90)|date('Y-m-d') }}

Extend existing ship date by 7 days

{{ 'value'|date_modify('+7 days')|date('Y-m-d') }}

Expiry = end of day, 30 days out

{{ 'today'|addDays([custom_field_Expiry_Days]:30)|endOfDay|date('Y-m-d H:i:s') }}

All-caps status field

{{ 'value'|upper }}


Where to use the function pipeline

Function templates work inside Update Field action values and inside the body/subject of Enhanced Email actions. They do not apply to condition values.