Skip to content

Liquid variables for custom templates

The order, customer, line item and total variables available in Code mode and Custom Liquid blocks, with the money, parse_json and render filters.

Medium BusinessUpdated 2026-10-18

The per-order editor's Code view shows a searchable reference panel with every variable and a sample value; this page lists the ones templates use most. Every amount below is pre-formatted in the document currency.

Order

{{ order.name }}  {{ order.invoice_number }}  {{ order.date }}  {{ order.time }}  {{ order.due_date }}
{{ order.status }}  {{ order.payment_date }}  {{ order.has_payment }}  {{ order.note }}
{{ order.currency }}  {{ order.store_currency }}  {{ order.presentment_currency }}
{{ payment_method.display }}  {{ payment_method.brand }}  {{ payment_method.last4 }}  {{ shipping_method.title }}
{% for attr in order.note_attributes %}{{ attr.name }}: {{ attr.value }}{% endfor %}

Customer and addresses

{{ customer.name }}  {{ customer.first_name }}  {{ customer.last_name }}  {{ customer.email }}
{{ customer.company_name }}  {{ customer.vat_number }}  {{ customer.tax_exempt }}
{{ billing_address.name }}  {{ billing_address.company }}  {{ billing_address.address1 }}  {{ billing_address.address2 }}
{{ billing_address.city }}  {{ billing_address.province_code }}  {{ billing_address.zip }}  {{ billing_address.country }}
{{ billing_address.phone }}  {{ billing_address.formatted_lines }}
{{ shipping_address.* }}   (same fields)

Line items

{% for item in line_items %}
  {{ item.title }}  {{ item.variant_title }}  {{ item.sku }}  {{ item.quantity }}
  {{ item.price }}  {{ item.total }}
  {{ item.has_line_discount }}  {{ item.discounted_price }}  {{ item.line_discount }}  {{ item.original_total }}
  {% for prop in item.properties %}{{ prop.key }}: {{ prop.value }}{% endfor %}
  {% for o in item.variant_options %}{{ o.name }}: {{ o.value }}{% endfor %}
  {{ item.product.metafields.custom.material }}
{% endfor %}

Totals and tax

{{ subtotal }}  {{ has_discount }}  {{ discount_amount }}  {{ discount_code }}
{{ shipping_amount }}  {{ shipping_title }}  {{ has_tax }}  {{ tax_amount }}  {{ total }}
{{ amount_due }}  {{ has_amount_due }}  {{ is_multi_currency }}  {{ total_store_currency }}
{% for tax in tax_lines %}{{ tax.title }} {{ tax.percentage }}% {{ tax.price }} {{ tax.taxable_amount }}{% endfor %}
{% for fee in additional_fees %}{{ fee.name }} {{ fee.price }}{% endfor %}
{{ is_tax_exempt }}  {{ is_reverse_charge }}  {{ order.taxes_included }}

Shop and metafields

{{ shop.name }}  {{ shop.email }}  {{ shop.phone }}  {{ shop.address }}  {{ shop.city }}  {{ shop.country }}
{{ shop.logo_url }}  {{ shop.tax_id }}  {{ shop.sales_tax_number }}  {{ shop.income_tax_number }}
{{ order.metafields.namespace.key }}  {{ customer.metafields.namespace.key }}  {{ shop.metafields.namespace.key }}

Labels and language

{{ labels.tax_exempt_notice }}  {{ labels.reverse_charge_notice }}  {{ labels.prices_include_tax }}  {{ document_language }}

Block labels such as the document title or column headings come from the block settings ({{ blocks.<id>.settings.<key> }}) and are translated per document language.

Filters

  • money formats a number like every other amount: {{ order.total_amount | times: 50 | divided_by: 100.0 | round: 2 | money }}.
  • parse_json turns a JSON metafield into an object: {% assign spec = item.product.metafields.custom.spec | parse_json %}{{ spec.weight }}.
  • render_liquid runs merchant-written Liquid, which is what the Custom Liquid block uses for its code field.

Optional values are empty when the order has no data for them, so wrap them in {% if … %} to avoid printing a bare label.

Was this guide missing something? Tell us and we will fix it.

Contact Us