| id | The primary key (auto-incremented) | PK | No |
| topic_id | The reference to the associated chat topic. | FK chat_topic | No |
| user_id | The reference to the associated user. | FK ejuser | No |
| customer_id | The reference to the associated customer. May be NULL or -1. | FK person | No |
| customer_alias | The alias for the customer. | String(64) | Yes |
| status | Enum indicating the status for the session (pending, active, closed, etc). | Enum ChatSessionStatus | Yes |
| when_requested | When the session was requested by the customer. | DateTime | Yes |
| when_started | When the session was accepted by a user. | DateTime | Yes |
| when_ended | When the session was ended. | DateTime | Yes |
| idle | The last time anyone sent a message for this session. | DateTime | Yes |
| customer_fetch | The last time the customer's client refetched the data. Used to detect 'dead' session. | DateTime | Yes |
| session_key | Key used to authenticate the session. | String(255) | Yes |
| initial_queue_pos | The initial queue pos (i.e. the number of pending sessions + 1) when the session was requested. | Int | Yes |
| customer_host | The hostname or IP address for the customer. | String(255) | Yes |
| alert_level | The alert level for this chat session. | Int | Yes |
| rank | Lowest possible unique number for active sessions for user. User for color index. Starting at 1. | Int | Yes |
| name | The name of customer, if provided | String(255) | Yes |
| company_name | The name of the customers company, if provided | String(255) | Yes |
| email | The email address of the customer, if provided | String(255) | Yes |
| phone | The phone number of the customer, if provided | String(32) | Yes |
| first_message | A copy of the first message in the chat session | String(1024) | Yes |
| last_message | A copy of the last message in the chat session | String(1024) | Yes |
| flags | Various flags for the chat session | Enum ChatSessionFlags | Yes |
| project_id | The project that this chat session is connected to | FK project | Yes |
| sale_id | The sale that this chat session is connected to | FK sale | Yes |
| ticket_id | The ticket that this chat session is connected to | FK ticket | Yes |
| contact_id | The contact that this chat session is connected to | FK contact | Yes |
| transfer_to | The ejuser that has a pending transfer of the chat session | FK ejuser | Yes |
| consented | The customer consented when starting the session | Bool | Yes |
| chatbot_isactive | Indicates that a chatbot is active on the session. This will cause bot triggers to fire. Set to 0 when bot hands off to user. | Bool | Yes |
| country | The country that the chat customer selected. | Int | Yes |
| rating | Rating of this chat conversation given by the customer | Int | Yes |