Blocks
For example, a block can display text or an image on the screen, pause the bot until the client responds, or send SMS messages to clients.
What does a bot do with blocks?
You add blocks to the screen, and the bot performs them in the order from the top to the bottom within that single screen.
For example, you can see a screen with 2 Text and 1 Intents blocks in the screenshot below:
![Blocks](/assets/images/whats_blocks_1-9936efdb16aabf63765cee9e798c3241.png)
The bot will act in the following way:
- The bot starts with the “Hello!” message from the first Text block.
- The bot displays the message from the second Text block: “Do you want to play a game?”.
- The bot performs the Intents block, i.e. it waits for the client to agree or disagree and then performs the next action depending on what the client enters.
How can I connect the blocks?
Blocks are connected to screens by arrows. If a block has an output connected to another screen, the bot will switch to that screen and proceed to perform the blocks it contains.
Let’s look at the following example:
The bot will perform actions in the following order:
- The bot writes “Hi!”.
- The bot asks “Would you like to play a game?”.
- The bot waits for the client to answer.
- If the client’s answer is “yes”, this response will fall into the Agreement intent.
- The bot switches to the screen assigned to the Agreement intent, i.e. it will say “Great! What is your name?”. It will wait for the client to reply as the second screen also contains the Intents block.
What blocks are available in Tovie DialogStudio?
Bot response
The Bot response section includes the most common messages the bot sends to the clients:
User says
The User says section includes all possible message types that the client can send to the bot.
- Agreement
- Disagreement
- Switch to agent
- Phone
- Date&Time
In the More blocks section, you can find the list of common client responses and Extended capabilities.
Extended capabilities
The Extended capabilities section includes blocks that allow you to save the data received from the client into a variable.
Actions
The Actions section includes blocks with various actions the bot might perform.