> For the complete documentation index, see [llms.txt](https://docs.erathos.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.erathos.com/connectors/apis/cloud-chat-data-extract-api.md).

# Cloud Chat (CloudHumans)

Connect your Cloud Chat Data Extract API to your data warehouse. Sync tickets, delivery events, and metrics to BigQuery, Redshift, Postgres, Databricks, and more.

## Using the Erathos platform

When selecting Cloud Chat Data Extract API as a new connector on the Erathos platform, you will need to name your connection and fill in the following form:

* **Cloud Chat Domain** — the domain you use to log into Cloud Chat (e.g. `cloudchat2.cloudhumans.com`). The `https://` prefix is optional, and you can also paste the full URL from your browser. It varies by instance: `cloudchat`, `cloudchat2`, `cloudchat3`…
* **Account ID** — your Cloud Chat account ID
* **API Access Token** — your Cloud Chat API access token

With this connection created you can seamlessly move your Cloud Chat data to your BigQuery, Redshift or Postgres data warehouse.

### How to find my credentials?

**Domain and Account ID:** log into Cloud Chat and look at the browser URL, e.g. `https://cloudchat2.cloudhumans.com/app/accounts/1/dashboard`. The domain is `cloudchat2.cloudhumans.com` and the Account ID is `1`.

**API Access Token:** the token must be generated by a user with an **administrator** or **supervisor** profile. Open your profile settings at `https://<your-domain>/app/accounts/<account-id>/profile/settings` and copy the access token shown there.

Paste the values into the fields on the Erathos platform and click **Save and close** to complete the setup and start syncing your Cloud Chat data.

## Endpoints and fields

### base\_ticket\_metrics

Sync type availability: Full and incremental refresh

[Cursor](https://docs.erathos.com/platform/connections/sync-types#understanding-cursors): `createdAt`

| Field                  | Type      | Cursor |
| ---------------------- | --------- | ------ |
| ticketId               | integer   |        |
| displayTicketId        | integer   |        |
| inboxId                | integer   |        |
| accountId              | integer   |        |
| accountName            | text      |        |
| ticketStatus           | text      |        |
| teamName               | text      |        |
| ticketPriorityName     | text      |        |
| ticketType             | text      |        |
| inboxName              | text      |        |
| ticketTitle            | text      |        |
| channel                | text      |        |
| tags                   | text      |        |
| createdAt              | timestamp | ✓      |
| firstReplyAt           | timestamp |        |
| firstReplyTime         | float     |        |
| resolvedAt             | timestamp |        |
| totalResolutionTimeMin | float     |        |
| agentId                | integer   |        |
| ticketOwner            | text      |        |
| ticketOwnerEmail       | text      |        |
| contactId              | integer   |        |
| contactName            | text      |        |
| contactEmail           | text      |        |
| contactPhone           | text      |        |
| campaignId             | integer   |        |
| proactivelyInitiated   | boolean   |        |

### ticket\_metrics\_with\_agent\_information

Sync type availability: Full and incremental refresh

[Cursor](https://docs.erathos.com/platform/connections/sync-types#understanding-cursors): `createdAt`

| Field                        | Type      | Cursor |
| ---------------------------- | --------- | ------ |
| ticketId                     | integer   |        |
| displayTicketId              | integer   |        |
| inboxId                      | integer   |        |
| accountId                    | integer   |        |
| accountName                  | text      |        |
| ticketStatus                 | text      |        |
| teamName                     | text      |        |
| ticketPriorityName           | text      |        |
| ticketType                   | text      |        |
| inboxName                    | text      |        |
| ticketTitle                  | text      |        |
| channel                      | text      |        |
| tags                         | text      |        |
| createdAt                    | timestamp | ✓      |
| firstReplyAt                 | timestamp |        |
| firstReplyTime               | float     |        |
| resolvedAt                   | timestamp |        |
| totalResolutionTimeMin       | float     |        |
| agentId                      | integer   |        |
| ticketOwner                  | text      |        |
| ticketOwnerEmail             | text      |        |
| contactId                    | integer   |        |
| contactName                  | text      |        |
| contactEmail                 | text      |        |
| contactPhone                 | text      |        |
| campaignId                   | integer   |        |
| proactivelyInitiated         | boolean   |        |
| ticketLink                   | text      |        |
| agentOnResolutionId          | integer   |        |
| agentOnResolutionName        | text      |        |
| agentOnResolutionEmail       | text      |        |
| firstAgentReplyId            | integer   |        |
| firstAgentReplyName          | text      |        |
| firstAgentReplyEmail         | text      |        |
| firstAgentAssignmentTime     | timestamp |        |
| firstAgentFirstReplyTime     | timestamp |        |
| firstAgentReplyTimeMin       | float     |        |
| firstAgentResolutionTimeMin  | float     |        |
| csatScore                    | float     |        |
| csatFeedback                 | text      |        |
| contactCustomFields          | json      |        |
| conversationCustomFields     | json      |        |
| conversationAdditionalFields | json      |        |

### ticket\_summary

Sync type availability: Full-refresh

| Field           | Type    |
| --------------- | ------- |
| ticketId        | integer |
| displayTicketId | integer |
| ticketLink      | text    |
| summary         | text    |

### campaign\_delivery\_events

Sync type availability: Full and incremental refresh

[Cursor](https://docs.erathos.com/platform/connections/sync-types#understanding-cursors): `updatedAt`

| Field              | Type      | Cursor |
| ------------------ | --------- | ------ |
| id                 | integer   |        |
| campaignId         | integer   |        |
| campaignTitle      | text      |        |
| audience           | text      |        |
| contactId          | integer   |        |
| contactName        | text      |        |
| contactEmail       | text      |        |
| contactPhoneNumber | text      |        |
| ticketId           | integer   |        |
| displayTicketId    | text      |        |
| messageSent        | boolean   |        |
| sentAt             | timestamp |        |
| messageReceived    | boolean   |        |
| receivedAt         | timestamp |        |
| messageRead        | boolean   |        |
| readAt             | timestamp |        |
| messageReplied     | boolean   |        |
| repliedAt          | timestamp |        |
| error              | text      |        |
| createdAt          | timestamp |        |
| updatedAt          | timestamp | ✓      |

### single\_contact\_delivery\_events

Sync type availability: Full and incremental refresh

[Cursor](https://docs.erathos.com/platform/connections/sync-types#understanding-cursors): `updatedAt`

| Field              | Type      | Cursor |
| ------------------ | --------- | ------ |
| id                 | integer   |        |
| contactId          | integer   |        |
| contactName        | text      |        |
| contactEmail       | text      |        |
| contactPhoneNumber | text      |        |
| ticketId           | integer   |        |
| displayTicketId    | text      |        |
| messageSent        | boolean   |        |
| sentAt             | timestamp |        |
| messageReceived    | boolean   |        |
| receivedAt         | timestamp |        |
| messageRead        | boolean   |        |
| readAt             | timestamp |        |
| messageReplied     | boolean   |        |
| repliedAt          | timestamp |        |
| error              | text      |        |
| createdAt          | timestamp |        |
| updatedAt          | timestamp | ✓      |

## Entity Relationships

```mermaid
erDiagram
    ticket_summary ||--o{ base_ticket_metrics : "ticketId = ticketId"
    ticket_summary ||--o{ ticket_metrics_with_agent_information : "ticketId = ticketId"
    ticket_summary ||--o{ campaign_delivery_events : "ticketId = ticketId"
    ticket_summary ||--o{ single_contact_delivery_events : "ticketId = ticketId"

    ticket_summary { int ticketId PK }
    base_ticket_metrics { int ticketId PK }
    ticket_metrics_with_agent_information { int ticketId PK }
    campaign_delivery_events { int id PK }
    single_contact_delivery_events { int id PK }
```
