> For the complete documentation index, see [llms.txt](https://guide.tiledesk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.tiledesk.com/ai-chatbots-and-automation/actions-explained/if-online-agent.md).

# 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="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2Fp9SMKSEcdtX6SUcPF0e3%2F2uc6x4-Screenshot%202024-06-12%20at%2013.07.33.png?alt=media&amp;token=0d78bfff-b4f4-4a74-b542-a675d9d6fd03" 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="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FNWMDBOxldbYIhMzvZpZ9%2F2uc6zw-Screenshot%202024-06-12%20at%2012.57.40.png?alt=media&amp;token=9b8c409e-125e-4771-820a-6de1c5ace7f9" 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="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FLqs6EV6qSYfFMtivOqFB%2F2uc716-Screenshot%202024-06-12%20at%2012.59.03.png?alt=media&amp;token=1dd2f851-ffba-4894-81dc-17d9470030e4" 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://guide.tiledesk.com/ai-chatbots-and-automation/actions-explained/if-online-agent.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
