> 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/attribution-and-affiliate/northbeam/northbeam-server.md).

# Northbeam server

Northbeam is a marketing attribution and analytics platform that provides multi-touch attribution and media mix modeling. This destination sends order and refund events from Chord's servers to the Northbeam Orders API. There is no browser component. For the browser version, see [Northbeam Pixel](/activate/event-streaming/destinations/attribution-and-affiliate/northbeam/northbeam-pixel.md).

## Getting started

You need two values, both found in your Northbeam dashboard under **Settings > API Keys**:

* Your Northbeam API key.
* Your Data Client ID, a UUID that identifies your account.

## Settings

* **Destination Name** (required): a name to tell this destination apart.
* **API Key** (required): your Northbeam API key.
* **Data Client ID** (required): the UUID that identifies your Northbeam account.
* **Test Mode** (optional): sends events to Northbeam's UAT environment instead of production. 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).

## Connect

Add **Northbeam** 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                                                         | Northbeam event           | Notes |
| ------------------------------------------------------------------- | ------------------------- | ----- |
| [`Order Completed`](/collect-data/tracking-plan/order-completed.md) | Create order              |       |
| [`Order Refunded`](/collect-data/tracking-plan/order-refunded.md)   | Create order with refunds |       |

All other events (page, identify and other track events) are skipped. See [Custom events](#custom-events).

## Order Completed

Sends an order to the Northbeam Orders API. The event is skipped if required fields are missing.

**Order attributes**

| Chord source (priority order)                                | Northbeam field    | Notes                          |
| ------------------------------------------------------------ | ------------------ | ------------------------------ |
| `properties.order_id`                                        | `order_id`         | **Required**                   |
| `userId` > `properties.customer_id`                          | `customer_id`      | **Required**                   |
| `properties.email` > `context.traits.email` > `traits.email` | `customer_email`   | **Required**                   |
| `timestamp`                                                  | `time_of_purchase` | Falls back to the current time |
| `properties.total` > `properties.revenue`                    | `purchase_total`   | Defaults to `0`                |
| `properties.currency`                                        | `currency`         | Defaults to `"USD"`            |
| `properties.tax`                                             | `tax`              | Defaults to `0`                |
| `properties.shipping`                                        | `shipping_cost`    | Defaults to `0`                |

**Product attributes**

Each product in `properties.products[]` is required. Each product must have an `id` and `name`.

| Chord source (priority order)                                                                         | Northbeam field | Notes                                                      |
| ----------------------------------------------------------------------------------------------------- | --------------- | ---------------------------------------------------------- |
| `properties.products[].product_id` > `properties.products[].sku`                                      | `id`            | **Required**                                               |
| `properties.products[].name`                                                                          | `name`          | **Required**                                               |
| `properties.products[].quantity`                                                                      | `quantity`      | Defaults to `1`                                            |
| `properties.products[].price`                                                                         | `price`         | Defaults to `0`; coerced to number (accepts string values) |
| `properties.products[].variant_id` > `properties.products[].product_id` > `properties.products[].sku` | `variant_id`    | Empty string if none is present                            |
| `properties.products[].variant` > `properties.products[].name`                                        | `variant_name`  | Empty string if neither is present                         |

## Order Refunded

Sends a refund to the Northbeam Orders API as an order payload with a `refunds` array. The event is skipped if required fields are missing.

**Order attributes**

Same as **Order Completed** above, except `time_of_purchase` prefers `properties.original_timestamp` over `timestamp` to preserve the original order date.

**Refund attributes**

This destination checks for an explicit `properties.refunds[]` array first. If it is missing or empty, it falls back to `properties.products[]` and treats all products as fully refunded.

From `properties.refunds[]` (preferred):

| Chord source (priority order)                                                                       | Northbeam field  | Notes                          |
| --------------------------------------------------------------------------------------------------- | ---------------- | ------------------------------ |
| `properties.refunds[].product_id`                                                                   | `product_id`     | **Required**                   |
| `properties.refunds[].variant_id`                                                                   | `variant_id`     | Only included when present     |
| `properties.refunds[].quantity`                                                                     | `quantity`       | Defaults to `1`                |
| `properties.refunds[].refund_amount` > `properties.refunds[].amount` > `properties.refunds[].price` | `refund_amount`  | Defaults to `0`                |
| `properties.refunds[].refund_cost`                                                                  | `refund_cost`    | Defaults to `refund_amount`    |
| `properties.refunds[].refund_made_at` > `timestamp`                                                 | `refund_made_at` | Falls back to the current time |

From `properties.products[]` (fallback):

| Chord source (priority order)                                    | Northbeam field  | Notes                                                                                   |
| ---------------------------------------------------------------- | ---------------- | --------------------------------------------------------------------------------------- |
| `properties.products[].product_id`                               | `product_id`     | **Required.** A product with only a `sku` has no `product_id`, so the event is skipped. |
| `properties.products[].variant_id` > `properties.products[].sku` | `variant_id`     | Only included when present                                                              |
| `properties.products[].quantity`                                 | `quantity`       | Defaults to `1`                                                                         |
| `properties.products[].price` × `properties.products[].quantity` | `refund_amount`  | Calculated; `0` if the price is missing                                                 |
| Same as `refund_amount`                                          | `refund_cost`    |                                                                                         |
| `timestamp`                                                      | `refund_made_at` | Falls back to the current time                                                          |

## Custom events

This destination does not send any other event. Only `Order Completed` and `Order Refunded` reach Northbeam.

## Validation

Both event types are validated before sending. Required fields:

* **Order Completed:** `order_id`, `customer_id`, `customer_email`, and a non-empty `products[]` where each product has `id` and `name`.
* **Order Refunded:** `order_id`, `customer_id`, `customer_email`, and a non-empty list of refunds where each refund has a `product_id`. The list comes from `refunds[]`, or from `products[]` when `refunds[]` is missing or empty.

## Testing and validation

After you connect the destination, use the browser console and Live Events to check its behavior. You don't need access to the Northbeam dashboard.

**Order Completed, happy path**

```js
window.chord.track("Order Completed", {
  order_id: "TEST-001",
  email: "test@example.com",
  total: 89.97,
  tax: 7.00,
  shipping: 5.99,
  currency: "USD",
  products: [
    {
      product_id: "PROD-001",
      name: "Classic T-Shirt",
      price: 29.99,
      quantity: 2,
      variant_id: "VAR-001-BLK-M",
      variant: "Black / Medium"
    }
  ]
});
```

In Live Events, confirm:

* A **Northbeam Request Payload** `INFO` log appears with the full transformed payload and `messageId`.
* A `200` or `201` response log follows.

**Order Completed, SKU-only product (no variant fields)**

```js
window.chord.track("Order Completed", {
  order_id: "TEST-002",
  email: "test@example.com",
  total: 103.00,
  currency: "USD",
  products: [
    { sku: "RVTTG50", name: "REVERSE Tone Correcting Treatment", price: 103, quantity: 1 }
  ]
});
```

In Live Events, confirm:

* The payload log shows `id: "RVTTG50"`, `variant_id: "RVTTG50"` and `variant_name: "REVERSE Tone Correcting Treatment"`, all falling back from `sku` and `name`.
* No warnings are logged.

**Order Refunded**

```js
window.chord.track("Order Refunded", {
  order_id: "TEST-001",
  email: "test@example.com",
  refunds: [
    {
      product_id: "PROD-001",
      quantity: 1,
      refund_amount: 29.99
    }
  ]
});
```

In Live Events, confirm the payload log shows a `refunds` array with the correct `refund_amount`.


---

# 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/attribution-and-affiliate/northbeam/northbeam-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.
