# If Online Agent

One of the main advantages of Tiledesk compared to its competitors is that it allows you to hand over the bot conversation to your human agent. In many cases, the bot can perfectly handle the conversation, but sometimes the conversation is complicated, and it is better to hand over the conversation to an available agent.

But how can you be sure that there is an available agent before handing over? This is where the “If Online Agent” action plays an important role in the conversation.

When you want to use the “[Agent Handoff](/ai-chatbots-and-automation/quick-start/how-to-transfer-my-chatbot-to-a-live-agent.md)” action, it’s very helpful to use “**If Online Agent**” before it, as you can see in the image below.

<figure><img src="/files/CkISP6RQCl5JF3pbPSN0" alt=""><figcaption></figcaption></figure>

By clicking on the “If Online Agent,” you can also define a specific department or keep it as the default “Project Wide.”

<figure><img src="/files/k4Nypu31YHWDBU2VVCUD" alt=""><figcaption></figcaption></figure>

Finally, from the green endpoint, which means there is an **available human agent**, continue the flow to “Agent Handoff,” and from the red endpoint, direct to the offline message, as you can see in the image below:

<figure><img src="/files/hrpJIN4segO1vgT7DADT" alt=""><figcaption></figcaption></figure>

\
You can also[ **define the operating hours**](/manage-your-workspace/define-the-operating-hours.md) and [**create different departments**](/manage-your-workspace/creating-a-department.md) specific to your business.

Hope this helps.

To get started, you need to create [**your free account first** ](https://panel.tiledesk.com/v3/dashboard/#/signup)

In case you need further assistance, do not hesitate to contact us via [**support@tiledesk.com**](mailto:support@tiledesk.com).

For more information, please visit [**www.tiledesk.com**](https://tiledesk.com/).\
&#x20;


---

# 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://guide.tiledesk.com/ai-chatbots-and-automation/actions-explained/if-online-agent.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.
