> For the complete documentation index, see [llms.txt](https://docs.smartbotpro.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.smartbotpro.io/scripts/actions/switching-to-another-script.md).

# Switching to another script

{% hint style="info" %}
"Move to another script" allows you to "redirect" the user to a neighboring script from the current thread.&#x20;
{% endhint %}

Let's create a transition through the side menu, or by right-clicking on a free area of ​​the screen.

![](/files/VZDJF5E1BwNQZW3uXZGD) ![](/files/gaXhgMIDQDNy6j2dPxm7)

In the block menu, you can enter the name of the action and choose where to go.

![](/files/oGOIBP8aysSzmTSaM5qe)

Click "Create Transition". In the pop-up window, we need to select a script and a block for the transition.

![](/files/mAwSWcVlswiRAIEtyIJp)

It is important to give blocks unique names to save time when looking for the right one.

![](/files/EPKHm8hztiSneI1U1VGo)

When the appropriate block is selected, click "Add"&#x20;

Now the selected block is displayed in the "Transition" block menu:

![](/files/o7hShMwmKYWo2sdOSUg9)

&#x20;

It remains only to embed the block with the action "Transition" in the right place in the chain:

![](/files/ep0D8Lbk9WvM9X9AMV3v)

For example, first our user will go to the welcome chain (common to everyone); then select the "buy product" option, and the bot will send it to a separate script, where all the sale mechanics are worked out.&#x20;

Similarly, the user will be able to return.&#x20;

Now you know how to move the user between your scripts.


---

# 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.smartbotpro.io/scripts/actions/switching-to-another-script.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.
