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

# Widget / Chatbot

> Embed an AI-powered chatbot widget on your website for customer self-service

## Overview

The Widget / Chatbot integration lets you embed an AI-powered chat widget on your website. Customers can interact with the chatbot for self-service support, and conversations are seamlessly handed off to human agents when needed.

## Prerequisites

* Access to your website's HTML or a tag manager (e.g., Google Tag Manager)
* Admin access to Telemetron

## Setup

<Steps>
  <Step title="Configure the widget">
    Navigate to **Settings** > **Customer Chatbot** and configure your widget settings, including appearance, welcome message, and behavior.
  </Step>

  <Step title="Copy the embed script">
    Copy the embed script provided on the configuration page.
  </Step>

  <Step title="Add the script to your website">
    Paste the embed script into your website's HTML, just before the closing `</body>` tag. Alternatively, add it via your tag manager.
  </Step>
</Steps>

## Configuration

### Session Modes

* **Anonymous sessions** -- Visitors can use the chatbot without identifying themselves. Useful for general inquiries and self-service.
* **Authenticated sessions** -- Pass user identity data to the widget so conversations are linked to known customer records. This enables personalized support and case history.

### Customization

Customize the widget appearance and behavior through the settings page:

* Widget color and branding
* Welcome message and prompts
* Position on the page
* Availability hours

## How It Works

* Customers interact with the **AI chatbot** directly on your website for instant self-service support.
* The AI agent answers questions using your configured knowledge base and workflows.
* When the AI cannot resolve an issue, a **support case** is automatically created and handed off to a human agent.
* **Human agents** can continue the conversation from the Telemetron dashboard, and responses appear in the customer's chat widget in real time.

<Tip>
  Use authenticated sessions to give the AI agent context about the customer, enabling more personalized and efficient support.
</Tip>

## Troubleshooting

| Issue                              | Solution                                                                                                                                      |
| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Widget not appearing               | Verify the embed script is correctly placed before the closing `</body>` tag and that there are no JavaScript errors in your browser console. |
| Chatbot not responding             | Check that the integration is enabled in Telemetron settings and that your AI agent workflows are configured.                                 |
| Authenticated sessions not linking | Ensure you are passing the correct user identity parameters in the widget initialization code.                                                |
| Widget styling conflicts           | Check for CSS conflicts with your website. The widget uses scoped styles, but some global CSS rules may interfere.                            |
