> For the complete documentation index, see [llms.txt](https://docs.globo.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.globo.io/options/orders/automations/liquid-variables-reference.md).

# Liquid variables reference

The Liquid variables available in email and order note templates.

Both the [email notification](/options/orders/automations/email-notification.md) and [order notes](/options/orders/automations/update-order-notes.md) templates accept Liquid variables. The app includes this list in each editor, so you can check a variable name without leaving the page.

## General

Order-level values.

<table><thead><tr><th width="290">Variable</th><th>Contains</th></tr></thead><tbody><tr><td><code>{{ shop.name }}</code></td><td>Your shop's name</td></tr><tr><td><code>{{ order_number }}</code></td><td>The order number, without a prefix</td></tr><tr><td><code>{{ order_name }}</code></td><td>The order name, including the <code>#</code></td></tr><tr><td><code>{{ subtotal_price | money }}</code></td><td>Subtotal, formatted as money</td></tr><tr><td><code>{{ tax_price | money }}</code></td><td>Total tax</td></tr><tr><td><code>{{ total_price | money }}</code></td><td>Order total</td></tr></tbody></table>

## Shop details

<table><thead><tr><th width="290">Variable</th><th>Contains</th></tr></thead><tbody><tr><td><code>{{ shop.name }}</code></td><td>Your shop's name</td></tr><tr><td><code>{{ shop.admin_email }}</code></td><td>Your shop's email address</td></tr><tr><td><code>{{ shop.admin_name }}</code></td><td>The shop owner's name</td></tr></tbody></table>

## Customer details

<table><thead><tr><th width="290">Variable</th><th>Contains</th></tr></thead><tbody><tr><td><code>{{ customer_first_name }}</code></td><td>First name</td></tr><tr><td><code>{{ customer_last_name }}</code></td><td>Last name</td></tr><tr><td><code>{{ customer_name }}</code></td><td>Full name</td></tr><tr><td><code>{{ customer_email }}</code></td><td>Email address</td></tr><tr><td><code>{{ customer_phone }}</code></td><td>Phone number</td></tr></tbody></table>

## Line item details

Line items require a loop. Everything inside the loop uses `line`.

```liquid
{% for line in line_items %}
  {{ line.title }} × {{ line.quantity }}
  {% for p in line.properties %}
    {{ p.first }}: {{ p.last }}
  {% endfor %}
{% endfor %}
```

<table><thead><tr><th width="290">Variable</th><th>Contains</th></tr></thead><tbody><tr><td><code>{{ line.name }}</code></td><td>The item's name</td></tr><tr><td><code>{{ line.title }}</code></td><td>The product title</td></tr><tr><td><code>{{ line.variant_title }}</code></td><td>The variant title</td></tr><tr><td><code>{{ line.quantity }}</code></td><td>How many</td></tr><tr><td><code>{{ line.original_line_price | money }}</code></td><td>Price before discounts</td></tr><tr><td><code>{{ line.final_line_price | money }}</code></td><td>Price after discounts</td></tr><tr><td><code>{{ line.total_discount | money }}</code></td><td>Discount applied</td></tr><tr><td><code>{{ line.grams }}</code></td><td>Weight</td></tr><tr><td><code>{{ line.sku }}</code></td><td>SKU</td></tr><tr><td><code>{{ line.vendor }}</code></td><td>Vendor</td></tr><tr><td><code>{{ line.image | img_url }}</code></td><td>The item's image</td></tr></tbody></table>

## The properties loop

`line.properties` contains the options. Each entry has a name and a value.

<table><thead><tr><th width="230">Inside the loop</th><th>Contains</th></tr></thead><tbody><tr><td><code>{{ p.first }}</code></td><td>The option's <strong>Name</strong> — which is why <a href="/options/option-types/shared-settings/labels-and-visibility.md">Name</a> matters</td></tr><tr><td><code>{{ p.last }}</code></td><td>What the customer entered or chose</td></tr></tbody></table>

{% hint style="warning" %}
**Skip properties whose name begins with an underscore.** Those are the app's internal properties. They link add-ons to their parent item and carry pricing data, and your team does not need to read them.
{% endhint %}

This pattern skips those properties and handles uploaded files:

```liquid
{% for p in line.properties %}
  {% assign first_char = p.first | truncate: 1, '' %}
  {% unless p.last == blank or first_char == '_' %}
    {{ p.first }}:
    {%- if p.last contains '/uploads/' -%}
      <a href="{{ p.last }}">{{ p.last | split: '/' | last }}</a>
    {%- else -%}
      {{ p.last }}
    {%- endif -%}
  {% endunless %}
{% endfor %}
```

It skips internal properties and empty values, and it displays an uploaded file as a link with a readable name rather than a long address.

See [Show options on orders](/options/storefront-display-and-design/show-options-on-orders.md).

## A complete order note template

```liquid
{% for line in line_items %}
{{ line.title }} × {{ line.quantity }}
{% for p in line.properties %}{% assign fc = p.first | truncate: 1, '' %}{% unless p.last == blank or fc == '_' %}
- {{ p.first }}: {{ p.last }}
{% endunless %}{% endfor %}
{% endfor %}
```

Keep the template compact, because order notes are displayed and printed in a small area.

## Notes

* The variable list in the app is the current one, and it is available in both editors.
* Money values need the `money` filter to be formatted. Without it, the template prints a raw number.
* Both templates have a **Revert to default** action.
* Order notes are often printed as plain text, so keep HTML formatting to a minimum there. Emails can include more.
