Cooee Template Magic Variables
Magic variables let you personalise campaign content with live, contextual data — product prices, cart totals, customer names, and more. Instead of writing static copy, you reference a variable and Cooee replaces it with the actual value at the moment the campaign is shown to the customer.
You use them inside any text or HTML element in the campaign composer by wrapping the variable name in double curly braces:
{{ variable_name }}
Variables can be combined with plain text, HTML, and filters to create dynamic, personalised messaging:
Hey {{ customer.first_name | fallback("there") }}, {{ product.name }} is now
just {{ product.effective_price }}! That's {{ product.compare_discount_percentage }}% off
the original {{ product.compare_price }}.
When are variables available?
Each group of variables is only available in the right context. For example, product.* variables are only populated when the campaign is triggered on a product page. If a variable has no value in the current context, it renders as empty — use the | fallback filter to handle those cases gracefully.
This documentation is organised into the following sections:
Product —
{{ product.* }}Variant —
{{ variant.* }}Cart —
{{ cart.* }}Discount —
{{ discount.* }}Bundle —
{{ bundle.* }}Customer —
{{ customer.* }}Form —
{{ form.* }}Progress bar —
{{ amount_left }}Filters — transform variable values before rendering
