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

# chat_topic table

> This table contains chat topics.

## chat\_topic Table (330)

This table contains chat topics.

## Fields

| Name                             | Description                                                                                                     | Type                                                          | Nullable |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- | :------: |
| id                               | The primary key (auto-incremented)                                                                              | PK                                                            |    No    |
| description                      | The descriptiong for this topic.                                                                                | String(255)                                                   |    Yes   |
| language\_id                     | The reference to the associated customer language. NULL or -1 if not set.                                       | FK [cust\_lang](./cust-lang.mdx)                              |    Yes   |
| welcome\_message                 | The welcome message sent to the customer when the chat session starts.                                          | Clob                                                          |    Yes   |
| last\_accept                     | The last time a session was accepted from the inside for this topic.                                            | DateTime                                                      |    Yes   |
| seconds\_pr\_accept              | The average number of seconds per accept for this topic.                                                        | Int                                                           |    Yes   |
| alert\_timeout                   | The number of seconds for an unanswered session before we alert                                                 | Int                                                           |    Yes   |
| alert\_template                  | The reply template to use for alerting                                                                          | Int                                                           |    Yes   |
| alert\_recipient                 | The recipient(s) for the alert template                                                                         | String(255)                                                   |    Yes   |
| flags                            | Flags for this topic: show popup alert?, collect consent first?, use custom message?                            | Enum [ChatTopicFlag](./enums/chattopicflag.mdx)               |    Yes   |
| name                             | The name of this chat topic                                                                                     | String(255)                                                   |    Yes   |
| badge\_header                    | The badge header of the chat topic                                                                              | String(255)                                                   |    Yes   |
| warning\_new\_chat               | Contains the user notify time in minutes                                                                        | Int                                                           |    Yes   |
| manager\_warning\_new\_chat      | Contains the manager notify time in minutes                                                                     | Int                                                           |    Yes   |
| widget\_theme                    | Predefined themes for the chat widget                                                                           | Enum [WidgetTheme](./enums/widgettheme.mdx)                   |    Yes   |
| widget\_color                    | The base color of the widget                                                                                    | String(16)                                                    |    Yes   |
| widget\_font                     | The font used in the widget                                                                                     | String(64)                                                    |    Yes   |
| widget\_show\_logo               | Indicates if the logo should be shown in the widget                                                             | Bool                                                          |    Yes   |
| widget\_show\_agent\_photo       | Use agent photo and name when chatting                                                                          | Bool                                                          |    Yes   |
| widget\_welcome\_title           | Short welcome message when user initiates a chat                                                                | String(255)                                                   |    Yes   |
| widget\_welcome\_message         | Short message displayed as long as the request is in queue or active                                            | String(255)                                                   |    Yes   |
| widget\_offline\_header          | Offline text shown in widget header                                                                             | String(255)                                                   |    Yes   |
| widget\_offline\_message         | Offline message shown in widget                                                                                 | String(1024)                                                  |    Yes   |
| widget\_enable\_ticket           | Enable ticket submission in offline mode                                                                        | Bool                                                          |    Yes   |
| category\_id                     | Category on ticket created from off-line request                                                                | FK [ej\_category](./ej-category.mdx)                          |    Yes   |
| priority\_id                     | Priority on ticket created from off-line request                                                                | FK [ticket\_priority](./ticket-priority.mdx)                  |    Yes   |
| widget\_offline\_fields          | Required field when creating ticket in offline mode                                                             | Enum [WidgetRequiredFields](./enums/widgetrequiredfields.mdx) |    Yes   |
| widget\_auto\_faq                | Enable automatic FAQ suggestions                                                                                | Bool                                                          |    Yes   |
| kb\_category\_id                 | Root folder for FAQ suggestions                                                                                 | FK [kb\_category](./kb-category.mdx)                          |    Yes   |
| widget\_pre\_form                | Enable pre-chat form for anonymous users                                                                        | Bool                                                          |    Yes   |
| widget\_pre\_message             | Message to be shown in a pre-chat                                                                               | String(1024)                                                  |    Yes   |
| widget\_required\_fields         | Fields required to start a chat                                                                                 | Enum [WidgetRequiredFields](./enums/widgetrequiredfields.mdx) |    Yes   |
| widget\_post\_form               | Enable post chat form                                                                                           | Bool                                                          |    Yes   |
| widget\_post\_header             | Header text to show in post chat form                                                                           | String(255)                                                   |    Yes   |
| widget\_post\_message            | Message text to show in post chat form                                                                          | String(1024)                                                  |    Yes   |
| widget\_post\_transcript         | Enable transcript of chat session                                                                               | Bool                                                          |    Yes   |
| widget\_language                 | The language ISO code for the widget language                                                                   | String(63)                                                    |    Yes   |
| use\_opening\_hours              | Whether to use opening hours or not.                                                                            | Bool                                                          |    Yes   |
| tzLocationId                     | Timezone used for the start/stop times for this topic.                                                          | FK [TZLocation](./tzlocation.mdx)                             |    Yes   |
| mon\_enabled                     | Whether open on Mondays.                                                                                        | Bool                                                          |    Yes   |
| mon\_start                       | When opening hours start on Mondays. Only time-part is used.                                                    | DateTime                                                      |    Yes   |
| mon\_stop                        | When opening hours stop on Mondays. Only time-part is used.                                                     | DateTime                                                      |    Yes   |
| tue\_enabled                     | Whether open on Tuesdays.                                                                                       | Bool                                                          |    Yes   |
| tue\_start                       | When opening hours start on Tuesdays. Only time-part is used.                                                   | DateTime                                                      |    Yes   |
| tue\_stop                        | When opening hours stop on Tuesdays. Only time-part is used.                                                    | DateTime                                                      |    Yes   |
| wed\_enabled                     | Whether open on Wednesdays.                                                                                     | Bool                                                          |    Yes   |
| wed\_start                       | When opening hours start on Wednesdays. Only time-part is used.                                                 | DateTime                                                      |    Yes   |
| wed\_stop                        | When opening hours stop on Wednesday. Only time-part is used.                                                   | DateTime                                                      |    Yes   |
| thu\_enabled                     | Whether open on Thursdays.                                                                                      | Bool                                                          |    Yes   |
| thu\_start                       | When opening hours start on Thursdays. Only time-part is used.                                                  | DateTime                                                      |    Yes   |
| thu\_stop                        | When opening hours stop on Thursdays. Only time-part is used.                                                   | DateTime                                                      |    Yes   |
| fri\_enabled                     | Whether open on Fridays.                                                                                        | Bool                                                          |    Yes   |
| fri\_start                       | When opening hours start on Fridays. Only time-part is used.                                                    | DateTime                                                      |    Yes   |
| fri\_stop                        | When opening hours stop on Fridays. Only time-part is used.                                                     | DateTime                                                      |    Yes   |
| sat\_enabled                     | Whether open on Saturdays.                                                                                      | Bool                                                          |    Yes   |
| sat\_start                       | When opening hours start on Saturdays. Only time-part is used.                                                  | DateTime                                                      |    Yes   |
| sat\_stop                        | When opening hours stop on Saturdays. Only time-part is used.                                                   | DateTime                                                      |    Yes   |
| sun\_enabled                     | Whether open on Sundays.                                                                                        | Bool                                                          |    Yes   |
| sun\_start                       | When opening hours start on Sundays. Only time-part is used.                                                    | DateTime                                                      |    Yes   |
| sun\_stop                        | When opening hours stop on Sundays. Only time-part is used.                                                     | DateTime                                                      |    Yes   |
| custom\_queue\_text              | A text to be used in the queue message in the chat widget. Usage is controlled by the flags field, bit number 3 | String(255)                                                   |    Yes   |
| bot\_enabled                     | Enable chatbot on this topic. Run the trigger scripts on bot events.                                            | Bool                                                          |    Yes   |
| bot\_name                        | Chatbot name                                                                                                    | String(80)                                                    |    Yes   |
| bot\_register\_scriptid          | Script id to register/unregister chatbot. 0 if there is no bot                                                  | FK [ejscript](./ejscript.mdx)                                 |    Yes   |
| bot\_session\_created\_scriptid  | Script id to run on new session.                                                                                | FK [ejscript](./ejscript.mdx)                                 |    Yes   |
| bot\_session\_changed\_scriptid  | Script id to run when session state changes.                                                                    | FK [ejscript](./ejscript.mdx)                                 |    Yes   |
| bot\_message\_received\_scriptid | Script id to run when new messages received from customer.                                                      | FK [ejscript](./ejscript.mdx)                                 |    Yes   |
| use\_lunch\_hours                | Whether to use lunch hours or not.                                                                              | Bool                                                          |    Yes   |
| lunch\_start                     | When opening hours starts for lunch. Only time-part is used.                                                    | DateTime                                                      |    Yes   |
| lunch\_stop                      | When opening hours stops for lunch. Only time-part is used.                                                     | DateTime                                                      |    Yes   |
| widget\_agent\_use\_firstname    | Whether to use the firstname of the agent in the chat widget.                                                   | Bool                                                          |    Yes   |
| warning\_chat\_message           | Contains the user notify time in minutes for new chat messages                                                  | Int                                                           |    No    |
| manager\_warning\_chat\_message  | Contains the manager notify time in minutes for new chat messages                                               | Int                                                           |    No    |
| offline\_form\_time\_limit       | The number of minutes in the queue before the offline form is available                                         | Int                                                           |    Yes   |
| offline\_form\_queue\_length     | The number of customers in the queue before the offline form is available                                       | Int                                                           |    Yes   |
| widget\_enable\_rating           | Setting this to true will enable rating support in the chat widget                                              | Bool                                                          |    Yes   |
| widget\_rating\_text             | The text to be displayed in the widget next to the rating stars                                                 | String(1024)                                                  |    Yes   |
| widget\_badge\_color             | Optional color for chat widget badge                                                                            | String(16)                                                    |    Yes   |
| widget\_badge\_text\_color       | Optional color for chat widget badge text                                                                       | String(16)                                                    |    Yes   |
| widget\_cust\_msg\_color         | Optional color for chat widget customer message                                                                 | String(16)                                                    |    Yes   |
| widget\_cust\_msg\_text\_color   | Optional color for chat widget customer message text                                                            | String(16)                                                    |    Yes   |
| widget\_agent\_msg\_color        | Optional color for chat widget agent message                                                                    | String(16)                                                    |    Yes   |
| widget\_agent\_msg\_text\_color  | Optional color for chat widget agent message text                                                               | String(16)                                                    |    Yes   |
| widget\_font\_size               | Optional size for chat widget font                                                                              | String(16)                                                    |    Yes   |
| widget\_button\_color            | Optional color for chat widget button                                                                           | String(16)                                                    |    Yes   |
| widget\_button\_text\_color      | Optional color for chat widget button text                                                                      | String(16)                                                    |    Yes   |

<img src="https://mintcdn.com/superofficeas/i6M2qZmvMNH7UTeu/media/loc/en/database/tables/chat_topic.png?fit=max&auto=format&n=i6M2qZmvMNH7UTeu&q=85&s=aca3c01540407683096f3768352ab1cc" alt="chat_topic table relationship diagram" width="857" height="764" data-path="media/loc/en/database/tables/chat_topic.png" />

## Indexes

| Fields       | Types | Description |
| ------------ | ----- | ----------- |
| language\_id | FK    | Index       |

## Relationships

| Table                                  | Description                                                                                                             |
| -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| [chat\_session](./chat-session)        | This table contains chat sessions.                                                                                      |
| [chat\_topic\_user](./chat-topic-user) | This table connected the chat topics with the users (i.e. the membership).                                              |
| [cust\_lang](./cust-lang)              | This table contains entries for customer languages.                                                                     |
| [ej\_category](./ej-category)          | This table contains categories, in which tickets are categorized. The categories are organized in a hierarchial manner. |
| [ejscript](./ejscript)                 | ejscript                                                                                                                |
| [kb\_category](./kb-category)          | Knowledge base folder hierarchy                                                                                         |
| [notify](./notify)                     | This table contains the pop-up messages displayed for users for various events, such as \&apos;new ticket\&apos;, etc.  |
| [ticket\_priority](./ticket-priority)  | This table contains the ticket priorities.                                                                              |
| [TZLocation](./tzlocation)             | Time zone location                                                                                                      |

## Replication Flags

* None

## Security Flags

* No access control via user's Role.


## Related topics

- [What's new in version 10.1.2.686](/release-notes/database/changes-10.1.2.md)
- [What's new in version 10.3.9.718](/release-notes/database/changes-10.3.9.md)
- [What's new in version 10.5.1.1092](/release-notes/database/changes-10.5.1.md)
- [What's new in version 10.5.2.435](/release-notes/database/changes-10.5.2.md)
- [What's new in version 10.5.3.711](/release-notes/database/changes-10.5.3.md)
- [What's new in version 10.5.4.867](/release-notes/database/changes-10.5.4.md)
