If you have heard the phrase "Learn your mistakes", you will immediately understand the blocks' results. Any block can fail or work with errors. This can be used, for example, for notifications or checking if a client is available in messengers.
Where to find the results?
1. Create a "Condition" block or other block that supports variables;
2. Click on select a variable or enter 2 curly braces - {{;
3. Click "Block Results" in the drop-down box, this is where all the results are located.
How the results work
If the block is in a chain, the block results will be at the top in reverse order, and then all the others.
If the block is in a chain, the block results will be at the top in reverse order, and then all the others.
If the Phrase Reaction block is separate from the script, the results in the list go in the order the blocks were created. In this case, search by results will help.
Under the name of each block, there is a number. Enter this number into the results search to find the result of the desired block.
The bot remembers the results of the previous dialog, even if autoclose, or the script "return to start" was triggered, or you wrote the /clearall command or the dialog restarted in some other way. This means the next time the client writes, you can forward the dialog along a different chain. The example is on the screenshot.
The bot remembers the results of the previous dialog, even if autoclose, or the script "return to start" was triggered, or you wrote the /clearall command or the dialog restarted in some other way. This means the next time the client writes, you can forward the dialog along a different chain. The example is on the screenshot.
We take the result of the greeting message in the "Condition" block and select "filled" and "not filled". It turns out that if we have already sent a greeting message to a client, we will send them a different message next time.
Different types of results
The standard results for blocks are:
- Success - tells whether the block succeeded or failed. It has 2 possible results TRUE (true) and FALSE (false).
- StatusCode - Status code - 200; 400 or 500.
- ErrorMessage - An explanatory phrase that explains the reason for the Success and StatusCode.
Some blocks have unique results. You can see them below, in the results table. They are signed as "Optional".
Results Table
All blocks and their possible results are listed here.
Incoming webhook block | Doesn't have results you can use in the script, because it's a start block. We can't know if it worked inside the script. And if it worked the result will always be true; 200. |
Start block | The same as “Incoming webhook block” |
Opening a dialog block |
|
Sending a message block
|
|
Sending file
|
|
Closing a dialog |
|
Condition block |
|
Assignment block |
Optional Result
|
Pause block |
Optional Result
|
Sending message* block (start a dialog) |
|
Sending webhook block |
|
Waiting for a message block |
Optional Result
|
Changing a variable |
|
Return to start |
|
Note | No results |
Dialog auto-close block |
|
Non-working hours block |
|
With the help of results and block, you can implement a script in which you can send a message to a client in the first available messenger.
If you still have questions watch our video tutorial.