Skip to main content

Creating a Script for a Chatbot

A scenario is a set of blocks that define the chatbot’s actions during a conversation with a client.

To create a scenario, blocks are used, which the user assembles like building blocks to form the logic of their conversational solution. The blocks specify the bot’s actions and the expected user responses, all connected in the required sequence.

“Add Blocks”

Blocks can be added by clicking on the desired block in the menu on the left sidebar.

Creating a Script for a Chatbot. Screenshot 1

Alternatively, you can right-click in the right panel to open the command menu for the chatbot.

Creating a Script for a Chatbot. Screenshot 2

“Add Button or Text”

Creating a Script for a Chatbot. Screenshot 3

Here you need to enter the text that will be sent to the client.

For example, if you enter “Good afternoon!”, the client will receive “Good afternoon”.

Creating a Script for a Chatbot. Screenshot 4

You can also add buttons here for chatbot navigation.

Creating a Script for a Chatbot. Screenshot 5

For example, “City Selection”.

Creating a Script for a Chatbot. Screenshot 6

“Attach File”

In this block, you can attach a file that will be sent to the client.

Creating a Script for a Chatbot. Screenshot 7

For example, a product catalog, price list, contract, etc.

Creating a Script for a Chatbot. Screenshot 8

You can also add buttons here for navigation.

Creating a Script for a Chatbot. Screenshot 9

“Condition Block”

This block allows you to add condition checks for the chatbot:

  • Text check
  • Time check
  • Dialog state check
  • Field completion check
Creating a Script for a Chatbot. Screenshot 10

Condition “Text Check”

Creating a Script for a Chatbot. Screenshot 11

In this block, you can add keywords from the client’s message.

Keywords are trigger words that activate the chatbot to follow a specific scenario.

Creating a Script for a Chatbot. Screenshot 12

First, select where the keywords will be located: “Starts with”; “Contains”; “Ends with”.

Creating a Script for a Chatbot. Screenshot 13

Then enter the keywords in the message input field.

Creating a Script for a Chatbot. Screenshot 14

Condition “Time Check”

In this block, you can set the chatbot’s working schedule by days of the week and time, as well as select the time zone.

Creating a Script for a Chatbot. Screenshot 15

To do this, click on “Trigger by time”.

A window will open to configure the bot’s working schedule.

In the “Time Zone” section, select the desired time zone from the dropdown list.

Creating a Script for a Chatbot. Screenshot 16

Next, select the working days of the week and time.

Creating a Script for a Chatbot. Screenshot 17

Condition “Dialog State Check”

Here you can configure a check for the dialog state.

Creating a Script for a Chatbot. Screenshot 18

To do this, select the dialog initiator: “First contact”; “Dialog started by operator”; “Dialog started by client”; “Message is text”; “Message is attachment”.

Creating a Script for a Chatbot. Screenshot 19

Trigger on “First contact” state.

Creating a Script for a Chatbot. Screenshot 20

In this case, the chatbot triggers if the client writes for the first time or the operator starts a dialog from the panel with a client who has never had a dialog before.

Trigger on “Dialog started by operator” state.

Creating a Script for a Chatbot. Screenshot 21

In this case, the chatbot triggers if the operator starts the dialog from the panel with the client.

Trigger on “Dialog started by client” state.

Creating a Script for a Chatbot. Screenshot 22

In this case, the chatbot triggers if the client writes first.

Trigger on “Message is text” state.

Creating a Script for a Chatbot. Screenshot 23

With this condition, the chatbot triggers if the client sent a text message.

Trigger on “Message is attachment” state.

Creating a Script for a Chatbot. Screenshot 24

In this case, the chatbot triggers if the client sent an attachment, such as a photo, document, etc.

In the “Condition” block, you can combine multiple condition checks.

The “AND” mode requires all conditions to be met for the overall condition to be true.

Creating a Script for a Chatbot. Screenshot 25

The “OR” mode requires at least one of the conditions to be met.

Creating a Script for a Chatbot. Screenshot 26

These modes apply to the entire block.

For creating complex conditions, you can use combinations of two or more condition blocks.

“Wait for Response”

This block makes the chatbot wait for the client’s response.

Creating a Script for a Chatbot. Screenshot 27

“Save Data”

This block allows you to save client data to the client’s card in the Teletype panel.

Creating a Script for a Chatbot. Screenshot 28

In the “Save Data” block, select which data to save: “Name”; “E-mail”; “Phone number”; “Custom field”.

Creating a Script for a Chatbot. Screenshot 29

For example, if the chatbot sends the message “Please provide your phone number for contact”, followed by the “Save Data” block set to “Phone number”, then if the client sends their phone number, it will be saved in the client’s card.

Creating a Script for a Chatbot. Screenshot 30

IMPORTANT! In channels like Telegram by phone number, WhatsApp, the “Phone” field in the client card is immutable.
If the client sends a different phone number, a system message will appear in the dialog thread: “It is not possible to change the existing phone number in this channel; you can manually save the user’s provided value in notes”.

Creating a Script for a Chatbot. Screenshot 31

This contact number can be saved in notes.

“Assign Operator”

This bot action assigns an operator to the dialog with the client.

To do this, click “+Select employee” and choose an operator from the dropdown list.

Creating a Script for a Chatbot. Screenshot 32

“Assign Category”

This block allows you to automatically assign a category to the dialog.

Creating a Script for a Chatbot. Screenshot 33

To do this, select the desired category from the dropdown list.

Creating a Script for a Chatbot. Screenshot 34

The selected category will be automatically assigned to the dialog during chatbot operation.

“Assign Tag”

This command allows the chatbot to automatically assign selected tags to the client.
You can assign from 1 to 5 tags at once.

Creating a Script for a Chatbot. Screenshot 35

To do this, select the desired tags from the dropdown list.

Creating a Script for a Chatbot. Screenshot 36

The selected tags will be assigned to the client automatically.

“Remove Tag”

This command allows the chatbot to automatically remove tags assigned to the client.

You can remove from 1 to 5 tags at once.

Creating a Script for a Chatbot. Screenshot 37

To do this, select the desired tags from the dropdown list.

Creating a Script for a Chatbot. Screenshot 38

The selected tags, if assigned to the client, will be removed automatically.

“Close Dialog”

This block allows you to automatically close the dialog with the client.

Creating a Script for a Chatbot. Screenshot 39

“Mark Dialog as Unanswered”

This chatbot action leaves the dialog with the client unanswered and saves it in the left sidebar of the Teletype panel under the Unanswered section.

Creating a Script for a Chatbot. Screenshot 40

“Telegram Notification”

Here you can add a message that will be sent to the Telegram notifier.

Creating a Script for a Chatbot. Screenshot 41

“Add Pause”

Here you can add a pause before the next bot action by specifying the duration in seconds.

Creating a Script for a Chatbot. Screenshot 42
Была ли эта статья полезной?
0 из 5 звезд
5 Звезд 0%
4 Звезд 0%
3 Звезд 0%
2 Звезд 0%
1 Звезд 0%
Как мы можем улучшить эту статью?
Please submit the reason for your vote so that we can improve the article.
Оглавление