> 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)

## 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:

* **API Access Token** — your Cloud Chat API access token, used to authenticate all requests to the Cloud Chat Data Extract API

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

### How to find my token?

To generate an API access token, log into your Cloud Chat platform and navigate to the **Settings → Account → API** (or **Integrations**) section. Locate the **API access tokens** area and click **Generate new token** to create a credential for the data extract API.

Copy the generated token and paste it into the **API Access Token** field on the Erathos platform. Once pasted, 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 }
```
