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

概要 overview

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

前提条件 prerequisites

以下に示す手順に進む前に、 Destination SDKの概要 ページを参照してください。Adobe I/O認証に必要な資格情報や、Destination SDKAPI を使用するためのその他の前提条件が取得されます。 これは、パートナーシップと権限の前提条件を満たし、宛先の開発を開始する準備が整っていることを前提としています。

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

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

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

開始者 サーバーとテンプレートの設定の作成 の使用 /destinations-server endpoint.

次に構成の例を示します。 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
      }
   },
   "audienceMetadataConfig":{
      "mapExperiencePlatformSegmentName":false,
      "mapExperiencePlatformSegmentId":false,
      "mapUserInput":false,
      "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
      }
   },
   "audienceMetadataConfig":{
      "mapExperiencePlatformSegmentName":false,
      "mapExperiencePlatformSegmentId":false,
      "mapUserInput":false,
      "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"を使用する場合は、 資格情報設定.

手順 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