How to create and configure Slots

icon picker
Buttons in Bot's messages | Button Menu slot +Button and Fallback subslots

Purpose and general information

⁠
@Button Menu
⁠
is a
@Slot
⁠
that declares a block of buttons that are defined after this
@Slot
⁠
.
⁠
image.png
⁠
⁠

Slot creation and settings

Slot attributes

⁠
image.png
⁠
⁠
Name — the name of the
@Slot
⁠
, which will be displayed in the
@Script Tree
⁠
. The maximum length of a field value is 40 characters.

Button and Fallback subslots

Automatic generation of subslots when creating a Button Menu

When you create a
@Button Menu
⁠
@Slot
⁠
, two
@button
⁠
@Subslot
⁠
s are automatically created with the names “Button 1” and “Button 2” and a
@fallback
⁠
@Subslot
⁠
.
⁠
image.png
⁠
⁠
You can change the text in the generated
@button
⁠
@Subslot
⁠
s by expanding the
@Subslot
⁠
by double-clicking the mouse, entering the name of the button in the LABEL field and clicking the Save button.
⁠
image.png
⁠
⁠
There must always be at least one
@button
⁠
@Subslot
⁠
, so the last
@Subslot
⁠
cannot be deleted on its own — it is only deleted together with the
@Button Menu
⁠
@Slot
⁠
.

Adding Button Subslots

Using the “+” button you can create a new
@button
⁠
@Subslot
⁠
. A new
@button
⁠
@Subslot
⁠
will be created below the automatically generated
@button
⁠
@Subslot
⁠
with the value “Button 2”.
⁠
image.png
⁠
⁠

Removing Button Subslots

To remove a
@button
⁠
@Subslot
⁠
, you need to right-click on it and click the Remove Branch button, then click OK in the pop-up dialog box.
⁠
image.png
⁠
⁠
⁠
image.png
⁠
⁠
It is possible to delete any
@button
⁠
@Subslot
⁠
if, after deletion, the
@Button Menu
⁠
@Slot
⁠
still has at least one
@button
⁠
@Subslot
⁠
.
⁠
image.png
⁠
⁠
Removing the
@fallback
⁠
@Subslot
⁠
is not possible. When you try to do this, the following error will appear at the bottom center:
⁠
image.png
⁠
⁠
Removing a single
@button
⁠
@Subslot
⁠
is impossible. When you try to do this, the following error will appear at the bottom center:
⁠
image.png
⁠
⁠

Button subslot attributes

⁠
image.png
⁠
⁠
Name — the name of the
@Slot
⁠
, which will be displayed in the
@Script Tree
⁠
. The maximum length of a field value is 40 characters. If a name is not entered, the
@Subslot
⁠
in the
@Script Tree
⁠
will display the first 34 characters from the Label field.
Label — the name of the button that the
@Bot User
⁠
will see when communicating with the
@Agent
⁠
.
Trimming spaces: by clicking the CREATE button (when creating a
@Slot
⁠
) or SAVE (when editing a
@Slot
⁠
), spaces and line breaks at the beginning and end of the Label field are trimmed.
You can change the text in the generated
@button
⁠
@Subslot
⁠
s by expanding the
@Subslot
⁠
by double-clicking the mouse, entering the name of the button in the LABEL field and clicking the Save button.
Important: concatenation of strings and variables in
@button
⁠
@Subslot
⁠
s is not supported. If the LABEL field of a
@button
⁠
@Subslot
⁠
contains a concatenation of variables or a string with a variable, then when you click such a button, the
@Conversation
⁠
will go into
@fallback
⁠
.

Fallback subslot attributes

⁠
image.png
⁠
⁠
Name — the name of the
@Slot
⁠
, which will be displayed in the
@Script Tree
⁠
. The maximum length of a field value is 40 characters. When creating a
@Button Menu
⁠
@Slot
⁠
, the Name field of the
@fallback
⁠
@Subslot
⁠
is automatically filled with the contents of the Name field of the
@Button Menu
⁠
@Slot
⁠
. If the contents of the Name field are removed, the
@Subslot
⁠
in the
@Script Tree
⁠
will appear without a name.

Using the syntax in the Button Subslot

In the
@Button Menu
⁠
@Slot
⁠
, it is possible to use
@Expression
⁠
in the Label field. Read more:

Slot operation

The
@Button Menu
⁠
@Slot
⁠
is empty in its content and performs only a formal role — it defines a block of buttons, the names of which are indicated after it in the
@button
⁠
@Subslot
⁠
s.
When executing the
@Button Menu
⁠
@Slot
⁠
, buttons are displayed on the screen that the
@Bot User
⁠
can press while communicating with the
@Agent
⁠
.
If the
@Bot User
⁠
presses one of the buttons, the
@Conversation
⁠
goes to the
@button
⁠
@Subslot
⁠
corresponding to this button. In this case, the contents of this button are written to
@client_message
⁠
.
Important: some
@End Channel
⁠
s add spaces to the beginning and end of the message, including in the labels of the button pressed by the
@Bot User
⁠
, and the
@Bot User
⁠
may accidentally put a space at the end of the message. In such cases, the outer spaces of the message are trimmed and the button whose label matches the received line is pressed.
If the
@Bot User
⁠
entered text that matches the text of one of the buttons (regardless of case), then the
@Conversation
⁠
will go to the
@button
⁠
@Subslot
⁠
corresponding to this button. In this case, the text entered by the
@Bot User
⁠
is recorded in
@client_message
⁠
.
If, instead of pressing a button, the
@Bot User
⁠
entered any text that does not match the text of any of the buttons, the
@Conversation
⁠
goes to the
@fallback
⁠
@Subslot
⁠
.
If the
@Bot User
⁠
sent a file, the
@Conversation
⁠
goes to the
@fallback
⁠
@Subslot
⁠
.
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.