> For the complete documentation index, see [llms.txt](https://docs.giftcardfactory.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.giftcardfactory.app/misc/app-emails/template-editor.md).

# Template Editor

When you send your gift card emails, you can use one of our default templates. These templates are fully editable through **Emails → Templates**.<br>

<figure><img src="/files/2CaqXvId2EsWSDaYRCpa" alt=""><figcaption></figcaption></figure>

You can use our drag-and-drop interface to modify or build new templates. Our template engine is powered by [Liquid](https://shopify.github.io/liquid/) and supports dynamic variables.

{% hint style="info" %}
All variables are exposed in **snake\_case**. For example, the shop's currency code is `shop.currency_code`, not `shop.currencyCode`.
{% endhint %}

### Variables available in every template

```
shop.name
shop.myshopify_domain
shop.email
shop.domain
shop.url
shop.currency_code
shop.currency_formats.money_format
shop.currency_formats.money_with_currency_format

customer.id
customer.email
customer.first_name
customer.last_name
```

### Gift card emails

Available in all gift card-related emails (Postman, Bulk Send, Import From File, Scheduled Gift Cards, Reminders, Rewards, etc.):

```
gift_card.code (not available in Gift Card Reminders emails)
gift_card.last_characters
gift_card.initial_value.amount
gift_card.initial_value.currency
gift_card.balance.amount
gift_card.balance.currency
gift_card.expires_on
gift_card.message
gift_card.image
gift_card.qr_code (not available in Gift Card Reminders emails)
```

### Gift card QR code

`gift_card.qr_code` renders a **QR code image** for the gift card. Drop the variable wherever you want the QR to appear in the email body:

```liquid
{{ gift_card.qr_code }}
```

The QR encodes `shopify-giftcard-v1-<code>` (where `<code>` is the gift card code). It is generated at send time and embedded directly in the email as an **inline image** — nothing is hosted externally and the raw code is never stored on our side. Because it depends on the gift card code, it is **not available in Gift Card Reminders** emails (which don't expose the code).

### Gift Card Postman emails

In addition to the gift card variables above, Postman emails expose the recipient and sender entered by the buyer on the product page:

```
recipient.name
recipient.email

sender.name
sender.email
```

### Store credit emails

Available in Scheduled Store Credit and Store Credit Bulk Add emails:

```
issued_store_credit.amount
issued_store_credit.currency_code
issued_store_credit.balance_after_transaction
```

### Discount code emails

Available in Discount Codes Bulk Send and Discount Codes Import From File emails:

```
discount_code.code
discount_code.discount_type
discount_code.discount_value
discount_code.starts_at
discount_code.ends_at
```

### Gift Card Refund emails

Refund emails expose information about the order and the refund itself:

```
order.number
order.id

refund.reason
refund.total_refunded
refund.shipping_refunded
refund.line_items[]
refund.line_items[0].image
refund.line_items[0].title
refund.line_items[0].amount
refund.line_items[0].price
refund.line_items[0].quantity
```

### Formatting money

Money amounts are exposed as raw numeric strings. Use the `format_money` filter together with the shop's money format to render them with the right currency symbol:

```liquid
{{ gift_card.initial_value.amount | format_money: shop.currency_formats.money_format }}
```
