> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudhumans.com/llms.txt
> Use this file to discover all available pages before exploring further.

# cloud_chat_account_user_availability_histories

> Every time an agent went online, offline or busy, and the reason they selected when the workspace asks for one. Use it to reconstruct who was available at a given moment, which the daily [`cloud_chat_agent_metrics`](/data-export/catalog/cloud-chat/cloud_chat_agent_metrics) does not let you do.

Every time an agent went online, offline or busy, and the reason they selected when the workspace asks for one. Use it to reconstruct who was available at a given moment, which the daily [`cloud_chat_agent_metrics`](/data-export/catalog/cloud-chat/cloud_chat_agent_metrics) does not let you do.

<Columns cols={3}>
  <Card title="One row is">
    one availability change
  </Card>

  <Card title="Delivery">
    Rewritten daily
  </Card>

  <Card title="Columns">
    18
  </Card>
</Columns>

## Where it lands

```text theme={null}
s3://<YOUR_BUCKET>/v1/datamart_cloudchat_saas/cloud_chat_account_user_availability_histories/snapshot_date=<DATE>/
```

The partition delivered today holds the whole table. Read the latest
`snapshot_date=` partition only, and check for `_SUCCESS` before you do, as
described in [bucket layout](/data-export/bucket-layout#how-to-tell-if-a-partition-is-ready).

## Columns

<ResponseField name="cloud_chat_account_user_availability_histories_sk" type="bigint">
  Internal warehouse key. Not stable between deliveries — join on `account_user_availability_histories_id`.
</ResponseField>

<ResponseField name="cc_account_sk" type="bigint">
  Internal warehouse key for the account. Use `account_id`.
</ResponseField>

<ResponseField name="cc_users_sk" type="bigint">
  Internal warehouse key for the agent. Use `account_user_id`.
</ResponseField>

<ResponseField name="customer_id" type="varchar(36)">
  Identifier of the workspace the change belongs to.
</ResponseField>

<ResponseField name="tenant_id" type="varchar(256)">
  Id of the tenant. `NULL` for rows with no tenant mapping.
</ResponseField>

<ResponseField name="tenant_name" type="varchar(256)">
  Name of the tenant. `NULL` for rows with no tenant mapping.
</ResponseField>

<ResponseField name="account_user_availability_histories_id" type="bigint">
  **Join key.** Unique id of the availability change.
</ResponseField>

<ResponseField name="instance_id" type="varchar(100)">
  Instance the workspace is served from.
</ResponseField>

<ResponseField name="account_id" type="integer">
  Account the agent belongs to.
</ResponseField>

<ResponseField name="account_user_id" type="bigint">
  **Join key.** Agent whose availability changed. Joins to `assigned_agent_id` on [`cloud_chat_conversations`](/data-export/catalog/cloud-chat/cloud_chat_conversations).
</ResponseField>

<ResponseField name="account_user_name" type="varchar(255)">
  Name of that agent.
</ResponseField>

<ResponseField name="availability_code" type="integer">
  Numeric form of `availability_description`.
</ResponseField>

<ResponseField name="availability_description" type="varchar(7)">
  The state the agent moved to: `online`, `offline` or `busy`.
</ResponseField>

<ResponseField name="availability_reason_id" type="bigint">
  Reason the agent picked, when the workspace asks for one. `NULL` when it does not.
</ResponseField>

<ResponseField name="availability_reason_description" type="varchar(65535)">
  That reason as the agent sees it, such as a break or a meeting. Configured per workspace, so the wording is yours.
</ResponseField>

<ResponseField name="created_at" type="timestamp">
  When the agent moved to this state.
</ResponseField>

<ResponseField name="updated_at" type="timestamp">
  When the record was last modified.
</ResponseField>

<ResponseField name="snapshot_date" type="date">
  Partition column. Date of the delivery that wrote this file, in `YYYY-MM-DD`.
</ResponseField>
