> For the complete documentation index, see [llms.txt](https://docs.chatlayer.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chatlayer.ai/~/changes/zWOY8fNiBBrqneKkuGvA/bot-answers/dialog-state/plugins.md).

# Go To

The idea of a Go-to is for you to command a bot dialog to *go to* another dialog immediately.&#x20;

<figure><img src="https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LLTwFwbOqJj4dDhg8Ju%2Fuploads%2Fpo3h1QQzmYZriE23VqwV%2FScreenshot%202023-01-03%20at%2013.45.59.png?alt=media&amp;token=5235a823-139b-4238-85cc-e566e3d1d8a1" alt=""><figcaption><p>What a Go-to looks like in your chatbot conversation.</p></figcaption></figure>

You can create Go-to's from many places in your conversation, which makes sense since it's a nice way to keep the conversation nice and flowing. It might be confusing at first sight but using Go-to's is actually very simple.&#x20;

There are 2 main ways of creating Go-to's in Chatlayer:

* [Go-to's within ](#go-tos-within-bot-messages)[dialog types](#go-tos-within-dialog-types)
* [The Go To dialog type](#the-go-to-dialog-type)

## Go-to's within dialog types

You can go to any dialog type to any other dialog type in your conversation.

### Go-to's in Bot Messages buttons

When you create a [Bot Message](/~/changes/zWOY8fNiBBrqneKkuGvA/bot-answers/dialog-state/message-components.md), you can redirect the user to another dialog by clicking something. A clicking action can happen with:

* [buttons](https://docs.chatlayer.ai/bot-answers/dialog-state/message-components#buttons)
* [carousels](https://docs.chatlayer.ai/bot-answers/dialog-state/message-components#carousel)
* [lists](https://docs.chatlayer.ai/bot-answers/dialog-state/message-components#list)&#x20;
* [quick replies](https://docs.chatlayer.ai/bot-answers/dialog-state/message-components#quick-replies)

{% hint style="warning" %}
Not sure if a Go-to is the right button type for you? Check the different button types [here](https://docs.chatlayer.ai/bot-answers/dialog-state/message-components#button-types).
{% endhint %}

![Go to another dialog from a button within a Bot Message](https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LLTwFwbOqJj4dDhg8Ju%2Fuploads%2Fbr46C67i4puoDqJrsEnK%2Fimage.png?alt=media\&token=69f22bcf-5e5f-42fc-b94a-3c412d6cede9)

### Go to another dialog type

At the end of any dialog type (be it a [Bot Message](/~/changes/zWOY8fNiBBrqneKkuGvA/bot-answers/dialog-state/message-components.md), [Input Validation](/~/changes/zWOY8fNiBBrqneKkuGvA/bot-answers/dialog-state/user-input-bot-dialog.md), [Action](/~/changes/zWOY8fNiBBrqneKkuGvA/bot-answers/dialog-state/action-bot-dialog.md), or even [Go To](#the-go-to-dialog-type)), you can choose to redirect the user to any other dialog.

To do that, find the Go To ribbon at the bottom of your dialog and expand it to fill it in.

<figure><img src="https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LLTwFwbOqJj4dDhg8Ju%2Fuploads%2FeYHpfYyEFuvxh9UIow0H%2FScreenshot%202023-01-03%20at%2014.16.59.png?alt=media&amp;token=78723c31-32ec-40a3-8a2e-77ebbccb7301" alt=""><figcaption><p>Go to any other dialog by filling in the Go to section at the bottom of your dialog type.</p></figcaption></figure>

### Go-to's to pass a variable

At the end of [Bot Messages](/~/changes/zWOY8fNiBBrqneKkuGvA/bot-answers/dialog-state/message-components.md) and [Action](/~/changes/zWOY8fNiBBrqneKkuGvA/bot-answers/dialog-state/action-bot-dialog.md) dialogs, you have the option to transfer the user to another bot dialog, and pass a variable that's saved in the user session.

To pass a variable, click on `+Add Variable` and define your variable name and value.

<figure><img src="https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LLTwFwbOqJj4dDhg8Ju%2Fuploads%2Fmp9QXGvAA3ge4FIWxFRX%2FScreenshot%202023-01-03%20at%2014.09.35.png?alt=media&amp;token=bf1db54a-2d05-4082-b541-3227b17f24ae" alt=""><figcaption><p>Link two dialogs and pass a variable by using the Go to section at the end of a Bot Message or Action dialog.</p></figcaption></figure>

## The Go To dialog type

Go To bot dialogs themselves enable your bot to redirect the user to another dialog depending on the conditions of the session variables. This is the easiest way of introducing simple if-then logic to your bot.

By enabling the "Case sensitive" toggle capitalization of letters is taken into account when comparing the value of a variable.

![In this case the user will be redirected to "first class" if the class variable equals "first". Otherwise, the user will go to the "other class" bot dialog](https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LLTwFwbOqJj4dDhg8Ju%2Fuploads%2FAuAoZeoQABaNW8RTyl8D%2Fimage.png?alt=media\&token=e6357533-306e-42f9-a841-9d22097ef655)

{% hint style="warning" %}
The order of the conditional items determines their priority. If a conditional item is met, other conditional items will not be taken into account.
{% endhint %}


---

# 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 dynamically by asking a question.

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

```
GET https://docs.chatlayer.ai/~/changes/zWOY8fNiBBrqneKkuGvA/bot-answers/dialog-state/plugins.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
