{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"メッセージコンテンツのパーソナライズ — In-Browser Messaging","description":"Engage StudioのIn-Browser Messageコンテンツをプロフィール変数とLiquidテンプレート構文でパーソナライズするためのリファレンスガイドです。サポートされる構文とコード例を含みます。","siteUrl":"https://docs.treasure.ai","lang":"en-US","jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.treasure.ai/","name":"Treasure AI","url":"https://www.treasure.ai/","logo":"https://www.treasure.ai/hubfs/assets/images/logos/primary-logo.svg"},{"@type":"WebSite","@id":"https://docs.treasure.ai/#website","name":"Treasure AI Documentation","url":"https://docs.treasure.ai/","inLanguage":["en","ja"],"publisher":{"@id":"https://www.treasure.ai/"}}]},"llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"メッセージコンテンツのパーソナライズ","__idx":0},"children":["メッセージコンテンツのパーソナライズ"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In-Browser Messageキャンペーンでは、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["プロフィール変数"]},"と",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Liquidテンプレート構文"]},"を使用したダイナミックコンテンツのパーソナライズをサポートしています。変数はRT Personalization 2.0によって実行時に解決され、TD Web SDKがメッセージをブラウザに表示する前にレンダリングされます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"変数のソース","__idx":1},"children":["変数のソース"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In-Browser Messageで利用できるプロフィール変数は、キャンペーンに紐付いた",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ペアレントセグメント"]},"から提供される以下の4つのソースが存在します。"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"ソース"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ソース"]}," "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"プレフィックス"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["プレフィックス"]}," "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"40%","data-label":"説明"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["説明"]}," "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["バッチ属性"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rt_profile.imported.*"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["バッチ処理で算出され、RT 2.0にExternal（EXT）属性としてインポートされたユーザープロフィール属性（ロイヤルティティア、生涯価値、氏名など）。Liquid構文では",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rt_profile.imported.*"]},"でアクセスします（例：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rt_profile.imported.loyalty_tier"]},"）。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["RTシングル属性"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rt_profile.single.*"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ストリーミングイベントに基づいてリアルタイムで更新されるスカラー値（最近閲覧した商品、現在のセッションデータなど）。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["RTリスト属性"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rt_profile.list.*"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["リアルタイムで更新される配列値（カートの中身、閲覧履歴など）。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["RTカウンター属性"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rt_profile.counter.*"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["リアルタイムで更新される数値カウンター（訪問回数、購入回数など）。"]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"イベントフィールドは現在非サポート"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Liquidテンプレートコンテンツ内でトリガーイベントのフィールド（例：ページビューの",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["product_id"]},"）を参照することはサポートされていません。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"基本的な変数の出力","__idx":2},"children":["基本的な変数の出力"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ダブルカーリーブレースを使用して変数の値をコンテンツに直接出力します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"html","header":{"controls":{"copy":{}}},"source":"<p>Welcome back, {{rt_profile.imported.first_name}}!</p>\n<p>Your current tier: {{rt_profile.imported.loyalty_tier}}</p>\n<p>Most recent product viewed: {{rt_profile.single.most_recent_product}}</p>\n","lang":"html"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"変数出力はHTMLエスケープされます"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["すべての ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{ variable }}"]}," 出力は、ブラウザに配信される前にRT 2.0によって自動的にHTMLエスケープされます。属性値内の ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[">"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\""]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["&"]}," などの文字はエスケープされるため、Liquidの ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["escape"]}," フィルターが非サポートであっても、ユーザーが入力したフィールドからXSSが発生することはありません。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"liquidテンプレート構文","__idx":3},"children":["Liquidテンプレート構文"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In-Browser MessageはLiquidテンプレート構文の",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["限定的なサブセット"]},"をサポートしています。テンプレートはRealtime APIによって設定時にReactor互換のJavaScript式に変換され、各パーソナライズリクエストの実行時に評価されます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"サポートされる構文","__idx":4},"children":["サポートされる構文"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"構文"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["構文"]}," "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"10%","data-label":"サポート"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["サポート"]}," "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"60%","data-label":"備考"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["備考"]}," "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{% if %} / {% elsif %} / {% else %} / {% endif %}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ネストの深さに制限なし。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{% for item in collection %} / {% endfor %}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["最大3レベルのネスト。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{ variable }}"]},"による変数出力"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rt_profile.*"]},"プレフィックスを使用（例：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rt_profile.imported.*"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rt_profile.single.*"]},"）。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["=="]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["!="]},"比較"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["文字列とnullの比較。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["and"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["or"]},"論理演算子"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["複数の条件を組み合わせる場合に使用。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{% assign %}"]},"変数代入"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["非サポート。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{ value \\| filter }}"]},"フィルター"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["upcase"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["downcase"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["truncate"]},"などは非サポート。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{% unless %}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{% if condition == false %}"]},"で代替可能。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{% case %} / {% when %}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{% if %} / {% elsif %}"]},"の連鎖で代替可能。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["contains"]},"演算子"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{% if %}"]},"条件内では非サポート。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["forloop.index"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["limit"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["offset"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ループのメタデータとパラメーターは非サポート。"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"変数構文リファレンス","__idx":5},"children":["変数構文リファレンス"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"50%","data-label":"Liquid構文"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Liquid構文"]}," "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"50%","data-label":"属性タイプ"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["属性タイプ"]}," "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{rt_profile.imported.attribute_name}}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["バッチ属性（In-Browser Messagingでは",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rt_profile.imported.*"]},"でアクセス）"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{rt_profile.single.attribute_id}}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["RTシングル属性"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{rt_profile.list.attribute_id.sub_attribute}}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["RTリスト属性のサブフィールド"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{rt_profile.counter.attribute_id.total}}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["RTカウンター属性の合計"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"コード例","__idx":6},"children":["コード例"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ロイヤルティティアによるコンテンツの出し分け","__idx":7},"children":["ロイヤルティティアによるコンテンツの出し分け"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"html","header":{"controls":{"copy":{}}},"source":"{% if rt_profile.imported.tier == \"gold\" %}\n  <p>20% off for Gold members!</p>\n{% elsif rt_profile.imported.tier == \"silver\" %}\n  <p>10% off for Silver members!</p>\n{% else %}\n  <p>Sign up today for exclusive deals!</p>\n{% endif %}\n","lang":"html"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"カートアイテムのループ","__idx":8},"children":["カートアイテムのループ"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"html","header":{"controls":{"copy":{}}},"source":"{% if rt_profile.list.cart_items.item_list != null %}\n  <h2>Your Cart</h2>\n  <ul>\n    {% for item in rt_profile.list.cart_items.item_list %}\n      <li>{{ item }}</li>\n    {% endfor %}\n  </ul>\n{% endif %}\n","lang":"html"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ネストした条件とループ","__idx":9},"children":["ネストした条件とループ"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"html","header":{"controls":{"copy":{}}},"source":"{% if rt_profile.single.most_recent_product %}\n  <p>You recently viewed <strong>{{ rt_profile.single.most_recent_product }}</strong>.</p>\n  {% if rt_profile.list.recommendations.product_ids != null %}\n    <ul>\n      {% for product in rt_profile.list.recommendations.product_ids %}\n        {% if product != rt_profile.single.most_recent_product %}\n          <li>{{ product }}</li>\n        {% endif %}\n      {% endfor %}\n    </ul>\n  {% endif %}\n{% endif %}\n","lang":"html"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"制限事項","__idx":10},"children":["制限事項"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["非サポートのLiquidフィルター"]},"：文字列操作フィルター（",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["upcase"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["downcase"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["replace"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["truncate"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["split"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["join"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date"]},"など）は使用できません。変換が必要な場合はバッチ属性として事前に処理してください。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["変数代入なし"]},"：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{% assign %}"]},"は非サポートです。算出された値を導くにはAudience Studioの属性システムを使用してください。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["forループのネスト"]},"：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{% for %}"]},"ループは最大3レベルのネストをサポートします。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{% unless %}"]},"なし"]},"：代わりに",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{% if condition == false %}"]},"を使用してください。"]}]}]},"headings":[{"value":"メッセージコンテンツのパーソナライズ","id":"メッセージコンテンツのパーソナライズ","depth":1},{"value":"変数のソース","id":"変数のソース","depth":2},{"value":"基本的な変数の出力","id":"基本的な変数の出力","depth":2},{"value":"Liquidテンプレート構文","id":"liquidテンプレート構文","depth":2},{"value":"サポートされる構文","id":"サポートされる構文","depth":3},{"value":"変数構文リファレンス","id":"変数構文リファレンス","depth":3},{"value":"コード例","id":"コード例","depth":2},{"value":"ロイヤルティティアによるコンテンツの出し分け","id":"ロイヤルティティアによるコンテンツの出し分け","depth":3},{"value":"カートアイテムのループ","id":"カートアイテムのループ","depth":3},{"value":"ネストした条件とループ","id":"ネストした条件とループ","depth":3},{"value":"制限事項","id":"制限事項","depth":2}],"frontmatter":{"seo":{"title":"メッセージコンテンツのパーソナライズ — In-Browser Messaging","description":"Engage StudioのIn-Browser Messageコンテンツをプロフィール変数とLiquidテンプレート構文でパーソナライズするためのリファレンスガイドです。サポートされる構文とコード例を含みます。"}},"lastModified":"2026-07-13T05:57:20.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/products/marketing-cloud/engage-studio/experiences/personalize-message-content","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}