> For the complete documentation index, see [llms.txt](https://docs.opendialog.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.opendialog.ai/opendialog-platform/conversation-designer/conversation-design/conversational-patterns/building-robust-assistants/contextual-restart-chat-end.md).

# Restart

This functionality is not activated by default; it must be activated in the Interface Settings page

<figure><img src="/files/WUBsIjXL21Ygst93EarH" alt="" width="375"><figcaption><p>Toggle for Restart button in settings</p></figcaption></figure>

<figure><img src="/files/zoB9H8TKuKu9rsoowOj5" alt="" width="375"><figcaption><p>Restart icon in user interface</p></figcaption></figure>

If the user clicks the **Restart** button at any point during the conversation, an `intent.core.restart` intent is generated. Similar to a no match, the conversation engine will look for an intent.core.TurnRestart intent in a turn in the current scene. If no intent is found, the engine will look for an intent.core.SceneRestart intent in the conversation, and if no intent is found, the engine will look for an intent.core.ConversationRestart.

If none of these are found, the global intent.core.restart is executed. This intent is provided by default in the Trigger conversation (see screenshot)

<figure><img src="/files/TCK1RjHAnrYAqrLHlubk" alt="" width="375"><figcaption><p>intent.core.restart in the Trigger conversation</p></figcaption></figure>

By default the intent.core.restart in the custom template transitions to the Welcome Turn. However, you may want to customize the the prompt to handle the restart versus a welcome for a new interaction. You can do this in a number of ways. One way is to create a separate restart turn in addition to the welcome turn and transition to that turn.

### Contextual Restarts

Individual turns, scenes and conversations can handle restarts however they need.

Consider a scene in which we are trying to gather information about a user. Our conversational flow will be a question from the app, followed by an answer from the user. Now imagine the user made a mistake in the information they entered and hit the restart button.

This is what a scene for this might look like:<br>

![A scene to gather user information](/files/-MeVDUYJt9L8EKdGrZUw)

The turn named `Scene Restart` can have the NLU to capture the user utterance indicating they made a mistake, and transitioning them back to the top of this scene.

In this case, if the user restarts the flow at any point in this scene, we would want to route them back to the `Get Name Turn`(that is the first turn in this scene). To do so the scene restart intent transitions to the Get Name turn.

![The Scene Level Restart](/files/-MeVDYUC2EL8dqfJ6zaQ)

{% hint style="success" %}
Notice the intent is named `intent.core.SceneRestart` as we want to capture all restarts within this scene
{% endhint %}

Now, if the user clicks the restart button at any point in within this scene, they will be routed straight back to the start of the scene.


---

# 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:

```
GET https://docs.opendialog.ai/opendialog-platform/conversation-designer/conversation-design/conversational-patterns/building-robust-assistants/contextual-restart-chat-end.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.
