コンテンツにスキップ

Oracle Crowdtwist

Oracle Crowdtwistは、ブランドがパーソナライズされた顧客体験を提供できるようにする、クラウドネイティブなカスタマーロイヤルティソリューションのリーディングカンパニーです。同社のソリューションは100以上のすぐに使えるエンゲージメントパスを提供し、マーケターがより完全な顧客ビューを構築するための迅速なTime-to-Valueを実現します。

Oracle Crowdtwistのデータプッシュ機能では、Crowdtwistのプラットフォームで更新が発生するたびに、ユーザーやイベントのメタデータを渡すことができます。

このガイドでは、Oracle Crowdtwistのユーザープロファイル、ユーザーアクティビティ、およびユーザーリデンプションのライブプッシュフィードをBraze環境に統合する方法について説明します。このドキュメントでは明示的にカバーされていませんが、さらに2つのデータプッシュタイプが利用可能であり、そのセットアップはこのガイドで概説する同じ原則に従います。

Brazeデータ変換テンプレートを使用することで、Brazeに関係のないデータプッシュの要素をフィルターで除外し、Brazeで必要な値を割り当てて、利用可能な「送信先」で活用できるようにすることができます。

例えば、データプッシュを使用して、ユーザーがロイヤルティティアを変更したり報酬を引き換えたりした際に、関連するカスタムイベントやカスタム属性をBrazeに渡すことができます。また、ユーザーのポイント残高のように、メンバーのユーザープロファイルでデータが更新されると同時に、カスタム属性をBrazeに記録するために使用することもできます。

前提条件

要件 説明
Oracle Crowdtwistアカウント このパートナーシップを活用するには、Oracle Crowdtwistアカウントが必要です。
Brazeデータ変換エンドポイント この連携は、Brazeのデータ変換ツールに依存しています。データ変換を作成すると、Brazeが一意のエンドポイントを生成し、CrowdtwistのData Pushの送信先として追加できます。

統合

BrazeとOracle Crowdtwistは、ユーザープロファイル、ユーザーリデンプション、およびユーザーアクティビティイベントを活用する独自のデータ変換を開発するために、データ変換テンプレートを作成しました。

ステップ1: Oracle CrowdTwistテンプレートからData Transformationを作成する

データ設定 > Data Transformation > 変換を作成 > テンプレートを使用に移動し、希望する「BRAZE <> CROWDTWIST」テンプレートを選択します。

4つのテンプレートがあります。ユーザープロファイル、ユーザーアクティビティ、ユーザーリデンプションのイベントをそれぞれ変換するテンプレートが1つずつと、条件付きロジックを使用してさまざまなData Pushイベントに対応するマスターテンプレートが1つです。

Oracle CrowdTwistのData Pushドキュメントに記載されているとおり、Data Pushオブジェクトにはそれぞれ異なるメタデータが含まれるため、適切なBrazeオブジェクトを作成するにはそれぞれ独自の変換コードが必要です。マスターテンプレートでは、3種類のオブジェクトをそれぞれ受け付ける単一のData Transformationを設定し、各オブジェクトの値を使用して適切な出力を作成する方法が示されています。

ステップ2:テンプレートの更新とテスト

このセクションでは、注釈付きのテンプレートが表示されます。これらのテンプレートの本文は、/users/track 送信先に適用されるように設計されています。注釈は // の行頭と緑色のテキストで示されており、変換コードの動作に影響を与えることなく削除できます。

この変換はJavaScriptを使用し、「brazecall」というオブジェクトを構築します。このオブジェクトは、Braze REST APIエンドポイントに送信されるリクエストボディを作成する場所です。これらの送信先へのリクエストに必要な構造に関するガイダンスについては、「送信先」セクションのリンクを参照してください。

データ変換テンプレート

let brazecall = {
 "attributes": [
   {
     //You must include an appropriate identifier for your attribute or event object from data available in Oracle Crowdtwist. This could be an external ID, Braze ID, user alias, phone, or email address for attribute or event objects.
     "external_id": payload.thirdPartyId,
     "email": payload.emailAddress,
   // **Important** To allow Oracle Crowdtwist events to create users in Braze, set the value of "_update_existing_only" to false. Otherwise, set this value to true in your event and attribute objects.
     "_update_existing_only": false,
     "crowdtwist_loyalty_points": payload.redeemablePoints,
 //In this example, the "tierInfo" object from Crowdtwist is transformed into a Braze Nested Custom Attribute. Use the "_merge_objects" value to avoid duplications in a data point efficient manner.
 //The "tierinfo_current_level" attribute is a flat Braze custom attribute, while the following "tierInfo" value is a nested object mirroring the Crowdtwist payload; the difference in capitalization is intentional.
     "tierinfo_current_level": payload.tierInfo.currentLevel,
     "_merge_objects" : true,
     "tierInfo" : {
       "resetDate": payload.tierInfo.resetDate,
       "dateReached":payload.tierInfo.dateReached,
        "scoreNeededToReach": payload.tierInfo.scoreNeededToReach,
        "nextLevel":{
        "minValue":payload.tierInfo.nextLevel.minValue,
        "maxValue":payload.tierInfo.nextLevel.maxValue,
        "title":payload.tierInfo.nextLevel.title
     }
     }
   }
 ]
,
//Below we show how to create both custom attributes and events from a single Crowdtwist User Profile object.
 "events": [
   {
     "external_id": payload.thirdPartyId,
     "email": payload.emailAddress,
     "name": "assignedByEvent",
//Below we can see how to write a timestamp in your object, which is a required value for some objects, like the Event Object.
     "time": new Date().toISOString(),
     "properties": {
       "assigned_by_event": payload.tierInfo.assignedByEvent,
       "date_assigned": payload.tierInfo.dateAssigned
     },
           "_update_existing_only": false
   }
 ]
};
// After the /users/track request is assigned to brazecall, return brazecall to create an output.
return brazecall;

let brazecall = {
"events": [
   {
     "external_id": payload.thirdPartyId,
     "_update_existing_only": false,
     "activityId": payload.activityId,
     "name": payload.activityName,
     "time": new Date().toISOString(),
     "properties": {
       "description": payload.description,
       "date_assigned": payload.dateAwarded
     }
   }
 ]
};
return brazecall;
let brazecall = {
 "attributes": [
   {
   "external_id": payload.thirdPartyId,
   //A user redemption event may not have a third party id, in which case you can instead provide the opportunity to include a user alias.
   "user_alias": { "alias_name" : "crowdtwist_redemption_username", "alias_label" : payload.userName},
   "_update_existing_only": false,
   "redeemed_coupon": payload.couponCode,
   "total_points_redeemed": payload.totalPointsRedeemed
      }
]
}
return brazecall;

//The master template uses JavaScript's conditional operators to determine the output of the Data Transformation. This example shows how to apply JavaScript to your transformation to allow for a dynamic range of sources or inputs.

 // We open the transformation with a simple "if" function. We're checking if the value "payload.tierInfo" is present. "tierInfo" is a value that is always populated in the User Profile Live Push object, but is not present in the others.

if (payload.tierInfo) {
let brazecall = {
 "attributes": [
   {
     "external_id": payload.thirdPartyId,
     "email": payload.emailAddress,
     "_update_existing_only": false,
     "crowdtwist_loyalty_points": payload.redeemablePoints,
     "tierinfo_current_level": payload.tierInfo.currentLevel,
     "_merge_objects" : true,
     "tierInfo" : {
       "resetDate": payload.tierInfo.resetDate,
       "dateReached":payload.tierInfo.dateReached,
        "scoreNeededToReach": payload.tierInfo.scoreNeededToReach,
        "nextLevel":{
        "minValue":payload.tierInfo.nextLevel.minValue,
        "maxValue":payload.tierInfo.nextLevel.maxValue,
        "title":payload.tierInfo.nextLevel.title
     }
     }
   }
 ]
,
 "events": [
   {
     "external_id": payload.thirdPartyId,
     "email": payload.emailAddress,
     "name": "assignedByEvent",
     "time": new Date().toISOString(),
     "properties": {
       "assigned_by_event": payload.tierInfo.assignedByEvent,
       "date_assigned": payload.tierInfo.dateAssigned
     },
           "_update_existing_only": false
   }
 ]
};
return brazecall;
//Now we use an "else if" operator to change the "brazecall" body if the object is a User Activity event by checking if the unique key "activityId" has been populated.
} else if (payload.activityId) {
 let brazecall = {
"events": [
   {
     "external_id": payload.thirdPartyId,
     "_update_existing_only": false,
     "activityId": payload.activityId,
     "name": payload.activityName,
     "time": new Date().toISOString(),
     "properties": {
       "description": payload.description,
       "date_assigned": payload.dateAwarded
     }
   }
 ]
};
return brazecall;
//Finally, this conditional statement triggers if the Data Push object is a User Redemption event, based on whether a value populates in the key "rewardId".
} else if (payload.rewardId) {
 let brazecall = {
 "attributes": [
   {
   "external_id": payload.thirdPartyId,
   "_update_existing_only": false,
   "redeemed_coupon": payload.couponCode,
   "total_points_redeemed": payload.totalPointsRedeemed
      }
]
}
return brazecall;
} else {
 //Include this error message to help with troubleshooting in the log if a call fails. Replace the text in the parentheses with anything that might be clearer to your team based on your Data Transformation.
 throw new Error("No appropriate Identifiers found");
}

送信先

このガイドのテンプレートは「Track Users」送信先に配信するように作成されていますが、Brazeのデータ変換ガイドに記載されているいずれかのエンドポイントに送信するようにテンプレートを設計できます。関連するREST APIドキュメントもあわせてご活用ください。

テスト

テンプレートを好みに合わせて変更した後、正しく動作することを検証する必要があります。変換エディターでValidateを選択すると、Outputセクションにプレビューが生成され、選択した送信先に対してBrazeがマッピングされたリクエストを受け入れることを確認できます。

Outputフィールドに表示されるオブジェクトに問題がなければ、Activateを選択して、データ変換エンドポイントがデータを受信する準備ができた状態にします。

データ変換のWebhook URLは、変換の詳細パネルに表示されます。このURLをコピーして、Oracle CrowdtwistのIntegration Hub内での設定に使用してください。

データ変換は非常にダイナミックなツールであり、JavaScriptの理解とREST APIドキュメントのガイダンスがあれば、このドキュメントで説明されている以上の目的に合わせて設計できます。データ変換テンプレートの複雑な変更に関するサポートやトラブルシューティングについては、カスタマーサクセスマネージャーに連絡して、利用可能なガイダンスについてお問い合わせください。

New Stuff!