# SupportAgentConfig

**Kind:** Database Model

**Source:** [`atloria-monorepo/libs/database/prisma/schema.prisma`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/database/prisma/schema.prisma#L1970)

## Fields

| Field | Type | Required | Key |
|---|---|---|---|
| `id` | `String` | ✓ | PK |
| `projectId` | `String` | ✓ | unique |
| `organizationId` | `String` | ✓ |  |
| `slug` | `String` | ✓ |  |
| `description` | `String` | - |  |
| `avatarUrl` | `String` | - |  |
| `primaryColor` | `String` | - |  |
| `sortOrder` | `Int` | ✓ |  |
| `includeUserDocs` | `Boolean` | ✓ |  |
| `includeTechnicalDocs` | `Boolean` | ✓ |  |
| `includeApiDocs` | `Boolean` | ✓ |  |
| `scopedCategoryIds` | `Json` | - |  |
| `scopedCollectionIds` | `Json` | - |  |
| `agentName` | `String` | ✓ |  |
| `welcomeMessage` | `String` | - |  |
| `systemPrompt` | `String` | - |  |
| `isEnabled` | `Boolean` | ✓ |  |
| `position` | `String` | ✓ |  |
| `createdAt` | `DateTime` | ✓ |  |
| `updatedAt` | `DateTime` | ✓ |  |
| `chatInteractions` | `ChatInteraction[]` | ✓ |  |
| `chatSessions` | `ChatSession[]` | ✓ |  |
| `messages` | `ChatMessage[]` | ✓ |  |
| `slackIntegrations` | `SlackIntegration[]` | ✓ |  |

## Diagram

```mermaid
erDiagram
    SupportAgentConfig {
        id String [PK]
        projectId String [UNIQUE]
        organizationId String
        slug String
        description String?
        avatarUrl String?
        primaryColor String?
        sortOrder Int
        includeUserDocs Boolean
        includeTechnicalDocs Boolean
        includeApiDocs Boolean
        scopedCategoryIds Json?
        scopedCollectionIds Json?
        agentName String
        welcomeMessage String?
        systemPrompt String?
        isEnabled Boolean
        position String
        createdAt DateTime
        updatedAt DateTime
        chatInteractions ChatInteraction[]
        chatSessions ChatSession[]
        messages ChatMessage[]
        slackIntegrations SlackIntegration[]
    }
    SupportAgentConfig ||--|| Project : ""
    SupportAgentConfig ||--|| Organization : ""
```

## Relationships

- HAS_ONE → `Project`
- HAS_ONE → `Organization`

## Referenced By

- `ChatSession` (HAS_ONE)
- `ChatInteraction` (HAS_ONE)
- `ChatMessage` (HAS_ONE)
- `SlackIntegration` (HAS_ONE)
