> ## Documentation Index
> Fetch the complete documentation index at: https://docs.typebot.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to add user commands (restart, help...)

A common pattern is letting the user type keywords like `restart`, `help`, or `menu` at any point in the conversation to trigger a specific behavior. Typebot does not ship a dedicated block for this, but you can build it with a [Reply event](https://docs.typebot.com/editor/events/reply.md) combined with [Jump](https://docs.typebot.com/editor/blocks/logic/jump.md) and [Return](https://docs.typebot.com/editor/blocks/logic/return.md) blocks.

## Reply event vs Command event

These two events are easy to confuse:

* **[Reply event](https://docs.typebot.com/editor/events/reply.md)** fires on every user reply (text, button click, etc.). Use it when the trigger is something the user types or selects inside the chat. This is what you want for `restart` or `help` keywords.
* **[Command event](https://docs.typebot.com/editor/events/command.md)** fires only when a command is sent programmatically via [`Typebot.sendCommand`](https://docs.typebot.com/deploy/web/html-javascript#commands) or the [continueChat API](https://docs.typebot.com/api-reference/chat/continue-chat.md). Use it to trigger flows from outside the conversation (a button on your page, an external webhook, etc.).

If you want the user to type a keyword to trigger behavior, use the Reply event.

## Implement a `restart` command

The goal: whenever the user replies with `restart`, the conversation jumps back to the very first block of the flow.

**1. Add a Reply event**

From the events sidebar, drag a Reply event onto the graph.

**2. Filter the reply content**

Inside the event subflow, add a [Condition block](https://docs.typebot.com/editor/blocks/logic/condition.md) that checks if the reply content equals `restart` (case-insensitive if you prefer).

**3. Jump to the first block**

On the `true` branch of the condition, add a [Jump block](https://docs.typebot.com/editor/blocks/logic/jump.md) pointing to the first block of your main flow.

**4. Return on the false branch**

On the `false` branch, add a [Return block](https://docs.typebot.com/editor/blocks/logic/return.md) so the conversation resumes normally when the user types anything else.

> [!NOTE]
>
> The Reply event fires **before** the reply is validated against the current input. This means the keyword works even if the user is currently on a number or email input.

## Implement a `help` command

Same pattern, but instead of jumping to the start of the flow, jump to a dedicated "Help" group that sends a few text bubbles explaining what the bot can do. End that group with a Return block so the user comes back to where they were.

## Handling multiple commands

You can chain several conditions inside a single Reply event subflow:

* `restart` → Jump to start
* `help` → Jump to help group
* `agent` → Jump to human handoff group
* anything else → Return

Keeping all your command routing inside one Reply event makes it easier to maintain than duplicating logic in every group.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.