> For the complete documentation index, see [llms.txt](https://doc.nextbot.ru/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.nextbot.ru/functional/functions/sending-result/vklyuchit-vyklyuchit-scenarii.md).

# Включить/выключить сценарии

Данная опция позволяет гибко управлять диалогом с пользователями отключая или включая сценарии после выполненной функции.

Сценарии создаются во вкладке [Сценарии](/functional/scenarii.md). Можете ознакомиться с данной статьей, если еще не использовали в работе.

Предположим, что есть настроенные сценарии, и нам нужно чтобы после того как выполнится определенная функция, включались либо отключались заготовленные сценарии.

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

1. Перемещаемся во вкладку Функции.
2. Выберите готовую настроенную функцию, и в самом низу страницы в блоке Действия нажмите на кнопку "Добавить действия"
3. Выберите из списка опцию "Включить/выключить сценарии".

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

4. Для настройки нужно нажать на блок.

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

5. Теперь нам нужно выбрать какие сценарии включать/выключать. Нажмем на кнопку "Добавить сценарий"

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

6. Выберите все сценарии или какой то определенный, нажав на кнопку "Добавить"

<figure><img src="/files/2zj2VlnwnCavmvXYCTqj" alt=""><figcaption></figcaption></figure>

Настроили. Теперь после выполненной функции, выбранные сценарии включаться. Отключить сценарий можно нажав на чек бокс, он будет неактивным.

Итого: Я выбрал определенную функцию (save\_name\_user) и добавил включение сценария, чтобы после того как пользователь скажет свое имя, срабатывали сценарии.

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

При включенной опции "Сброс состояния" все сценарии сбросятся к значениям по умолчанию, все связанные сценарии становятся неактивными.


---

# 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://doc.nextbot.ru/functional/functions/sending-result/vklyuchit-vyklyuchit-scenarii.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.
