# Chatbot - Using observers

The **Observer** is a feature that allows you to create an automation that **monitors the entire chatbot during the conversation**.

When the observer is activated, it **ignores the current flow the user is in** and directly executes the configured action. This allows certain words, numbers, or conditions **to take priority over any step in the bot**.

***

### 🔍 How the Observer Works

While the user interacts with the chatbot, the **Observer keeps monitoring all sent messages**.

If the configured condition is identified, the system:

1. **Interrupts the current flow**
2. **Ignores the questions or steps in progress**
3. **Immediately executes the defined action**

This behavior ensures that the user can **quickly access important actions**, without needing to follow the entire chatbot flow.

***

### ⚙️ Usage Example

#### 👨‍💼 Talk to an agent

Imagine that the chatbot is asking qualification questions, such as:

* Name
* Phone
* Interest

But the customer does not want to keep answering and prefers to speak directly to an agent.

In this case, you can configure a **Observer** to identify when the user types:

```
9
```

When this happens:

* The chatbot **interrupts the current flow**
* The service is **directed immediately to the configured department**

***

### 🛠️ When to use Observers

Observers are very useful for creating **shortcuts within the chatbot**, such as:

* 👨‍💼 Talk to an agent
* 📞 Request contact
* ❌ Cancel current flow
* 📍 Go to a specific department
* 🆘 Priority support

***

✅ **Tip:**\
Use observers for actions that need to be **always available throughout the conversation**, ensuring more freedom and speed for the user.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sprinthub.com/en/topics/convert/chatbot/chatbot-common-questions/chatbot-using-observers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
