Skip to content

Adding use case on behalf of Braze #5379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,18 @@ If you are creating multiple mappings in one Braze Cohorts destination, Segment
> A user can only be added to a cohort if the user already exists in Braze. This means that the Braze Cohorts destination should be used in parallel with the [Braze Cloud Mode (Actions) destination](/docs/connections/destinations/catalog/braze-cloud-mode-actions/) or the [Braze Web Mode (Actions) destination](/docs/connections/destinations/catalog/braze-web-device-mode-actions/), both of which can create users in Braze.

{% include components/actions-fields.html settings="true"%}

### Supplementing audience payloads

Event payloads sent using Computed Traits and Audiences will only contain the computed trait or audience key in question, in addition to the user identities `userId`, `anonymousId` and `email`. If you need supplemental fields from user profiles to map to Braze, consider using an Insert Function with the Engage Profile API. Using the Profile API, you can pull a user's traits from your Engage space within your insert function code before the event hits the destination. You can then use these traits to enrich the event payload sent to the destination.

When dealing with event payloads transmitted through Computed Traits and Audiences, keep in mind that these payloads typically include only the specific computed trait or audience key in question in addition to user identities such as `userId` and `anonymousId`, as well as `email` if available. View [event destinations](/docs/engage/using-engage-data/#event-destinations) for more information.

If you need to include additional fields from user profiles into your mappings, you can achieve this by using an [insert function](/docs/connections/functions/insert-functions/) with the [Engage Profile API](/docs/unify/profile-api/). With the Profile API, you can retrieve the traits associated with a user from your Engage space within your insert function code, all before the event reaches the Braze Cohorts destination.

### Braze Device ID

If you would like to use the `Device ID` mapping for the Cohort Destination you will need to ensure you have captured the Braze device_id, which is not the same as the Segment device_id. Braze has some methods (linked below) that customers can use to capture the Braze device_id for use in the above workaround:
- [Swift method](https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/deviceid/)
- [Android method](https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze/-i-braze/device-id.html)
- [Web method](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#getdeviceid)