How to create and configure Slots

icon picker
Collecting data from Bot user | Slot Filling slot

Purpose and general information

⁠
@Slot Filling
⁠
is a
@Slot
⁠
that allows you to collect the
@Bot User
⁠
's answers to the
@Bot
⁠
's questions and save these answers to
@User Context Variables
⁠
. Unlike the “
@Text
⁠
-
@Wait For Reaction
⁠
-
@Memory
⁠
” combination,
@Slot Filling
⁠
allows you to collect several
@Bot User
⁠
answers to several questions using only one
@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.
QUESTIONSー array of pairs Answer variable - Question.
Important: 1. There must be at least one pair Answer variable - Question 2. The maximum number of Answer variable - Question pairs is not limited
Answer variable — name of the
@User Context Variables
⁠
, into which the
@Bot User
⁠
's answer to the text from the Question field will be written. If the corresponding variable is not in the
@Chat Context
⁠
, then it will be created; if such a
@Context Variable
⁠
already exists in the
@Chat Context
⁠
, it will be updated.
Questionー field containing the text that the
@Agent
⁠
will send to the
@Bot User
⁠
.
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 Question field are trimmed.
The text is transmitted in the same form in which it was entered in the Question field.
You can display
@Context Variable
⁠
values in the Question field. To do this, you need to specify the name
@Context Variable
⁠
in the line using the syntax {{ variable_name }}.
The Question field allows concatenation of text and
@Context Variable
⁠
. It is allowed to include an unlimited number of variables in the text. ​
image.png
⁠
⁠
When outputting the final text from the Question field, taking into account concatenation, spaces around the edges, if any, will be trimmed.
In the Question field, you can use
@User Context Variables
⁠
with a line break, then the text
@Context Variable
⁠
will be displayed with a line break.

Using syntax in Slot

In the
@Slot Filling
⁠
@Slot
⁠
, it is allowed to use
@Expression
⁠
and
@Expression with Control Structure
⁠
in the Question field. More details:

Slot operation

When performing
@Slot Filling
⁠
:
The
@Agent
⁠
sends the
@Bot User
⁠
a text message from the Question field and goes into standby mode.
The
@Bot User
⁠
sends a message in response.
⁠
image.png
⁠
⁠
⁠
image.png
⁠
⁠
3. The
@Bot User
⁠
’s answer is recorded in the
@Context Variable
⁠
, the name of which is indicated in the Answer variable field for this Question.
⁠
image.png
⁠
⁠


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.