ドキュメント
STEP 2-6

メールテンプレート参照変数

メールテンプレートには変数が用意されています。変数を使うことで、それぞれのメールテンプレートに対応した内容のメールを生成できます。

すべての変数はどの通知テンプレートでも使用できますが、通知の送信時点でデータがまだ利用できない場合、一部の変数は適用できないことがあります。

※配列の中では正しく利用できない変数もあります。配列の中で変数を扱う場合は、配列の変数の「中で使える変数」に記載された変数を参照してください。

変数

プロパティ説明例
Recustomer CSSRecustomer が定義した CSS
削除は非推奨です(削除するとメールのレイアウトが崩れます)
mail_titleメールの件名が入ります返品申請を受け付けました
customer_full_name購入者の姓名を表示します佐藤 太郎
brand_nameカスタマイズ画面のブランド名を参照し表示しますテストブランドストア
brand_logoカスタマイズ画面のブランドロゴを参照し表示しますhttps://test-store.com
return_cancel_portal_url返品申請画面に遷移するリンクになりますhttps://test.rcrm.com
approval_link返品承認画面に遷移するリンクになりますhttps://test.rcrm.com/approval=xxx
current_timeメール送信時点での現在時刻を表示します2023/11/10
sendback_deadline_periodメール送信時点での返送期限を表示します30
order_number注文番号を表示しますABC1001
product_name商品名を表示しますテスト商品
product_image商品画像を表示しますhttps://test-image.png
product_quantity商品数量を表示します3
currency_symbol購入時の通貨記号を表示します$、¥、€
product_price商品金額を表示します10,000
formatted_price通貨記号を含むフォーマット済みの商品金額を表示します$10.00、¥1,000
refund_content_name返金の項目名を表示します注文時の送料
refund_content_price返金の項目に対応した料金を表示します10,000
refund_total_price返金金額を表示します10,000
variant_name商品に紐付いているバリエーション名を表示しますサイズ
variant_value商品に紐付いているバリエーションの値を表示しますM サイズ
exchange_variant_value交換商品に紐付いているバリエーションの値を表示しますM サイズ
interview_titleヒアリング項目の質問文が表示されます返品理由をお教えください。
interview_value質問に対しての回答が表示されます不良品のため
request_reject_text返品申請を拒否した場合の拒否理由が表示されます商品状態が不良ではないため
resolution_method返品申請時に選択したご希望の対応が表示されます交換
item_result返品承認時に選択されているご希望の対応が表示されます返金
send_back_method返送方法名が表示されます佐川集荷
send_back_description返送方法に対しての詳細説明が表示されます集荷日時:
2024 年 12 月 22 日 9:00〜12:00
集荷先住所:
〒111-111
東京都港区テスト 1-2-3
テストビル 5F
send_back_location返品ロケーション名が表示されます返送用倉庫
send_back_zip返品ロケーションの郵便番号が表示されます1010000
send_back_address1返品ロケーションの都道府県〜町名・番地が結合された情報が表示されます東京都千代田区テスト1ー1
send_back_address2返品ロケーションのその他住所の情報が表示されますテストビル5階
send_back_tel返品ロケーションの電話番号が表示されます0300000000
send_back_fee「元払い(お客様負担)」もしくは「着払い(弊社負担)」が表示されます元払い(お客様負担)
delivery_company交換商品発送時に登録した配送会社を表示します佐川急便
tracking_number交換商品発送時に登録した配送追跡番号を表示します100000000000
exchange_reject_text交換拒否理由を表示します商品が申請時の内容と異なる
refund_reject_text返金拒否理由を表示します商品が申請時の内容と異なる
cancel_reject_textキャンセル承認拒否理由を表示しますすでに出荷してしまった注文のため
cancel_refund_reject_textキャンセル時の返金拒否理由を表示しますすでに出荷してしまった注文のため
receive_reject_text受取拒否理由を表示します商品が申請時の内容と異なる
return_line_item_id返品商品 ID を表示します
payment_collection_url差額交換のリンクを表示します
total_outstanding_amount差額の請求予定金額を表示します(返金がある場合は相殺されます)
exchange_status交換ステータスを表示します
・unexchanged:交換品が未発送
・exchanged:交換品が発送済み
・rejected:交換品の発送を拒否
exchange_type交換種別を表示します
・same_variation:同一バリエーションのみ交換
・no_price_diff:バリエーション交換・差額なし
・with_price_diff:バリエーション交換・差額あり
・unknown:交換種別が記録されていない

配列の変数

商品や返金項目のように複数件になりうる情報は、配列で渡されます。配列の中で使える変数は、配列ごとに決まっています。

プロパティ説明中で使える変数
request_line_items[]返品申請された商品の情報が包含された配列ですproduct_image
product_name
product_quantity
product_price
variant_options[]
interviews[]
resolution_method
item_result
return_line_item_id
approval_line_items[]返品承認された商品の情報が包含された配列ですproduct_image
product_name
product_quantity
product_price
variant_options[]
interviews[]
resolution_method
item_result
return_line_item_id
reject_line_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[]交換拒否された商品の情報が包含された配列です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[]交換された商品の情報が包含された配列です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[]受取拒否された商品の情報が包含された配列です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[]受取商品の情報が包含された配列ですproduct_image
product_name
product_quantity
product_price
variant_options[]
interviews[]
resolution_method
item_result
return_line_item_id
return_expired_line_items[]返送期限が切れた商品の情報が包含された配列ですproduct_image
product_name
product_quantity
product_price
variant_options[]
interviews[]
resolution_method
item_result
return_line_item_id
reship_line_items[]再発送済み商品の情報が包含された配列ですproduct_image
product_name
product_quantity
product_price
variant_options[]
interviews[]
resolution_method
item_result
return_line_item_id
cancel_approval_line_items[]キャンセルが承認された商品の情報が包含された配列ですproduct_image
product_name
product_price
variant_options[]
cancel_reject_line_items[]キャンセルが拒否された商品の情報が包含された配列ですproduct_image
product_name
product_quantity
product_price
variant_options[]
refund_contents[]この返金に指定されている返金の項目の情報が包含された配列ですrefund_content_name
refund_content_price
cancel_refund_contents[]このキャンセル返金に指定されている返金項目が包含された配列ですrefund_content_name
refund_content_price
send_back_obj[]返送方法・返送ロケーション・返送料金負担が一致している商品の情報が包含された配列です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[]返送が不要な、返送方法・返送ロケーション・返送料金負担が一致している商品の情報が包含された配列ですproduct_image
product_name
product_quantity
product_price
variant_options[]
interviews[]
resolution_method
item_result
remind_send_back_obj[]返送リマインド対象の、返送方法・返送ロケーション・返送料金負担が一致している商品が内包されている配列です
※リマインドメールの送信時のみ使用できます
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[]商品に紐付いているバリエーションの内容が包含されている配列ですvariant_name
variant_value
exchange_variant_value
interviews[]回答した質問がすべて包含されている配列ですinterview_title
interview_value

注文タグによる文言の出し分け

order_tags[] は、注文メタフィールドにある注文タグで設定した値が包含された配列です。タグの値をそのまま表示するのではなく、{% if %} による文言の出し分けに使用することを想定しています。

「ギフト」タグが付いた注文だけに文言を出す場合

{% if "ギフト" in order_tags %}
ギフト注文のお客様向けの文言
{% endif %}

© Recustomer, Inc.