> For the complete documentation index, see [llms.txt](https://documentation.bonsaidata.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.bonsaidata.io/developer-docs/business-reporting-api/schema.md).

# Schema

This documentation describes the standard tables in your Bonsai data warehouse, enabling reliable access to core marketing and business data with consistent naming, data types, and performance.

## Overview

These tables consolidate first-party business outcome data, including revenue, orders, customer attributes, and KPI metrics, into a standardized reporting framework. They serve as the source of truth for measuring business performance across channels, enabling consistent reporting, downstream modeling, and executive-level visibility into marketing impact.

***

### Client Business Results

<details>

<summary><code>client_business_results_dma_dev_table</code> schema<br><br><strong>Description:</strong> Business Results by Bonsai DMA ID</summary>

| field\_name           | is\_nullable | data\_type      | definition                                                             |
| --------------------- | ------------ | --------------- | ---------------------------------------------------------------------- |
| client\_number        | YES          | INT64           | An internal client identifier.                                         |
| date                  | YES          | DATE            | The calendar date of the event.                                        |
| dma\_id               | YES          | INT64           | Bonsai's DMA ID                                                        |
| spend                 | YES          | FLOAT64         | Ad spend                                                               |
| impressions           | YES          | INT64           | Ad impressions                                                         |
| clicks                | YES          | INT64           | Ad clicks                                                              |
| conversions\_3p       | YES          | FLOAT64         | Ad platform conversions, as reported by the ad platform                |
| conversion\_value\_3p | YES          | FLOAT64         | Ad platform conversion value, as reported by the ad platform           |
| num\_visits           | YES          | INT64           | Web or app visits                                                      |
| num\_visitors         | YES          | INT64           | Web or app visitors                                                    |
| metric1–metric20      | YES          | INT64 / FLOAT64 | Business-specific KPI metrics (e.g., revenue, page views, conversions) |

</details>

<details>

<summary><code>client_business_results_dev_mmm_table</code> schema<br><br><strong>Description:</strong> Business Results for Incrementality Modeling</summary>

| field\_name           | is\_nullable | data\_type      | definition                    |
| --------------------- | ------------ | --------------- | ----------------------------- |
| client\_number        | YES          | INT64           | Internal client identifier    |
| date                  | YES          | DATE            | Calendar date                 |
| spend                 | YES          | FLOAT64         | Ad spend                      |
| impressions           | YES          | INT64           | Ad impressions                |
| clicks                | YES          | INT64           | Ad clicks                     |
| conversions\_3p       | YES          | FLOAT64         | Ad platform conversions       |
| conversion\_value\_3p | YES          | FLOAT64         | Ad platform conversion value  |
| num\_visits           | YES          | INT64           | Web/app visits                |
| num\_visitors         | YES          | INT64           | Web/app visitors              |
| metric1–metric20      | YES          | INT64 / FLOAT64 | Business-specific KPI metrics |

</details>

<details>

<summary><code>client_business_results_dev_table</code> schema<br><br><strong>Description:</strong> Business Results Data Table</summary>

| field\_name           | is\_nullable | data\_type      | definition                    |
| --------------------- | ------------ | --------------- | ----------------------------- |
| client\_number        | YES          | INT64           | Internal client identifier    |
| date                  | YES          | DATE            | Calendar date                 |
| spend                 | YES          | FLOAT64         | Ad spend                      |
| impressions           | YES          | INT64           | Ad impressions                |
| clicks                | YES          | INT64           | Ad clicks                     |
| conversions\_3p       | YES          | FLOAT64         | Ad platform conversions       |
| conversion\_value\_3p | YES          | FLOAT64         | Ad platform conversion value  |
| num\_visits           | YES          | INT64           | Web/app visits                |
| num\_visitors         | YES          | INT64           | Web/app visitors              |
| metric1–metric20      | YES          | INT64 / FLOAT64 | Business-specific KPI metrics |

</details>

### Business Results

<details>

<summary><code>business_results_customer_dim_table</code> schema<br><br><strong>Description:</strong> Business Results at a Customer ID level</summary>

| field\_name    | is\_nullable | data\_type | definition                                                         |
| -------------- | ------------ | ---------- | ------------------------------------------------------------------ |
| client\_number | YES          | INT64      | An internal client identifier                                      |
| customer\_id   | YES          | STRING     | Journey customer ID used in Bonsai Platform                        |
| first\_name    | YES          | STRING     | Customer first name                                                |
| last\_name     | YES          | STRING     | Customer last name                                                 |
| email          | YES          | STRING     | Customer email                                                     |
| email2         | YES          | STRING     | Secondary email                                                    |
| email3         | YES          | STRING     | Tertiary email                                                     |
| phone          | YES          | STRING     | Customer phone number                                              |
| phone2         | YES          | STRING     | Secondary phone                                                    |
| phone3         | YES          | STRING     | Tertiary phone                                                     |
| zip            | YES          | STRING     | Postal code                                                        |
| city           | YES          | STRING     | Customer city                                                      |
| state          | YES          | STRING     | Customer state                                                     |
| country        | YES          | STRING     | Customer country                                                   |
| dob            | YES          | DATE       | Date of birth                                                      |
| gender         | YES          | STRING     | Customer gender                                                    |
| klaviyo\_id    | YES          | STRING     | Klaviyo platform customer ID                                       |
| dim1–dim30     | YES          | STRING     | Client-defined custom 1P touchpoint dimensions                     |
| flag1–flag25   | YES          | BOOL       | Logical fields identifying configured customer journey event types |

</details>

<details>

<summary><code>business_results_order_facts_table</code> schema<br><br><strong>Description:</strong> Business Results Facts Table</summary>

| field\_name      | is\_nullable | data\_type      | definition                                |
| ---------------- | ------------ | --------------- | ----------------------------------------- |
| client\_number   | YES          | INT64           | Internal client identifier                |
| order\_id        | YES          | STRING          | Unique identifier for an order            |
| metric1–metric20 | YES          | INT64 / FLOAT64 | Business-specific order-level KPI metrics |

</details>

<details>

<summary><code>business_results_order_dim_table</code> schema<br><br><strong>Description:</strong> Business Results Order-Level Data Table</summary>

| field\_name              | is\_nullable | data\_type | definition                             |
| ------------------------ | ------------ | ---------- | -------------------------------------- |
| client\_number           | YES          | INT64      | Internal client identifier             |
| order\_id                | YES          | STRING     | Unique order ID                        |
| order\_type              | YES          | STRING     | Type of business order                 |
| customer\_id             | YES          | STRING     | Journey customer ID                    |
| created\_at              | YES          | TIMESTAMP  | Record creation timestamp              |
| dayofweek                | YES          | INT64      | Day of week                            |
| year                     | YES          | STRING     | Calendar year (YYYY)                   |
| month                    | YES          | STRING     | Calendar month                         |
| dma\_id                  | YES          | INT64      | Bonsai DMA ID                          |
| order\_dim1–order\_dim10 | YES          | STRING     | Client-defined custom order dimensions |
| cookie\_match\_dim1      | YES          | STRING     | 1P event parameter used for matching   |
| cookie\_match\_dim2      | YES          | STRING     | Alternative 1P matching parameter      |

</details>


---

# 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://documentation.bonsaidata.io/developer-docs/business-reporting-api/schema.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.
