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

# Chatbot Widget

> Lightweight iframe-embeddable chatbot widget page that renders a chat window without sidebar or navigation.

The Chatbot Widget is a bare public page for iframe embedding at the route `/chatbot/widget`.

## Overview

The page loads at `/chatbot/widget?configId=<id>` and renders a `ChatWindow` inside a bare layout with no sidebar or top navigation, making it suitable for iframe embedding on external websites. On mount it calls the `chatbot-session` Edge Function with the `configId`, visitor ID (generated or retrieved from storage), and source URL to create a session. The `ChatWindow` then uses this session for conversation. If `configId` is missing or the session creation fails, an error state is shown.

## Who it's for

Access follows your organization's role and module configuration. tsx\`).

## Before you start

* A valid `configId` query parameter must be supplied (generated from Chatbot Settings embed code).
* This page is accessed via an iframe embed on external websites, not directly by staff.

## Steps

<Steps>
  <Step title="Embed on external site">Paste the iframe snippet (from Chatbot Settings → Embed Code) into your website HTML.</Step>
  <Step title="Widget loads">The widget fetches config via the `chatbot-session` Edge Function using the `configId` parameter.</Step>
  <Step title="Visitor interacts">The visitor types messages in the `ChatWindow` and receives responses.</Step>
</Steps>

## Key concepts

* `configId` — query parameter identifying which chatbot configuration to load
* `chatbot-session` — Edge Function that initializes the conversation session
* Visitor ID — anonymous identifier persisted for session continuity

## Related

<Columns cols={2}>
  <Card title="Platform Foundation" icon="layer-group" href="/pf/overview">
    Platform Foundation overview.
  </Card>

  <Card title="Governance & parity" icon="scale-balanced" href="/governance/index">
    Documentation coverage and governance.
  </Card>
</Columns>

<Note>
  This page documents shipped product behavior. It is not medical, legal, or
  billing advice. Verify against your organization's policies and applicable
  regulations before using it for clinical, compliance, or billing decisions.
  Protected health information (PHI) shown in the product is governed by your
  tenant's access controls and is never exposed in this documentation.
</Note>

<Accordion title="Documentation sources">
  * src/routes/public.tsx
  * src/platform/chatbot/widget/ChatbotWidgetPage.tsx
</Accordion>
