カタログインタラクション
カタログインタラクションを使用して、顧客がさまざまな追跡項目を操作したことを取得します。たとえば、商品やブログ投稿への操作です。
次のインタラクション名はカタログインタラクションとして処理されます。
| インタラクション名 | 値 |
|---|---|
| SalesforceInteractions.CatalogObjectInteractionName.CommentCatalogObject | Comment Catalog Object (カタログオブジェクトにコメント) |
| SalesforceInteractions.CatalogObjectInteractionName.FavoriteCatalogObject | Favorite Catalog Object (カタログオブジェクトをお気に入りに登録) |
| SalesforceInteractions.CatalogObjectInteractionName.QuickViewCatalogObject | Quick View Catalog Object (カタログオブジェクトをクイック参照) |
| SalesforceInteractions.CatalogObjectInteractionName.ReviewCatalogObject | Review Catalog Object (カタログオブジェクトを確認) |
| SalesforceInteractions.CatalogObjectInteractionName.ShareCatalogObject | Share Catalog Object (カタログオブジェクトを共有) |
| SalesforceInteractions.CatalogObjectInteractionName.ViewCatalogObject | View Catalog Object (カタログオブジェクトを参照) |
| SalesforceInteractions.CatalogObjectInteractionName.ViewCatalogObjectDetail | View Catalog Object Detail (カタログオブジェクトの詳細を参照) |
1{
2 interaction: {
3 name: 'View Catalog Object',
4 catalogObject: {
5 type: 'Product',
6 id: 'product-xyz',
7 attributes: {
8 name: 'Product XYZ',
9 category: 'Clothing',
10 color: 'Red',
11 sku: 'product-xyz-sku'
12 },
13 relatedCatalogObjects: [{
14 Sizes: ["S", "M", "L"]
15 }]
16 }
17 }
18}カタログインタラクション項目:
| 項目名 | 項目の型 | 説明 |
|---|---|---|
| catalogObject.attributes | object | ユーザ指定の値の辞書。 |
| catalogObject.id | string | 必須。カタログオブジェクトを表す一意の ID。 |
| catalogObject.relatedCatalogObjects | object | 関連するカタログオブジェクトの辞書。 |
| catalogObject.type | string | 必須。カタログオブジェクトを表す種別名。 |
| name | string | 必須。イベント名。 |
例
Web SDK を使用してカタログインタラクションを取得する方法を次に示します。
1SalesforceInteractions.sendEvent({
2 interaction: {
3 name: 'View Catalog Object',
4 catalogObject: {
5 type: 'Product',
6 id: 'product-xyz',
7 attributes: {
8 name: 'Product XYZ',
9 category: 'Clothing',
10 color: 'Red',
11 sku: 'product-xyz-sku'
12 },
13 relatedCatalogObjects: [{
14 Sizes: ["S", "M", "L"]
15 }]
16 }
17 }
18})サイトマップを使用してカタログインタラクションを取得する方法を次に示します。
1SalesforceInteractions.init().then(() => {
2 const sitemapConfig = {
3 global: {},
4 pageTypes: [{
5 name: 'product_detail',
6 isMatch: () => true,
7 interaction: {
8 name: SalesforceInteractions.CatalogObjectInteractionName.ViewCatalogObject,
9 catalogObject: {
10 type: 'Product',
11 id: 'product-xyz',
12 attributes: {
13 name: 'Product XYZ',
14 category: 'Clothing',
15 color: 'Red',
16 sku: 'product-xyz-sku'
17 },
18 relatedCatalogObjects: [{
19 Sizes: ["S", "M", "L"]
20 }]
21 }
22 }
23 }]
24 }
25 SalesforceInteractions.initSitemap(sitemapConfig)
26})