# Getting Started

Connect your BI tool to Atender's analytics data warehouse. We support two connection methods depending on your platform version.

***

## New Platform (BigQuery)

{% hint style="success" %}
**Applies to:** Customers on the new Atender platform
{% endhint %}

### Connection Details

| Setting            | Value                                                                |
| ------------------ | -------------------------------------------------------------------- |
| **Platform**       | Google BigQuery                                                      |
| **Project ID**     | Provided in your tenant settings (Settings → Data Warehouse)         |
| **Dataset**        | Provided in your tenant settings (e.g., `tenant_abc123_yourcompany`) |
| **Authentication** | Service Account (JSON key)                                           |

### Setup Steps

1. Log in to Atender and go to **Settings → Data Warehouse**
2. Click **Provision Data Warehouse** (first time only)
3. Click **Download New Key** to get your service account credentials (JSON file)
4. Open your BI tool and add a **Google BigQuery** data source
5. Enter the **Project ID** shown in your Data Warehouse settings
6. For authentication, select **Service Account** and upload the downloaded JSON key file
7. Select your **dataset** and choose which views to import
8. Start building reports!

### Power BI Specific Steps

1. Open Power BI Desktop → **Get Data → Google BigQuery**
2. Enter the Project ID from your Data Warehouse settings
3. Choose **DirectQuery** (recommended) or Import mode
4. Authentication: select **Service Account** → upload the JSON key
5. Select your dataset and the views you need

### Credentials

* Credentials are managed in **Settings → Data Warehouse**
* You can generate multiple keys (e.g., one per team member or BI tool)
* Revoke compromised keys instantly from the same page
* Each key only has **read access** to your tenant's dataset

{% hint style="warning" %}
**Security:** Store JSON key files securely. Revoke keys immediately if compromised.
{% endhint %}

### Data Freshness

| Aspect        | Details                      |
| ------------- | ---------------------------- |
| Sync method   | Change Data Capture (CDC)    |
| Latency       | \~15 minutes                 |
| Custom fields | Refresh daily at 2:00 AM UTC |

***

## Legacy Platform (Azure Synapse)

{% hint style="info" %}
**Applies to:** Customers still on the legacy Synapse-based platform. These instructions will be deprecated once migration is complete.
{% endhint %}

### Connection Details

| Setting            | Value                                                |
| ------------------ | ---------------------------------------------------- |
| **Server**         | `superagent-analytics-ondemand.sql.azuresynapse.net` |
| **Database**       | `superagent`                                         |
| **Authentication** | Service Principal                                    |

### Power BI Setup

1. Open **Power BI Desktop**
2. Click **Get Data** → **Azure** → **Azure Synapse Analytics SQL**
3. Enter the server: `superagent-analytics-ondemand.sql.azuresynapse.net`
4. Enter the database: `superagent`
5. Select **DirectQuery** (recommended) or **Import**
6. Click **OK**
7. Select **Service Principal** authentication
8. Enter your **Tenant ID**, **Client ID**, and **Client Secret**
9. Click **Connect**
10. Select the views for your tenant (e.g., `v_Conversation_YourCompany`)

### Service Principal Credentials

Contact your Atender administrator for:

* **Tenant ID** — Azure AD directory ID
* **Client ID** — Application ID of the service principal
* **Client Secret** — Secret value (store securely, rotate periodically)

{% hint style="warning" %}
**Security:** Never share client secrets. Rotate secrets periodically and store them securely.
{% endhint %}

### Data Freshness

| Aspect          | Details                        |
| --------------- | ------------------------------ |
| Sync frequency  | Hourly                         |
| Latency         | New data appears within 1 hour |
| Historical data | Always available               |

{% hint style="info" %}
Data is synchronized every hour from the operational system. Very recent conversations may not appear immediately.
{% endhint %}


---

# 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://atender-labs.gitbook.io/atender-labs-docs/analytics/getting-started.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.
