コンテンツにスキップ

受信者オブジェクト

受信者オブジェクトを使用すると、エンドポイントで情報をリクエストしたり書き込んだりできます。

このオブジェクトには、external_user_id、user_alias、braze_id、または email のいずれかを含める必要があります。リクエストでは1つだけ指定してください。

受信者オブジェクトを使用すると、ユーザーエイリアスオブジェクト、トリガープロパティオブジェクト、キャンバスエントリプロパティオブジェクト、およびユーザー属性オブジェクトを組み合わせることができます。

オブジェクト本文

[{
  "user_alias": (optional, User Alias Object) User alias of user to receive message,
  "external_user_id": (optional, string) see External user ID,
  "braze_id": (optional, string) see Braze ID,
  "email": (optional, string) email address of user to receive message,
  "prioritization": (optional, array) see Prioritization; required when using email,
  "trigger_properties": (optional, object) personalization key-value pairs for this user when sending a campaign or message; see Trigger Properties,
  "context": (optional, object) personalization key-value pairs for this user when triggering a Canvas; see Canvas context object,
  "send_to_existing_only": (optional, boolean) defaults to true; cannot be used with user aliases; if set to `false`, an `attributes` object must also be included,
  "attributes": (optional, object) fields in the attributes object create or update an attribute of that name with the given value on the specified user profile before the message is sent and existing values are overwritten
}]

send_to_existing_only が true の場合、Braze は既存のユーザーにのみメッセージを送信します。ただし、このフラグはユーザーエイリアスと併用できません。

send_to_existing_only が false の場合は、同じ受信者に attributes オブジェクトを含める必要があります。このフラグは attributes の代わりにはなりません。Braze は attributes を使用して、送信前にプロファイルを作成または更新します(たとえば、メールや SMS 配信のために email や電話番号フィールドを追加したり、購読グループを更新したりします)。このオブジェクトがない場合、/campaigns/trigger/send または /canvas/trigger/send で、新規ユーザーに対して意図した組み合わせの動作は得られません。

Braze が送信する前に、そのプロファイルはメッセージのオーディエンスおよびチャネルの適格性ルールを満たしている必要があります。

受信者オブジェクトの重複排除

受信者オブジェクトを使用してAPI 呼び出しを行う際、同じアドレス (メール、プッシュなど) をターゲットとする重複した受信者が存在する場合、Braze はユーザーの重複を排除します。つまり、Braze は同一のユーザーを削除し、1人だけを残します。

たとえば、同じexternal_user_id を使用した場合、ユーザーが受け取るメッセージは1通のみです。この動作を回避する必要がある場合は、複数のAPI 呼び出しを行うことを検討してください。

受信者配列内に同じexternal_user_id が複数回含まれている場合、Braze はメッセージを1通だけ送信し、配列内で最後に出現したエントリのトリガープロパティを使用します。この動作は確定的で、配列の順序に基づいています。

次の例では、userid1 は"name": "Beth Test 2" を使用したメッセージを1通受け取ります。これは、そのエントリが配列の最後に出現するためです。

{"campaign_id":"#####","recipients":[
{"external_user_id":"userid1","trigger_properties":{"name":"Beth Test 1"}},
{"external_user_id":"userid1","trigger_properties":{"name":"Beth Test 2"}}
]}
New Stuff!