# Channel Attribution Data Mart

## Overview

The channel attribution data mart \[`dm_chn`] is designed to allow merchants to leverage our [Unified Traffic Schema (UTS)](/core-concepts/data-models/unified-schemas/unified-traffic-schema-uts.md) and the Attribution Settings in our Daasity app to develop your own attribution model to understand the purchase path for customers and what channels customers interacted with to make a purchase

## Entity Relationship Diagram (ERD)

[Click on this link to view](https://lucid.app/documents/embedded/47e191ec-9d46-4027-89f9-bb7edfef4993) the ERD for the Channel Attribution Data Mart \[`dm_chn`] illustrating the different tables and keys to join across tables.

## Tables & Source Code

There are two core tables in the \[`dm_chn`] schema:

* \[`dm_chn.dim_order_attribution_detail`] - this table contains a record for each order and attribution method and will have multiple rows per order.  This design makes it easy to add additional model types to the data model and then rank the attribution type in order to generate an overall attribution.
* \[`dm_chn.dim_order_attribution`] - this table contains a single record for each order and transposes the \[`dm_chn.dim_order_attribution_detail`] table into a flat table.  This table is optimized for reporting and is the source for the Order Channel View

Users with access to our [Code Repository](/technical-docs/transform-code/code-repository.md) feature can review our code in the following Github repository:

* [Channel Attribution Data Mart Transformation Code](https://github.com/Daasity/platform-sql-shared/tree/master/scripts/datamart/13_channel_attribution)


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.daasity.com/core-concepts/data-models/unified-schemas/data-marts/channel-attribution-data-mart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
