No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
この例では、購読者の注文履歴 (購入した製品の製品レビューや製品評価を含む) を表示する方法を説明します。
Marketing Cloud アカウントで次のデータエクステンションを作成します。
MyContacts
Products
Product_Rating
Order_Details
次の手順に従って、各データエクステンションを作成します。
ステップ 1 にリストされているデータエクステンションを使用して、次の手順に従ってデータリレーションシップを作成します。これらのステップにより、データリレーションシップが作成されます。
購読者の上にマウスを置きます。
[データのリレーションシップ] をクリックします。
[作成] をクリックします。
[名前] フィールドにデータリレーションシップの名前を入力します。API 呼び出しを介してデータリレーションシップにアクセスする値を [外部キー] フィールドに入力します。
必要に応じて、[説明] フィールドにデータエクステンションの説明を入力します。
[オブジェクトの選択] セクションのドロップダウンで Order_Details と MyContacts データエクステンションを選択します。
[フィールドの選択] セクションで Order_Details データエクステンションの CustomerID フィールドと MyContacts データエクステンションの SubcriberKey フィールドを選択します。
[保存] をクリックします。指定するデータを置き換えてステップ 7 ~ 9 を繰り返し、他の必要なデータリレーションシップを確立します。
「購読者の作成」セクションの購読者を作成する手順を実行するか、以前に作成した購読者を使用します。
「メールメッセージの作成」のメッセージを作成する手順を実行し、各自のコンテンツに合わせて次のテンプレートを使用します。
<html>
<body>
{{#=with Order_Details}}
<h4 class="header">{{[First_Name]}} {{[Last_Name]}}, your order ID is {{OrderID}}</h4>
<br />
{{#=each Order_Details}}
{{#Products}}
<strong>Product Name:</strong> {{Product_Name}}<br />
<strong>SKU:</strong>{{sku}}<br />
<img src="{{Thumbnail_URL}}" /><br />
{{#Product_Ratings}}
<strong>Most Recent Review: </strong>{{Last_Review_Text}}<br />
<strong># of Ratings: </strong>{{Number_of_Ratings}}<br />
<strong>Ave Rating: </strong>{{Average_Rating}}<br /><br /><br />
{{/Product_Ratings}}
{{/Products}}
{{/each}}
{{/with}}
<body>
</html>
次のデータコンテンツについて考えます。
{
“EmailAddress”: ssmith@example.com,
“First_Name”: “Steve”,
“Last_Name”: “Smith”,
“Order_Details”: [{
“OrderID“: “10148“, {
“Products”:
“Product_Name“: “Mens Denali Glove“,
“SKU“: “101105“,
“Thumbnail_URL“ : “http://something.com/image1/“,
“Product_Ratings”: {
“Last_Review_Text“: “Thank you so much for sending...“,
“Number_of_Ratings“: “26”,
“Average_Rating“ : “4.04“
}
}, {
“Product_Name“: “Womens Masonic Zip Hoodie“,
“SKU“: “102163“,
“Thumbnail_URL“ : “http://something.com/image2/“,
“Product_Ratings”: {
“Last_Review_Text“: “I got this as a birthday gift from my parents...“,
“Number_of_Ratings“ : “18“,
“Average_Rating“ : “4.00“
}
}
}]
}
次のようにメールメッセージが表示されます。