Scenarios
Build a questionnaire in chat: ask questions in order and save a customer's answers.
در این صفحه
A scenario asks questions in order and remembers the answers. For an inquiry, the bot might ask for a name, phone number, and suitable time. The answers are saved in the customer's profile so you can use them in a confirmation or pass them to a manager. Configure it under Scenarios. In the API, a scenario is called a flow.
What is a scenario
A scenario consists of steps. In each step, enter a question and a parameter, the name of the profile field where the answer will be saved. For example, save the answer to "What is your name?" under name. After the scenario finishes, the bot can insert it into a message with {{param.name}} or check it in another reaction's condition.
Creating a scenario
- Open Scenarios → Add.
- Enter a Name, such as "Consultation request".
- Add questions and choose a parameter to store each answer.
- Put the steps in the order you want.
For example, a three-question form could look like this:
| Step | Question to the customer | Save the answer under |
|---|---|---|
| 1 | What is your name? | name |
| 2 | What is your phone number? | phone |
| 3 | When is a good time for you? | preferred_time |
Launching from a reaction
Add the Run scenario action (start_flow) to a reaction and select the scenario you created. A /order command or a button press can trigger it. Go through the questions in chat and check the saved parameters in the customer's profile. You can then use them in other actions and reactions.
Scenario or dialog steps?
Dialog steps in the message builder can also ask for and validate an answer. They are configured inside one reaction and support formats such as phone number, email, and choices. A scenario can be reused in several reactions; dialog steps belong to one message. See Messages and buttons.
What's next
- Actions: the "Run scenario" action.
- Messages and Buttons: dialog steps with reply validation.
- Substitutions and Formulas: using the collected parameters.