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

# Sentiment Chart and Realtime Sentiment Handling

The Sentiment chart provides real-time updates on the sentiment of a conversation. It visually tracks the sentiment trend throughout the interaction and enabling better insights into user sentiment.

The Sentiment Chart helps agents and administrators:

* Monitor the tone and direction of conversations.
* Identify moments of dissatisfaction or positivity.
* Gain insights for better customer engagement and conversation outcomes.

<img src="https://mintcdn.com/koreai/QMFg8VtHu7wMGzMa/ai-for-service/agentai/integration/websdk/images/sentiment-chart.png?fit=max&auto=format&n=QMFg8VtHu7wMGzMa&q=85&s=d8998e29da46308026c888c197debd72" alt="sentiment-chart" width="515" height="837" data-path="ai-for-service/agentai/integration/websdk/images/sentiment-chart.png" />

## Features

* **Realtime sentiment event handling**—These sentiments listen and processes real-time events. These sentiments are categorized into three types:
  * Positive
  * Neutral
  * Negative

* **Display sentiment in Assist Header**—These sentiments are displayed on top of the Assist header. Each sentiment is accompanied by a specific icon for easy recognition. These sentiments are also categorized into three types:
  * Positive
  * Neutral
  * Negative

* **Interactive sentiment chart**—These sentiments are displayed in the header, opens a line chart that displays how the sentiment is varied throughout the conversation, starting from the beginning to the current moment.

```
aaWindowInstance.on('BEFORE_VIEW_INIT', (html, payload) => {
   if(payload.event === 'SENTIMENT_POPUP_TEMPLATE'){
       	// Customize sentimen template if required
   	   }
});
```
