> For the complete documentation index, see [llms.txt](https://docs.chord.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chord.co/activate/event-streaming/destinations/email-and-marketing/braze/braze-server.md).

# Braze server

This destination sends events to Braze's REST API from Chord's servers, so it is not affected by ad blockers or closed tabs. Chord sends data to Braze's `/users/track` and `/users/identify` endpoints. See [Braze](/activate/event-streaming/destinations/email-and-marketing/braze.md) for how this version and the [Braze browser](/activate/event-streaming/destinations/email-and-marketing/braze/braze-browser.md) version fit together.

## Getting started

You need a Braze REST API key and your Braze REST endpoint.

* **API key**: find it under **Developer Console** in the Braze dashboard. This is a different key from the one the Braze browser version uses.
* **REST endpoint**: the base URL depends on your Braze cluster and follows the format `https://rest.iad-0#.braze.com`. For example, `https://rest.iad-01.braze.com/users/track` and `https://rest.iad-01.braze.com/users/identify`.

![The Braze tile in the Chord destination catalog](https://2938842758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5Oy2IAsu7IvAGAlWgC36%2Fuploads%2Fgit-blob-d577a138e84e0eb20ce7e5341b7acdb77c647c71%2Fbraze-server-destination-catalog.png?alt=media)

## Settings

* **Destination Name** (required): a name to tell this destination apart.
* **API Key** (required): your Braze API key, created under **Developer Console** in the Braze dashboard.
* **Endpoint** (required): your Braze REST endpoint. Choose from US-01 to US-09 and EU-01 to EU-02. Defaults to `US-01 : dashboard-01.braze.com`.
* **App ID** (optional): the app identifier used to reference specific apps in requests to the Braze API. Created under **Developer Console** in the Braze dashboard.
* **Use Anonymous Id Alias** (optional): if on, Chord uses `anonymousId` as an alias for identified and anonymous profiles. This enables anonymous (alias-only) profiles. Off by default.
* **Send Page Events** (optional): if on, `page` and `screen` events are sent to Braze as custom events. Off by default.
* **Consent Requirements** (optional): the consent categories a visitor must accept before Chord sends data to this destination. See [Consent](/activate/event-streaming/consent.md).

![The Create Braze Destination form](https://2938842758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5Oy2IAsu7IvAGAlWgC36%2Fuploads%2Fgit-blob-6d3dc703c7bdd566c10c1b50fa750330222d6d9b%2Fbraze-server-destination-form.png?alt=media)

## Connect

Add **Braze** from the destination catalog, using the settings above. See [Connect a destination](/activate/event-streaming/connect-a-destination.md) for the full steps.

## Event mapping

| Chord event                                                                                                                                                                                                 | Braze event                                       | Notes                                                                                             |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| `identify`                                                                                                                                                                                                  | `/users/track` attributes, then `/users/identify` | Chord calls `/users/identify` only when the event has a `userId` and a user alias                 |
| [`Order Completed`](/collect-data/tracking-plan/order-completed.md), [`Order Cancelled`](/collect-data/tracking-plan/order-cancelled.md), [`Order Refunded`](/collect-data/tracking-plan/order-refunded.md) | `/users/track` purchases                          | One purchase for each item in `properties.products`. Chord skips the event if it has no products  |
| All other `track` events                                                                                                                                                                                    | `/users/track` custom event                       | The event name and `properties`, without `currency`, `price`, `quantity`, `time` and `event_name` |
| `page`, `screen`                                                                                                                                                                                            | `/users/track` custom event                       | Named `page` or `screen`. Needs **Send Page Events**                                              |

Chord ignores other event types, such as `group` and `alias`.

## Who the event belongs to

Chord picks the first match from this list. It also sends the email and phone number when it has them.

1. `userId`, sent as `external_id`.
2. A `user_alias` in `traits` or `properties`. If there is none and the event has no email or phone number, Chord uses `anonymousId` as the alias when **Use Anonymous Id Alias** is on.
3. A `braze_id` in `traits` or `properties`.

Email and phone number come from `properties`, then `context.traits`, then `traits`. An event with none of these fails, and Chord retries it.

## Purchases

| Chord source (priority order)                                                      | Braze field  | Notes                                                                                                                                                                |
| ---------------------------------------------------------------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `product_id` on the item                                                           | `product_id` |                                                                                                                                                                      |
| `price` on the item                                                                | `price`      | Negative for `Order Cancelled` and `Order Refunded`                                                                                                                  |
| `currency` on the item                                                             | `currency`   | Defaults to `USD`                                                                                                                                                    |
| `quantity` on the item                                                             | `quantity`   | Defaults to `1`                                                                                                                                                      |
| The item's fields and the order's `properties`, plus `event` set to the event name | `properties` | Without `products`, `product_id`, `currency`, `price`, `quantity`, `time` and `event_name`. The item's fields come first, so the order's `properties` win on a clash |
| `timestamp`                                                                        | `time`       |                                                                                                                                                                      |

## User attributes

Chord sends these on every `identify` event.

| Chord source (priority order)                                                                                                                         | Braze field               | Notes |
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | ----- |
| `properties.first_name` (or `firstName`), then `context.traits.first_name`, then `traits.first_name`, then the first or second word of `address.name` | `first_name`, `last_name` |       |
| `gender`, with values such as `male` and `female` changed to Braze's `M` and `F`                                                                      | `gender`                  |       |
| `traits.birthday` > `traits.dateOfBirth` > `traits.dob`                                                                                               | `dob`                     |       |
| `traits.avatar`                                                                                                                                       | `image_url`               |       |
| `context.location.country` > the visitor's country from their location                                                                                | `country`                 |       |
| `context.location` latitude and longitude > the visitor's location                                                                                    | `current_location`        |       |
| `context.location.city`                                                                                                                               | `home_city`               |       |
| `context.location.timezone` > the visitor's time zone                                                                                                 | `time_zone`               |       |
| `context.language`                                                                                                                                    | `language`                |       |
| Every other trait in `traits`                                                                                                                         | Custom attributes         |       |

If the event carries consent for category `C0004`, Chord also sets Braze's `$google_ad_user_data` and `$google_ad_personalization` attributes to that value.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.chord.co/activate/event-streaming/destinations/email-and-marketing/braze/braze-server.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
