# Live Chat reference

<!-- prettier-ignore-start -->

Developer reference for `capell-app/live-chat`. Start with the [README](../README.md) for what the extension does and how to install it.

## Package Details

Live Chat is an **Available** Capell package in the **Capell Engagement & CRM** product group. It ships as `capell-app/live-chat` and extends these surfaces: admin, frontend.

- Status: Available
- Tier: paid
- Bundle: engagement-crm
- Composer package: `capell-app/live-chat`
- Namespace: `Capell\LiveChat`
- Theme key: not applicable

## Technical Shape

### Service providers

- `Capell\LiveChat\Providers\MigrationMetadataServiceProvider`
- `Capell\LiveChat\Providers\LiveChatServiceProvider`

### Config files

- `packages/live-chat/config/capell-live-chat.php`

### Migrations

- `packages/live-chat/database/migrations/2026_06_13_000001_create_live_chat_conversations_table.php`
- `packages/live-chat/database/migrations/2026_06_13_000002_create_live_chat_messages_table.php`
- `packages/live-chat/database/migrations/2026_06_13_000003_create_live_chat_availability_tables.php`
- `packages/live-chat/database/migrations/2026_06_13_000004_create_live_chat_rules_and_sources_table.php`
- `packages/live-chat/database/migrations/2026_06_13_000005_create_live_chat_installations_table.php`
- `packages/live-chat/database/migrations/2026_06_13_000006_create_live_chat_ai_source_tables.php`
- `packages/live-chat/database/migrations/2026_07_10_000001_add_normalized_scope_key_to_live_chat_knowledge_gaps.php`
- `packages/live-chat/database/migrations/2026_10_22_000001_create_live_chat_attachment_cleanup_table.php`
- `packages/live-chat/database/migrations/2026_11_04_000001_add_operator_assignment_to_live_chat_tables.php`

### Models

- `LiveChatAIRun`
- `LiveChatAvailabilityException`
- `LiveChatAvailabilityWindow`
- `LiveChatConversation`
- `LiveChatEscalationRule`
- `LiveChatInstallation`
- `LiveChatKnowledgeDocument`
- `LiveChatKnowledgeGap`
- `LiveChatKnowledgeSource`
- `LiveChatMessage`

### Filament classes

- `LiveChatCluster`
- `AvailabilityExceptionResource`
- `CreateAvailabilityException`
- `EditAvailabilityException`
- `ListAvailabilityExceptions`
- `AvailabilityWindowResource`
- `CreateAvailabilityWindow`
- `EditAvailabilityWindow`
- `ListAvailabilityWindows`
- `ScopesLiveChatResourcesToSites`
- `ConversationResource`
- `EditConversation`
- `ListConversations`
- `MessagesRelationManager`
- `EscalationRuleResource`
- `CreateEscalationRule`
- `EditEscalationRule`
- `ListEscalationRules`
- `InstallationResource`
- `CreateInstallation`
- `EditInstallation`
- `ListInstallations`
- `KnowledgeSourceResource`
- `CreateKnowledgeSource`
- `EditKnowledgeSource`
- `ListKnowledgeSources`

### Route files

- `packages/live-chat/routes/web.php`

### Policies

- `AbstractLiveChatResourcePolicy`
- `LiveChatAIRunPolicy`
- `LiveChatAvailabilityExceptionPolicy`
- `LiveChatAvailabilityWindowPolicy`
- `LiveChatConversationPolicy`
- `LiveChatEscalationRulePolicy`
- `LiveChatInstallationPolicy`
- `LiveChatKnowledgeDocumentPolicy`
- `LiveChatKnowledgeGapPolicy`
- `LiveChatKnowledgeSourcePolicy`

### Extension contracts

- `LiveChatKnowledgeProvider`
- `LiveChatResponder`
- `LiveChatWidgetRenderer`

### Actions

- `ApplyLiveChatCorsHeadersAction`
- `AssignLiveChatConversationAction`
- `BuildLiveChatAnalyticsAction`
- `BuildLiveChatAttachmentDownloadUrlAction`
- `BuildLiveChatOperatorStateAction`
- `BuildLiveChatOperatorTranscriptAction`
- `BuildLiveChatPrivacyExportAction`
- `BuildLiveChatSuggestedReplyAction`
- `BuildLiveChatTranscriptAction`
- `BuildLiveChatVisitorMessagesAction`
- `BuildLiveChatWidgetConfigAction`
- `CloseLiveChatConversationAction`
- `DeleteLiveChatAttachmentsAction`
- `DeleteLiveChatConversationsAction`
- `DetectLiveChatIntentAction`
- `DetermineLiveChatEscalationAction`
- `EnterLiveChatHumanQueueAction`
- `EraseLiveChatPrivacyDataAction`
- `GenerateLiveChatSummaryAction`
- `GuardLiveChatInstallationOriginAction`
- `GuardLiveChatSameSiteRequestAction`
- `IndexLiveChatKnowledgeDocumentAction`
- `IndexLiveChatKnowledgeSourceAction`
- `ListLiveChatVisitorUpdatesAction`
- `NotifyLiveChatStaffAction`
- `PresentLiveChatMessageAttachmentsAction`
- `PruneLiveChatConversationsAction`
- `RecordLiveChatAIRunAction`
- `RecordLiveChatKnowledgeGapAction`
- `ReplyToLiveChatMessageAction`
- `RepointMergedContactConversationsAction`
- `RequestLiveChatHandoffAction`
- `ResolveLiveChatAssigneeAction`
- `ResolveLiveChatAvailabilityAction`
- `ResolveLiveChatConversationForInstallationAction`
- `ResolveLiveChatGlobalAdminsAction`
- `ResolveLiveChatInstallationAction`
- `ResolveLiveChatPrivacyConversationIdsAction`
- `RetryLiveChatAttachmentCleanupAction`
- `SearchLiveChatKnowledgeDocumentsAction`
- `SeedLiveChatScreenshotFixtureAction`
- `SendLiveChatOperatorReplyAction`
- `StartLiveChatConversationAction`
- `StoreLiveChatAttachmentsAction`
- `StoreLiveChatMessageAction`
- `SuggestLiveChatHumanReplyAction`
- `SyncLiveChatConversationContactAction`
- `ValidateLiveChatAttachmentAction`

### Data objects

- `IncomingLiveChatMessageData`
- `LiveChatAIRunData`
- `LiveChatAvailabilityData`
- `LiveChatEscalationDecisionData`
- `LiveChatKnowledgeDocumentData`
- `LiveChatKnowledgeSearchResultData`
- `LiveChatResponseData`
- `LiveChatVisitorData`
- `LiveChatWidgetConfigData`

### Command signatures

- `capell:live-chat-screenshot-fixture`
- `capell:live-chat:prune`

### Manifest action API

- `buildLiveChatAnalytics: Capell\LiveChat\Actions\BuildLiveChatAnalyticsAction`
- `buildLiveChatOperatorState: Capell\LiveChat\Actions\BuildLiveChatOperatorStateAction`
- `buildLiveChatSuggestedReply: Capell\LiveChat\Actions\BuildLiveChatSuggestedReplyAction`
- `buildLiveChatTranscript: Capell\LiveChat\Actions\BuildLiveChatTranscriptAction`
- `buildLiveChatWidgetConfig: Capell\LiveChat\Actions\BuildLiveChatWidgetConfigAction`
- `closeLiveChatConversation: Capell\LiveChat\Actions\CloseLiveChatConversationAction`
- `detectLiveChatIntent: Capell\LiveChat\Actions\DetectLiveChatIntentAction`
- `determineLiveChatEscalation: Capell\LiveChat\Actions\DetermineLiveChatEscalationAction`
- `generateLiveChatSummary: Capell\LiveChat\Actions\GenerateLiveChatSummaryAction`
- `guardLiveChatInstallationOrigin: Capell\LiveChat\Actions\GuardLiveChatInstallationOriginAction`
- `guardLiveChatSameSiteRequest: Capell\LiveChat\Actions\GuardLiveChatSameSiteRequestAction`
- `indexLiveChatKnowledgeDocument: Capell\LiveChat\Actions\IndexLiveChatKnowledgeDocumentAction`
- `indexLiveChatKnowledgeSource: Capell\LiveChat\Actions\IndexLiveChatKnowledgeSourceAction`
- `recordLiveChatAIRun: Capell\LiveChat\Actions\RecordLiveChatAIRunAction`
- `recordLiveChatKnowledgeGap: Capell\LiveChat\Actions\RecordLiveChatKnowledgeGapAction`
- `replyToLiveChatMessage: Capell\LiveChat\Actions\ReplyToLiveChatMessageAction`
- `requestLiveChatHandoff: Capell\LiveChat\Actions\RequestLiveChatHandoffAction`
- `resolveLiveChatAvailability: Capell\LiveChat\Actions\ResolveLiveChatAvailabilityAction`
- `resolveLiveChatConversationForInstallation: Capell\LiveChat\Actions\ResolveLiveChatConversationForInstallationAction`
- `resolveLiveChatInstallation: Capell\LiveChat\Actions\ResolveLiveChatInstallationAction`
- `searchLiveChatKnowledgeDocuments: Capell\LiveChat\Actions\SearchLiveChatKnowledgeDocumentsAction`
- `startLiveChatConversation: Capell\LiveChat\Actions\StartLiveChatConversationAction`
- `storeLiveChatAttachments: Capell\LiveChat\Actions\StoreLiveChatAttachmentsAction`
- `storeLiveChatMessage: Capell\LiveChat\Actions\StoreLiveChatMessageAction`
- `suggestLiveChatHumanReply: Capell\LiveChat\Actions\SuggestLiveChatHumanReplyAction`
- `syncLiveChatConversationContact: Capell\LiveChat\Actions\SyncLiveChatConversationContactAction`

### Scheduled commands

- `capell:live-chat:prune (daily; package registered)`

### Console command classes

- `PruneLiveChatConversationsCommand`
- `SeedLiveChatScreenshotFixtureCommand`

### Manifest contributions

- `admin-page: Capell\LiveChat\Manifest\LiveChatClusterContribution`
- `admin-resource: Capell\LiveChat\Manifest\LiveChatAdminResourcesContribution`
- `agent-capability: Capell\LiveChat\Manifest\LiveChatAgentBridgeCapabilitiesContribution`
- `console-command: Capell\LiveChat\Manifest\LiveChatConsoleCommandsContribution`
- `frontend-component: Capell\LiveChat\Manifest\LiveChatWidgetContribution`
- `health-check: Capell\LiveChat\Manifest\LiveChatHealthContribution`
- `model: Capell\LiveChat\Manifest\LiveChatModelsContribution`
- `route: Capell\LiveChat\Manifest\LiveChatFrontendRoutesContribution`
- `scheduled-job: Capell\LiveChat\Manifest\LiveChatPruneScheduleContribution`

### Health checks

- `Capell\LiveChat\Health\LiveChatHealthCheck`

### Blade views

- `packages/live-chat/resources/views/script.blade.php`
- `packages/live-chat/resources/views/widget.blade.php`

### Cache tags

- `live-chat`

## Data Model

- Required tables: `live_chat_attachment_cleanup`, `live_chat_conversations`, `live_chat_installations`, `live_chat_messages`, `live_chat_ai_runs`, `live_chat_availability_windows`, `live_chat_availability_exceptions`, `live_chat_escalation_rules`, `live_chat_knowledge_documents`, `live_chat_knowledge_gaps`, `live_chat_knowledge_sources`.
- Models: `LiveChatAIRun`, `LiveChatAvailabilityException`, `LiveChatAvailabilityWindow`, `LiveChatConversation`, `LiveChatEscalationRule`, `LiveChatInstallation`, `LiveChatKnowledgeDocument`, `LiveChatKnowledgeGap`, `LiveChatKnowledgeSource`, `LiveChatMessage`.
- Core record references in migrations: `sites via site_id`.
- Migration files: `2026_06_13_000001_create_live_chat_conversations_table.php`, `2026_06_13_000002_create_live_chat_messages_table.php`, `2026_06_13_000003_create_live_chat_availability_tables.php`, `2026_06_13_000004_create_live_chat_rules_and_sources_table.php`, `2026_06_13_000005_create_live_chat_installations_table.php`, `2026_06_13_000006_create_live_chat_ai_source_tables.php`, `2026_07_10_000001_add_normalized_scope_key_to_live_chat_knowledge_gaps.php`, `2026_10_22_000001_create_live_chat_attachment_cleanup_table.php`, `2026_11_04_000001_add_operator_assignment_to_live_chat_tables.php`.
- Migration impact: run host migrations through the package install flow before opening package surfaces.
- Deletion/retention behaviour: migrations declare cascade-on-delete relationships and null-on-delete relationships; retention is scheduled through `capell:live-chat:prune` (daily; registered by the package provider).

<!-- prettier-ignore-end -->