# Email template variables

> STEP 2-3

Email templates come with variables. Use them to generate email content that matches each template.

Every variable can be used in any notification template, but some variables cannot be applied if the data is not yet available when the notification is sent.

※Some variables do not work inside arrays. When using variables inside an array, refer to the "Variables available inside" column in [Array variables](#array-variables).

## Variables

| Property | Description | Example |
| --- | --- | --- |
| `Recustomer CSS` | The CSS defined by Recustomer Removing it is not recommended (the email layout breaks if you do) | |
| `mail_title` | The subject of the email | 返品申請を受け付けました |
| `customer_full_name` | The shopper's full name | 佐藤 太郎 |
| `brand_name` | The brand name from the customization screen | テストブランドストア |
| `brand_logo` | The brand logo from the customization screen | https://test-store.com |
| `return_cancel_portal_url` | A link to the return request page | https://test.rcrm.com |
| `approval_link` | A link to the return approval page | https://test.rcrm.com/approval=xxx |
| `current_time` | The current time when the email is sent | 2023/11/10 |
| `sendback_deadline_period` | The return shipping deadline as of when the email is sent | 30 |
| `order_number` | The order number | ABC1001 |
| `product_name` | The product name | テスト商品 |
| `product_image` | The product image | https://test-image.png |
| `product_quantity` | The product quantity | 3 |
| `currency_symbol` | The currency symbol used at purchase | $, ￥, € |
| `product_price` | The product price | 10,000 |
| `formatted_price` | The product price formatted with its currency symbol | $10.00, ￥1,000 |
| `refund_content_name` | The name of a refund line | 注文時の送料 |
| `refund_content_price` | The amount of the corresponding refund line | 10,000 |
| `refund_total_price` | The refund amount | 10,000 |
| `variant_name` | The name of the variant option on the product | サイズ |
| `variant_value` | The value of the variant option on the product | Mサイズ |
| `exchange_variant_value` | The value of the variant option on the exchange product | Mサイズ |
| `interview_title` | The question text of an interview item | 返品理由をお教えください。 |
| `interview_value` | The answer to the question | 不良品のため |
| `request_reject_text` | The rejection reason when a return request is rejected | 商品状態が不良ではないため |
| `resolution_method` | The resolution the shopper chose when submitting the return request | 交換 |
| `item_result` | The resolution selected at return approval | 返金 |
| `send_back_method` | The name of the return shipping method | 佐川集荷 |
| `send_back_description` | The detailed description of the return shipping method | 集荷日時： 2024年12月22日 9:00〜12:00 集荷先住所： 〒111-111 東京都港区テスト1-2-3 テストビル5F |
| `send_back_location` | The name of the return location | 返送用倉庫 |
| `send_back_zip` | The postal code of the return location | 1010000 |
| `send_back_address1` | The return location's prefecture through street address, joined into one string | 東京都千代田区テスト１ー１ |
| `send_back_address2` | The rest of the return location's address | テストビル５階 |
| `send_back_tel` | The phone number of the return location | 0300000000 |
| `send_back_fee` | Either 元払い（お客様負担）(prepaid, paid by the shopper) or 着払い（弊社負担）(collect, paid by the store) | 元払い（お客様負担） |
| `delivery_company` | The carrier registered when the exchange product was shipped | 佐川急便 |
| `tracking_number` | The tracking number registered when the exchange product was shipped | 100000000000 |
| `exchange_reject_text` | The reason an exchange was rejected | 商品が申請時の内容と異なる |
| `refund_reject_text` | The reason a refund was rejected | 商品が申請時の内容と異なる |
| `cancel_reject_text` | The reason a cancellation was rejected | すでに出荷してしまった注文のため |
| `cancel_refund_reject_text` | The reason a refund for a cancellation was rejected | すでに出荷してしまった注文のため |
| `receive_reject_text` | The reason receipt was rejected | 商品が申請時の内容と異なる |
| `return_line_item_id` | The ID of the returned item | |
| `payment_collection_url` | The link for paying the price difference of an exchange | |
| `total_outstanding_amount` | The price difference to be charged (offset against any refund) | |
| `exchange_status` | The exchange status ・`unexchanged`: the exchange product has not shipped ・`exchanged`: the exchange product has shipped ・`rejected`: shipping the exchange product was rejected | |
| `exchange_type` | The exchange kind ・`same_variation`: same variant only ・`no_price_diff`: variant exchange with no price difference ・`with_price_diff`: variant exchange with a price difference ・`unknown`: the exchange kind was not recorded | |

## Array variables

Information that can have several entries, such as items and refund lines, is passed as an array. The variables you can use inside an array differ per array.

| Property | Description | Variables available inside |
| --- | --- | --- |
| `request_line_items[]` | An array holding the items in the return request | `product_image` `product_name` `product_quantity` `product_price` `variant_options[]` `interviews[]` `resolution_method` `item_result` `return_line_item_id` |
| `approval_line_items[]` | An array holding the approved return items | `product_image` `product_name` `product_quantity` `product_price` `variant_options[]` `interviews[]` `resolution_method` `item_result` `return_line_item_id` |
| `reject_line_items[]` | An array holding the rejected return items | `product_image` `product_name` `product_quantity` `product_price` `variant_options[]` `interviews[]` `resolution_method` `item_result` `request_reject_text` `return_line_item_id` |
| `reject_exchange_line_items[]` | An array holding the items whose exchange was rejected | `product_image` `product_name` `product_quantity` `product_price` `variant_options[]` `interviews[]` `resolution_method` `item_result` `exchange_reject_text` `return_line_item_id` |
| `exchange_line_items[]` | An array holding the exchanged items | `product_image` `product_name` `product_quantity` `product_price` `variant_options[]` `interviews[]` `resolution_method` `item_result` `delivery_company` `tracking_number` `exchange_status` `exchange_type` `return_line_item_id` |
| `receive_reject_line_items[]` | An array holding the items whose receipt was rejected | `product_image` `product_name` `product_quantity` `product_price` `variant_options[]` `interviews[]` `resolution_method` `item_result` `receive_reject_text` `return_line_item_id` |
| `receive_line_items[]` | An array holding the received items | `product_image` `product_name` `product_quantity` `product_price` `variant_options[]` `interviews[]` `resolution_method` `item_result` `return_line_item_id` |
| `return_expired_line_items[]` | An array holding the items whose return shipping deadline has passed | `product_image` `product_name` `product_quantity` `product_price` `variant_options[]` `interviews[]` `resolution_method` `item_result` `return_line_item_id` |
| `reship_line_items[]` | An array holding the reshipped items | `product_image` `product_name` `product_quantity` `product_price` `variant_options[]` `interviews[]` `resolution_method` `item_result` `return_line_item_id` |
| `cancel_approval_line_items[]` | An array holding the items whose cancellation was approved | `product_image` `product_name` `product_price` `variant_options[]` |
| `cancel_reject_line_items[]` | An array holding the items whose cancellation was rejected | `product_image` `product_name` `product_quantity` `product_price` `variant_options[]` |
| `refund_contents[]` | An array holding the refund lines specified for this refund | `refund_content_name` `refund_content_price` |
| `cancel_refund_contents[]` | An array holding the refund lines specified for this cancellation refund | `refund_content_name` `refund_content_price` |
| `send_back_obj[]` | An array holding the items that share the same return shipping method, return location, and shipping cost bearer | `send_back_item[]` `send_back_method` `send_back_description` `send_back_location` `send_back_zip` `send_back_address1` `send_back_address2` `send_back_tel` `send_back_fee` |
| `not_send_back_obj[]` | An array holding the items that need no return shipping and share the same return shipping method, return location, and shipping cost bearer | `product_image` `product_name` `product_quantity` `product_price` `variant_options[]` `interviews[]` `resolution_method` `item_result` |
| `remind_send_back_obj[]` | An array holding the items targeted by a return reminder that share the same return shipping method, return location, and shipping cost bearer ※Available only when sending a reminder email | `send_back_item[]` `send_back_method` `send_back_description` `send_back_location` `send_back_zip` `send_back_address1` `send_back_address2` `send_back_tel` `send_back_fee` |
| `variant_options[]` | An array holding the variant options of the product | `variant_name` `variant_value` `exchange_variant_value` |
| `interviews[]` | An array holding all of the answered questions | `interview_title` `interview_value` |

## Switching wording by order tag

`order_tags[]` is an array holding the values set as order tags in the order metafield. It is meant for switching wording with `{% if %}` rather than printing the tag values as they are.

> **Showing wording only for orders tagged ギフト (gift)**
>
> `{% if "ギフト" in order_tags %}` ギフト注文のお客様向けの文言 `{% endif %}`
