Collecting data from the interlocutor | Filling Slot

Function and general information

Filling Slot is a slot that allows you to collect answers of the Interlocutor to the Agent’s questions and save these answers to user context variables. Unlike a bunch of “Text – Wait For Reaction – Memory” slots, Slot Filling allows you to collect several answers from the Interlocutor to several Bot questions using only one slot.

Creation and settings

Slot Attributes

  1. NAME – slot name that will be displayed in the Script Tree. The maximum length of the field value is 40 characters
  2. FIELDS – array of Answer variable — Question pairs.
    • Answer variable — the name of the User context variable in which the user’s response to text from Question field will be written. If there is no corresponding variable in the Agent context, it will be created, if such User context variables already exist in the context, it will be updated. Important: When specifying Answer variable, pay attention to the requirements for the names of Custom context variables. If the variable is specified incorrectly, a script Validation error will occur.
    • Question is a field containing the text that the Agent will send to the Interlocutor.

Using Syntax in Slot Filling

In Slot Filling it is permissible to use Expressions and Control Constructs in the Question field.


The control construct {% set some_var = … %}creates a local Context variable that can be used in the template (this Context variable is not saved in the Chat Context).

Slot operation

When performing Slot Filling:

  1. Agent sends to Interlocutor a text message from the Question field and goes into standby mode
  1. The interlocutor sends a message in response.
  2. The Interlocutor’s answer is recorded in a Custom context variable, the name of which is indicated in the Answer variable field for this Question.