# 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 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 }}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.giftcardfactory.app/misc/app-emails/template-editor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
