Configure Dialogs
Dialogs panel is where you design the whole conversation between the chatbot and the end-user. It is visually represented by different elements used in the dialog creation.
The dialogs are based on intents. The panel itself is split into three frames, each containing a separate set of configuration options.
Both Dialogs frame and Chatbot builder frames can be collapsed to gain more space and visibility in the panel where you build the dialogs.
Name and group dialogs
The left panel enables you to:
- Hide side panel
- Add new dialog
- Rename the dialog
- Move the dialog
- Duplicate the dialog
- Delete the dialog
- Add new group
- Rename the group
- Move the group
- Delete the group
- Collapse group
The Default group and the Default dialog are created automatically with the chatbot and have the info icon beside it. They cannot be deleted.
The frame containing the list of dialogs can be hidden using the arrows icon in the top right corner of the frame – hovering over it displays the tooltip.
The left frame contains the list of dialogs to which you can add a new one by clicking the +ADD DIALOG action. If you have a lot of dialogs, you can organize them logically into groups.
Note that where you click on the +ADD DIALOG action, the dialog appears under that grouping.
If you want to rename a dialog, clicking the pencil icon next to the name gives instant access to the dialog name.
Clicking the three-dot menu ⁝ displays other the actions you can perform on the dialog:
- Duplicate – used to recreate the same dialog
- Delete – removes the dialog from the list
The action +ADD GROUP allows creation of new groups (of dialogs) in order to separate dialogs for better logical organization.
All group actions are available through the three-dot menu ⁝.
As groups cannot be dragged up and down, use the Move up and Move down actions if you want to rearrange them. Bear in mind that you cannot change the place of the Default group, that one will always stay on top.
To change the name of the group, use the action Edit, and to copy an existing group, use the action Duplicate.
The collapsed arrow is used to collapse the groups or when collapsed, to expand them again.
Session Expire Dialog
When you want your chatbot to notify the end users that their session is finished, use the Session Expire dialog (located at the bottom of dialogs panel).
Click the + ADD SESSION EXPIRE DIALOG and it will appear in the Default dialog group. Like the Default dialog, it has the i icon next to it.
NOTE
You can drag and drop any dialog inside a group to by clicking the left side of the dialog and dropping it anywhere in the structure (the hand shows that the dialog is being moved).
Send text element is automatically added to the dialog to add a message for the end users and notify them that the session has expired (and that a new one will start if they decide to continue the conversation).
Bear in mind that you cannot configure this dialog using all chatbot builder elements – here you can only use elements that are sent to the end user.
Dialog Settings
In the central dialog panel, you can do the following:
- Select the Intent which will be the basis of the dialog
- Design the dialog between the chatbot and the end user
Assign Intent to Dialog
When you have a new dialog ready for configuration, the first building block is automatically displayed - as the whole dialog is usually based on the Intent. For the first element you can either use an existing intent or create a new one at that moment using the TRAIN link. Select an existing intent from the Intent dropdown list or use +Create new intent to create one on the fly.
If you are missing an intent on the list and decide to create it on the fly, enter the intent name and submit it by clicking the checkmark ✓.
IMPORTANT
You can decide not to use an intent only in case you are building a keyword-based chatbot. If you use NLP, intent selection is mandatory.
Templating Language
In order to facilitate the extraction of values and dynamic generation of content, we introduced a templating language – Liquid - to the Answers platform.
Liquid is a templating language with simple markup, made so that users can edit it.
Liquid code uses objects, tags, and filters in a template which is then rendered and the content is dynamically shown. Template is any message you create that contains templating language elements.
Objects
Objects are used to show content on a page. Objects and variable names are denoted by double curly braces: {{ and }}.
Types of objects: String, Number, Boolean, Nil, and Array.
More about Liquid objects.
Tags
Tags create the logic and control flow for templates. They are denoted by curly braces and percent signs: {% tag %}. Tags do not render into any visible text; you use them to assign variables and create conditions and loops in the background.
There are five different types of tags:
• Comment tags – use {% comment %} and {% endcomment %} tags to turn anything between them into a comment.
• Control flow tags – change the displayed information using programming logic: if, unless, elseif/else, case/when.
• Iteration tags – for, else, break, continue, plus additional tags for parameters (limit, offset, range, reversed), cycle, and tablerows (cols, limit, offset, range) to repeatedly run blocks of code.
• Raw tags – used to temporarily disable tag processing, {% raw %} and {% endraw %}.
• Variable tags – assign, capture, increment and decrement are used to create new variables in the templating language.
== | equals |
!= | does not equal |
> | greater than |
< | less than |
>= | greater than or equal to |
<= | less than or equal to |
or | logical or |
and | logical and |
Learn more about Liquid tags.
Filters
Filters change the output of the template language object. They are used within the object and are separated by a | (pipe) character. You can use multiple filters for one output applying them from left to right (each separated by the | character). Check the list of all available filters.
INFO
If you want to dive deeper into examples how to use templating language in Answers, check the How to section.
{% if attribute_name %}
{{attribute_name}}
{% else %}
Fallback message.
{% endif %}
Create Dialogs
The dialog frame on the right contains the building blocks necessary for the dialog structure:
- Chatbot Sends items
- Send Text
- Send Image
- Send Document
- Send Audio
- Send Video
- Send Location
- Send button
- Carousel
- Rich card
- Chatbot Receives items
- User Input
- Attribute
- CSAT Survey
- Chatbot Actions
- To Dialog
- To Agent
- API
- Conditions
- Coding
- Webhook
- Delay
- Close session
- Authentication
To start building the dialog, click on an element from the right frame and drag-drop it under the intent.
After the element is added to the central frame, clicking on it to display its configuration options (in the right frame).
NOTE
All the elements that send a file (audio, image, video, and file) have the allowed maximum size of 10MB whether you use the upload or link function. Some file formats are not supported in some of the browsers (like .mp3 in Internet Explorer). We recommend using Firefox or Chrome.
Now that you have created a chatbot and know the basics about dialogs, elements that are used to create them, and what are the functionalities you can use inside them, it is time to explore what elements each channel supports when it comes to creating dialogs.
Check the table below for elements and formats available on channels.
ELEMENTS | CHANNELS | ||||||||
---|---|---|---|---|---|---|---|---|---|
Viber | SMS | Line | FB Messenger | RCS | Google Business Messages | Telegram | Live Chat | ||
Send text | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Send audio |
✓ .aac, .mp3, .mp4, .amr |
X | X | X |
>✓ >.aac, .mp3, .ogg, .m4a |
✓ .mp4 |
X | X | ✓ |
Send video |
✓ .mp4 |
X | X | X | ✓ |
✓ .mp4 |
✓ | X | ✓ |
Send image |
✓ .jpg, .png |
✓ .jpg, .png |
X |
✓ .jpg, .png |
✓ .jpg, .png |
✓ .jpg, .png |
✓ .jpg, .png |
X |
✓ .jpg, .png |
Send document |
✓ .pdf, .doc, .docx, .ppt, .pptx, .xls, .xlsx, .zip |
X | X | X |
✓ .pdf, .doc, .docx, .ppt, .pptx, .xls, .xlsx, .zip, .rtf |
X |
✓ .pdf, .doc, .docx, .ppt, .pptx, .xls, .xlsx, .zip |
X |
✓ .pdf, .doc, .docx, .ppt, .pptx, .xls, .xlsx |
Send location | ✓ | ✓ | X | ✓ | ✓ | X | X |
X |
X |
Send button | X |
✓ one button |
X | X |
✓ three buttons |
X |
✓ three buttons |
X | X |
Rich card | X | X | X | X | ✓ | X | X | ✓ | X |
Carousel | X | X | X | X | ✓ | X | X | ✓ | X |
Authenticated Dialogs
With session authentication enablement, you can protect some parts of your chatbot by restricting access to some of the dialogs. These dialogs can then contain sensitive data that is not publicly available.
It works by redirecting a user to the authentication dialog where they can authenticate themselves if they reach dialogs that are restricted without a session being authenticated.
Authentication can be set up to expire after a set amount of time according to your requirement (or never expire). This means that should chat sessions lapse from the last MO message the authentication timeframe set by you (e.g. if they leave and come back 5 minutes later), then they will be required to re-authenticate themselves.
Dialogs protected with authentication are only accessible by authenticated users, thus acts a powerful security addition to your chatbots. It can also be used in conjunction with Session Expire dialogs for an additional security layer.
Note
Default, Expiration, and Authorization dialogs can't be restricted with authentication
Enable Authentication
Locking standard dialogs will result in the automatic enablement of the authentication dialog.
This means when you need your users to re-authenticate an expiry time, they will be redirected back to your authentication dialog, then returned to where they left off.
To add authentication, create a new authentication dialog using the +Add Authentication Dialog option.
Set up your authentication as required using the channel elements under bot actions, then add the authentication element to the end of the dialog.
Authentication expiration for users starts from the last message sent by them.
Authenticate Dialogs
Now that you have authentication enabled, you can switch on authentication for other dialogs in the chatbot.
To do so, go to any dialog, and in Dialog Settings enable the Authenticate dialog setting. On doing so, you'll notice your dialog is attributed with the lock icon, indicating it is now protected with authentication.
Disabling this option, or deleting the Authentication dialog, will automatically unlock all dialogs protected by authentication.
This option will also not work if you have not previously set up the authentication dialog.
Another way to direct users to authentication is to use the To Dialog channel element, and send them to an authenticated dialog. Note however, when using this method, the system will not return the user to any previous states like in the first method.
Unsuccessful Authentication Handling
Make sure to set up your authenticated dialogs with the right chatbot actions if for any reason users aren't able to authenticate, for example, offer them the option to speak to someone, or send them to another dialog that can help them.
If you leave your customers with no option, this could give the impression of poor and unhelpful resources and contribute to a negative customer support reputation.
Example of Dialog Creation
Each dialog starts with an intent element but if you create a keyword-based chatbot, the intent can stay empty – you don’t need to select it.
Still, when creating a chatbot, it would be best if all attributes, keywords, and intents were created before you start designing dialogs.
Create as many dialogs as you have intents. When you start designing your conversations, you will be able to move the conversation from one intent to another depending on what are your end users’ intentions.
Let's create a dialog where the end user is asking about the gate for their flight.
So, after you have created a new dialog, in the first block:
- Select for which Intent are you building this dialog
Now to start the conversation from the chatbot end (the conversation is already recognized as belonging to this intent), it makes sense to ask the end user for information regarding their flight.
- Drag’n’drop the Attribute element underneath the intent block
- Enter the text the chatbot will send to the end user - asking about flight number, and, if you want, you can incorporate previously created attributes to make the message less impersonal (using variables like first_name, etc.)
As we are expecting an answer to the question for which flight the end user wants to know the gate, the following element should be Conditions.
- Click on the Conditions element and position it under the Attribute element.
Depending on how the flight numbers are classified, add enough branches to cover all flight number cases.
- To branch the Conditions element, in the right frame add all flight number conditions and configure them accordingly.
- Each Conditions element needs to have a follow-up element where you answer your end user depending which condition was met.
- The last branch in the Conditions element is the Else branch - this is where you configure what happens in the situation when the end user reply doesn't fit with any of the configured conditions
So, now that the conditions are branched properly, you can finish the conversation by adding the element with the clear information requested by the end user:
8. Add a new Send message element with the information what gate corresponds to the sent flight number under each condition branch.
9. Add a separate Send message element for the Else branch to explain that the requested information could not be gathered.
And in the case of the Else branch, you can add one more element to send the end user to a different dialog, one that deals with unresolved queries.
10. Add Go to Dialog element under the Send message element under Else branch.
Bear in mind that when you add the Conditions or Process User Input elements, the dialog has only space for two more elements to follow under each branch, one of which could be Go To Dialog (unless this is an ending dialog). The reason behind this is to ensure that the conversation experience exists without too many branches and that it isn't too complex to follow.
This is just one example of how a dialog can be constructed. With the myriad of elements you have available, there are many ways you can construct the dialogs and make the conversations run smoothly and your end users happy with the interaction.
Once all the dialogs are ready, you can activate your chatbot.