How to Create a New Bot Scenario?
When you need to create a dialog scenario for a bot from scratch, creating a new scenario allows building complete customer service logic through the visual editor. This instruction will help create a basic scenario and configure its structure.
When Needed
- You need to create a new bot with its own service scenario.
- You need to build dialog logic for automating client responses.
- You need to configure the sequence of messages and bot actions.
What's Important to Know
- Scenario — sequence of messages, actions, and logical transitions that the bot performs during a dialog with a user.
- Section — logical block of a scenario that can contain multiple nodes and have entry and exit points.
- Node — individual scenario element (message, keyboard, input wait, action, etc.).
- Edge — connection between nodes that defines the execution sequence of the scenario.
Prerequisites
You are logged in with integrator or administrator rights. You have a created bot for which you need to create a scenario. You know the basic dialog structure you want to implement.
Step-by-Step Instructions
1. Open Scenario Editor
- Navigate to the Dialog module via
Apps -> Dialog. - Select the bot for which you need to create a scenario.
- Click the scenario edit button or navigate to route
/dialog/bot-scenario/:id, where:idis your bot ID.
2. Create First Section
- In the sections panel at the top of the screen, click the "Add Section" or "Create Section" button.
- In the modal window, enter the section name (for example, "Start Greeting").
- Click "Create" — the section appears in the sections list.
3. Set Starting Section
- In the sections list, find the created section.
- Click the star icon or select the "Set as Starting" option.
- The system automatically sets this section as the entry point to the scenario.
4. Add First Node (Message)
- On the canvas, right-click or use the "Add Node" button.
- In the modal window, select node type "Message".
- The node appears on the canvas — drag it to the desired location.
5. Configure Message Text
- Click on the node to select it — the editing panel (RightSideBar) opens on the right.
- In the "Message Text" field, enter the text that will be sent to the user.
- Click "Save" or simply proceed to the next step — changes save automatically.
6. Add Keyboard with Buttons
- Add a new node of type "Keyboard" to the canvas.
- Connect the message node to the keyboard node through an edge (drag the connection from the message output handle to the keyboard input handle).
- In the keyboard editing panel, add buttons:
- Click "Add Button".
- Enter button text.
- Configure transition when clicking the button (select target node from the dropdown list).
7. Add Input Wait (if needed)
- If you need to collect data from the user, add a node of type "Input Wait" (Input).
- Connect the keyboard to the Input node through an edge.
- In the Input editing panel, configure:
- Input type (text, number, date, email, etc.).
- Validation of entered data.
- Variable where the entered value will be stored.
8. Save Scenario
- Check the scenario structure on the canvas — make sure all nodes are connected correctly.
- Click the "Save" button at the bottom of the screen or use keyboard shortcut
Ctrl+S(orCmd+Son Mac). - The system saves all changes and shows a success message.
What Happens After
The scenario is saved and ready to use. The bot will execute the sequence of actions according to the created logic. You can continue adding new nodes, sections, and configuring transitions between them.
How to Verify It Worked
- Check that the section appeared in the sections list at the top of the screen.
- Make sure the starting section is marked with the corresponding indicator.
- Check that all nodes are displayed on the canvas and connected correctly.
- Try opening the scenario again — all changes should be saved.