Destination SDK を使用したストリーミングの宛先の設定

概要 overview

このページでは、Destination SDK の設定オプションや、他の Destination SDK 機能と API リファレンスのドキュメントに記載されている情報の利用方してストリーミング宛先を設定する方法について説明します。以下にその手順を、順を追って説明します。

前提条件 prerequisites

以下に示す手順に進む前に、Destination SDK入門 ページで、Destination SDK APIを操作するために必要なAdobe I/O認証情報およびその他の前提条件を取得する方法を確認してください。 これは、パートナーシップと権限の前提条件を完了し、宛先の開発を開始する準備ができていることを前提としています。

Destination SDK の構成オプションを使用して宛先を設定する手順 steps

Destination SDK エンドポイントの使用手順の図解

手順 1:サーバーとテンプレートの構成を作成する create-server-template-configuration

​ エンドポイントを使用して サーバーとテンプレート設定/destinations-serverを作成することから開始します。

次に構成の例を示します。 requestBody.value パラメーターでのメッセージ変換テンプレートは、手順 3 の変換テンプレートの作成で対応します。

POST platform.adobe.io/data/core/activation/authoring/destination-servers
{
   "name":"Moviestar destination server",
   "destinationServerType":"URL_BASED",
   "urlBasedDestination":{
      "url":{
         "templatingStrategy":"PEBBLE_V1",
         "value":"https://api.moviestar.com/data/{{customerData.region}}/items"
      }
   },
   "httpTemplate":{
      "httpMethod":"POST",
      "requestBody":{
         "templatingStrategy":"PEBBLE_V1",
         "value":"insert after you create a template in step 3"
      },
      "contentType":"application/json"
   }
}

手順 2:宛先の構成の作成 create-destination-configuration

以下に、/destinations API エンドポイントを使用して作成された、宛先テンプレートの構成の例を示します。 詳しくは、宛先設定の作成を参照してください。

手順 1 のサーバーとテンプレート設定をこの宛先構成に接続するには、サーバーのインスタンス ID とテンプレート設定を、destinationServerId として追加します。

IMPORTANT
正しく設定されたリアルタイム(ストリーミング)宛先を作成するには、次に示すように​に少なくとも1つのターゲット IDを追加する必要があります。 identityNamespacesターゲット ID が設定されていない場合、ユーザーはアクティベーションワークフローのマッピング手順以降に進むことができません。
POST platform.adobe.io/data/core/activation/authoring/destinations
{
   "name":"Moviestar",
   "description":"Moviestar is a fictional destination, used for this example.",
   "status":"TEST",
   "customerAuthenticationConfigurations":[
      {
         "authType":"BEARER"
      }
   ],
   "customerDataFields":[
      {
         "name":"endpointsInstance",
         "type":"string",
         "title":"Select Endpoint",
         "description":"Moviestar manages several instances across the globe for REST endpoints that our customers are provisioned for. Select your endpoint in the dropdown list.",
         "isRequired":true,
         "enum":[
            "US",
            "EU",
            "APAC",
            "NZ"
         ]
      },
      {
         "name":"customerID",
         "type":"string",
         "title":"Moviestar Customer ID",
         "description":"Your customer ID in the Moviestar destination (e.g. abcdef).",
         "isRequired":true,
         "pattern":""
      }
   ],
   "uiAttributes":{
      "documentationLink":"http://www.adobe.com/go/destinations-moviestar-en",
      "category":"mobile",
      "connectionType":"Server-to-server",
      "frequency":"Streaming"
   },
   "identityNamespaces":{
      "external_id":{
         "acceptsAttributes":true,
         "acceptsCustomNamespaces":true
      },
      "another_id":{
         "acceptsAttributes":true,
         "acceptsCustomNamespaces":true
      }
   },
   "segmentMappingConfig":{
      "mapExperiencePlatformSegmentName":false,
      "mapExperiencePlatformSegmentId":false,
      "mapUserInput":false
   },
   "audienceMetadataConfig":{
      "audienceTemplateId":"cbf90a70-96b4-437b-86be-522fbdaabe9c"
   },
   "aggregation":{
      "aggregationType":"CONFIGURABLE_AGGREGATION",
      "configurableAggregation":{
         "aggregationPolicyId":null,
         "aggregationKey":{
            "includeSegmentId":true,
            "includeSegmentStatus":true,
            "includeIdentity":true,
            "oneIdentityPerGroup":true,
            "groups":null
         },
         "splitUserById":true,
         "maxBatchAgeInSecs":2400,
         "maxNumEventsInBatch":5000
      }
   },
   "destinationDelivery":[
      {
         "authenticationRule":"CUSTOMER_AUTHENTICATION",
         "destinationServerId":"9c77000a-4559-40ae-9119-a04324a3ecd4"
      }
   ]
}

手順 3:メッセージ変換テンプレートの作成。テンプレート言語を使用して、メッセージの出力形式を指定します create-transformation-template

宛先がサポートするペイロードに基づいて、AdobeXDM 形式から書き出されたデータの形式を、宛先でサポートされる形式に変換するテンプレートを作成する必要があります。 「ID、属性、オーディエンスメンバーシップの変換にテンプレート言語を使用する」の節のテンプレートの例を参照し、Adobeが提供する​ テンプレートオーサリングツール ​を使用します。

自分の用途に合ったメッセージ変換テンプレートを作成したら、そのテンプレートを手順 1 で作成したサーバーおよびテンプレートの構成に追加します。

{
   "name":"Moviestar destination server",
   "destinationServerType":"URL_BASED",
   "urlBasedDestination":{
      "url":{
         "templatingStrategy":"PEBBLE_V1",
         "value":"https://api.moviestar.com/data/{{customerData.region}}/items"
      }
   },
   "httpTemplate":{
      "requestBody":{
         "templatingStrategy":"PEBBLE_V1",
         "value":"{\n    \"users\": [\n        {% for profile in input.profiles %}\n            {{profile|raw}}{% if not loop.last %},{% endif %}\n        {% endfor %}\n    ]\n}"
      },
      "contentType":"application/json"
   }
}

手順 4:オーディエンスメタデータ構成の作成 create-audience-metadata-configuration

一部の宛先では、Destination SDK は、宛先のオーディエンスをプログラムで作成、更新、削除するように、オーディエンスメタデータを構成する必要があります。 この設定を設定する必要があるタイミングとその方法については、​ オーディエンスメタデータ管理を参照してください。

オーディエンスメタデータの構成を使用する場合は、手順 2 で作成した宛先構成に接続する必要があります。 オーディエンスメタデータ設定のインスタンス ID を、audienceTemplateId として宛先構成に追加します。

{
   "name":"Moviestar",
   "description":"Moviestar is a fictional destination, used for this example.",
   "status":"TEST",
   "customerAuthenticationConfigurations":[
      {
         "authType":"BEARER"
      }
   ],
   "customerDataFields":[
      {
         "name":"endpointsInstance",
         "type":"string",
         "title":"Select Endpoint",
         "description":"Moviestar manages several instances across the globe for REST endpoints that our customers are provisioned for. Select your endpoint in the dropdown list.",
         "isRequired":true,
         "enum":[
            "US",
            "EU",
            "APAC",
            "NZ"
         ]
      },
      {
         "name":"customerID",
         "type":"string",
         "title":"Moviestar Customer ID",
         "description":"Your customer ID in the Moviestar destination (e.g. abcdef).",
         "isRequired":true,
         "pattern":""
      }
   ],
   "uiAttributes":{
      "documentationLink":"http://www.adobe.com/go/destinations-moviestar-en",
      "category":"mobile",
      "connectionType":"Server-to-server",
      "frequency":"Streaming"
   },
   "identityNamespaces":{
      "external_id":{
         "acceptsAttributes":true,
         "acceptsCustomNamespaces":true
      },
      "another_id":{
         "acceptsAttributes":true,
         "acceptsCustomNamespaces":true
      }
   },
   "segmentMappingConfig":{
      "mapExperiencePlatformSegmentName":false,
      "mapExperiencePlatformSegmentId":false,
      "mapUserInput":false
   },
   "audienceMetadataConfig":{
      "audienceTemplateId":"cbf90a70-96b4-437b-86be-522fbdaabe9c"
   },
   "aggregation":{
      "aggregationType":"CONFIGURABLE_AGGREGATION",
      "configurableAggregation":{
         "aggregationPolicyId":null,
         "aggregationKey":{
            "includeSegmentId":true,
            "includeSegmentStatus":true,
            "includeIdentity":true,
            "oneIdentityPerGroup":true,
            "groups":null
         },
         "splitUserById":true,
         "maxBatchAgeInSecs":2400,
         "maxNumEventsInBatch":5000
      }
   },
   "destinationDelivery":[
      {
         "authenticationRule":"CUSTOMER_AUTHENTICATION",
         "destinationServerId":"9c77000a-4559-40ae-9119-a04324a3ecd4"
      }
   ]
}

手順 5:認証の設定 set-up-authentication

上記の宛先設定で "authenticationRule": "CUSTOMER_AUTHENTICATION""authenticationRule": "PLATFORM_AUTHENTICATION" のどちらを指定したかによって、/destination または /credentials のエンドポイントを使用して宛先の認証を設定できます。

NOTE
CUSTOMER_AUTHENTICATIONは、2つの認証ルールの中で最も一般的なものであり、接続を設定してデータを書き出す前に、ユーザーが宛先に何らかの認証を提供する必要がある場合に使用するものです。

宛先設定で"authenticationRule": "CUSTOMER_AUTHENTICATION"を選択し、宛先がOAuth 2認証方法をサポートしている場合は、OAuth 2認証をお読みください。

"authenticationRule": "PLATFORM_AUTHENTICATION"を選択した場合、資格情報設定を作成し、authenticationId宛先配信設定の パラメーターに資格情報オブジェクトのIDを渡す必要があります。

手順 6:宛先のテスト test-destination

前の手順で設定エンドポイントを使用して宛先を設定した後、宛先テストツール ​を使用して、Adobe Experience Platformと宛先の統合をテストできます。

宛先をテストするプロセスの一環として、Experience Platform UI を使用してセグメントを作成し、宛先に対してアクティブ化する必要があります。 Experience Platformでオーディエンスを作成する方法については、次の2つのリソースを参照してください。

手順 7:宛先を公開する publish-destination

NOTE
この手順は、自分で使用するプライベート宛先を作成しており、他の顧客が使用するために宛先カタログで公開することを検討していない場合は必要ありません。

宛先を設定してテストした後、Destination Publishing API を使用して、構成をレビュー用にアドビに送信します。

手順 8:宛先のドキュメント化 document-destination

NOTE
この手順は、自分で使用するプライベート宛先を作成しており、他の顧客が使用するために宛先カタログで公開することを検討していない場合は必要ありません。

独立系ソフトウェアベンダー(ISV)またはシステムインテグレータ(SI)で製品化統合を作成する場合、セルフサービスドキュメント化プロセスを使用して、宛先の製品ドキュメントページを Experience Platform 宛先カタログに作成します。

手順9:Adobeのレビュー用に送信先を送信する submit-for-review

NOTE
この手順は、自分で使用するプライベート宛先を作成しており、他の顧客が使用するために宛先カタログで公開することを検討していない場合は必要ありません。

最後に、宛先をExperience Platform カタログに公開し、すべてのExperience Platformのお客様に表示する前に、宛先をAdobeのレビュー用に正式に送信する必要があります。 Destination SDKで作成された製品化された宛先をレビュー用に送信する方法に関する詳細を確認します。

recommendation-more-help
7f4d1967-bf93-4dba-9789-bb6b505339d6