수신자 오브젝트
수신자 오브젝트를 사용하면 엔드포인트에서 정보를 요청하거나 쓸 수 있습니다.
이 오브젝트에는 external_user_id, user_alias, braze_id 또는 email 중 하나를 반드시 포함해야 합니다. 요청에는 하나만 지정해야 합니다.
수신자 오브젝트를 사용하면 사용자 별칭 오브젝트, 트리거 속성 오브젝트, Canvas 항목 속성 오브젝트 및 사용자 속성 오브젝트를 결합할 수 있습니다.
객체 본문
[{
"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는 동일한 사용자를 제거하고 하나만 남깁니다.
예를 들어, 동일한 external_user_id를 사용하면 사용자는 메시지를 하나만 받습니다. 이 동작을 우회해야 하는 경우 API를 여러 번 호출하는 방법을 고려해 보세요.
수신자 배열에 동일한 external_user_id가 여러 번 나타나면 Braze는 메시지를 하나만 보내고, 배열에서 마지막으로 나타나는 항목의 트리거 속성을 사용합니다. 이 동작은 결정적이며 배열 순서를 기준으로 합니다.
다음 예시에서 userid1은 "name": "Beth Test 2"를 사용한 메시지 하나를 받습니다. 해당 항목이 배열에서 마지막에 나타나기 때문입니다.
{"campaign_id":"#####","recipients":[
{"external_user_id":"userid1","trigger_properties":{"name":"Beth Test 1"}},
{"external_user_id":"userid1","trigger_properties":{"name":"Beth Test 2"}}
]}