How to develop a bot
Welcome to Dialog Manger: eva's main tool, with through countless resources, where you will develop your dialogs and create your knowledge base!
Sidebar Menu
To build a bot, it is important to map its goal, the personas that represent the users with whom the bot will interact, the personality of the virtual agent, and the channels where it will be available.
The knowledge base is the set of all conversational flows. In other words, it represents the virtual agent's entire repertoire. In eva, it's possible to build the knowledge base through the Dialog Manager feature.

Flows

Flow Area
Let's talk about the first part of the knowledge base, the one built from conversational flows?
Flows are dialogues that deal with a specific subject. To design a flow, it is necessary to think about all the components that will compose this dialog.
In the Dialog Manager session you can find the following sub-sections:
1. Workspace: space where conversational flows are created
2. Repositories: that store the components that will compose the flows (represented by the Flows, Intents, Entities, Services and Answers)
3. Training: where you can train some components of the conversational flows.
Before you create the first flow of a bot, you will have to choose of what type it will be:
    A Welcome Flow is mandatory and works as a greeting to the user. It is the first thing a user sees when interacting with a bot. It is a micro-flow of one answer. There can be only one message.
    The Not Expected Flow is mandatory and executed when the bot cannot identify what the user is saying. It is a micro-flow of one answer. After you have created the not expected flow, you cannot delete it. There can be only one message.
    A User Journey Flow, which is the dialog per se, built with all the conversational tools that eva offers. It must start with an intent. If you want, you can reuse an intent as the first step of a user journey flow, as long it does not start another flow.
    There is also the Jump Flow, a complementary flow. You will see more about this process in the next chapter.
    When building a flow, you can zoom in and out and move it freely to see different components.
You can access any created flow by clicking on the eye icon
When building a flow, view it as a funnel. Always go from the broad to the specific. The order of the factors can alter the way your bot behaves significantly. An entity for soup flavor might hinder a flow if it comes before an entity for food in general.
Any flow can be edited (by clicking on the pencil) and deleted (by clicking on the trash can).
Important:
Deleting a flow is an irreversible action

Cells

The flows in eva are composed of elements called cells. Each cell enters the flow for a specific purpose. There are 10 kind of cells:

Basic cells

Advanced cells

Advanced Cells
From version 3.3.0.0, you can also Remove and Reconnect cels. For more information, click here

Hide and Reveal Flow Function

In the colored sidebar of each cell, you trigger the function
These two functions are very useful for improving the visualization of flows with many branches.
On the right side of each cell there is a colored sidebar. Yellow for Intent, blue for Answer and pink for the others (Entity, Code and Rule).
If you click on the sidebar of a cell once, you will notice that all the cells following after it will disappear, as shown in the image below:
Same flow as above, after having activated the hide function in the first cell
To make the flow reappear, just click on the same place again.
Important: this function does not occur in End, Not Expected cells and some types of Jump (only those located at the ends of the flows), simply because they are always positioned at the end of the flows

Intent

Intents Screen
Intents are the “heart” of every bot, refers to the goal the customer has in mind when typing in a question or comment.
If you are a developer, click here to get more information
At Clever, eva's NLP, the Intention is the first act in creating a dialogue. And here are some tips for creating them according to Best Practices:
    In the “Name” field, use _ (underline) or – (hyphen). Spaces are not allowed there.
    Pay attention to the real desire of your user when you give the name of an Intent. For example, the Sentence/Utterance “I want a soup” means that, more than a desire to eat a soup, the user wants to make an order. So, you should name the Intent as make_order.
    In the field “Add example/Utterance”, write some sentences that your user should express the Intents. For example, to the Intent make_order, you should write sentences such as “I wanna a soup, please”, “May I get a soup?”, “I’m starvy and I whant to order right now!” or even typing and linguistic error, such as “whanna a soup”.
    Avoid similar examples in different intents. This might confuse the bot when choosing an intent.
    Not only check what your user says, but how your user says. People talk differently between channels. Pay attention to regional patterns, slang, social groups and writing proficiency.
    Before giving the name of the Intent and register your Utterances (always remembering that Utterance is a sentence/phrase that indicates the Intent of an user), you click the button “Save”. And that’s it!
Very Important:
If you are using Clever (everis proprietary Natural Language Processing, NLP, engine), you must register at least 5 (five) Intents, each one with at least 5 (five) examples/utterances to start your bot
Also very important:
Be very careful when deleting Intents!
In any NLP, if you delete an Intent that is at the beginning of a flow, this flow will automatically be deleted as well.

Import Intents Files

You might have a lot of Intents or examples/utterances. To save the work of registering each one individually, eva allows you to upload those intents and examples/utterances in one file.
To import more than one Utterance/Intent, first you have to make sure that they are written following certain standards:
    First, create a CSV file.
    Then, edit the csv file separating Utterances to Intents with a comma, and do not use spaces, like the model below: Hi,Greeting or I want pizza,Requisition. (In the first sentence, Hi is the Utterance and Greeting, the Intent. In the second, I want pizza, the Utterance and Requisition, the intent).
    Never use diacritics (´`¨^).
    Write only one sentence per line.
    If your phrase has a comma, you must put the sentence between a quotation mark, for example: “Hello, dear bot, I want pizza”,Requisition or “Hello, bot!”,Greeting.
    If your intent has more than one example/utterance, you have to write each one, followed by the intent, like the model below:
Example/utterance1,intent1 Example/utterance2, intent1
Check the examples below:
I need computer,place_order
I need an iphone,place_order
Whats my balance,balance
Can I get a Samsung,place_order
I need to order some red pens,place_order
How much do I have,balance
How rich am I,balance
“A pizza, please”,place_order
Now that you organized them in a file, here are the steps to upload to the Intent’s files to eva:
1) First, go to the intent repository. If you want to import intents, click on the “Import” button bellow the “Create Intent” button.
Import Intents Button
2) If you want to import examples/utterances, go to the Intent you want to add the examples/utterances and click on the “Import examples/utterances” button below the “Description” field (as shown in the image below).
Import Examples/Utterances Button
3) Then, it will open a modal where you can select which file you want to import (as shown in the left side).
Import Intents Modal
4) After that, if your file is valid, click on “Continue”. A progress bar will appear on the lower corner of the screen (as shown in the image below).
Progress Bar
5) After your file is imported, this progress bar becomes a button so you can check details about your file.

Load Intents from NLP

Load Intents from NLP
You can store intents from the NLP you are using and build flows in eva.
When you click on "load", eva download all intents saved in the NLP you are using and store them in the repository. All the loaded versions are shown in a separate screen.
Last Loaded Intents
Those intents can be found in the intents repository. To use them, build a flow and, when selecting the “Intent” option, search in the repository the intent you want to use.
Intent Repository
Remember that you can’t alter those intents. You can only edit their description and tags.
Edit Intent Modal
To change something, such as adding examples/utterances, you have to go back to the NLP and edit your intent there.
After finishing, you have to go back to the NLP and train your flow.
If you rename any intent in the NLP, eva will load it as a new intent. The one with the old name will disappear from the flow along the cells in sequence.

Entity

Entities Repository
Entity is the specification of an Intention or an Answer. It allows your bot to delve deeper in a conversation.
If you insert an Entity after an answer, you will allow your bot to explore better your user desires. If you put an Entity cell after an Intent, you allow your user to show your bot what he wants more accurately.
For example, in the sentence “I want a soup”, the desire to make an order is the Intent, while “soup” is the Entity, a specification of that order.
To create an Entity, first click “Create Entity”, then name it and select its category.
After you create an Entity, you can assign one or more values to it in a flow. This is useful when you are creating options to branch a flow. Instead of creating a lot of Entities, you create one entity and add it repeatedly in the same validation level, selecting different values to each cell.
If you are a developer, click here to get more information for entity table stores configurations
There are 2 (two) types of Entities: Custom Entities and System Entities.

a) Custom Entities

These are the one you can create, edit and delete. In eva, you can create entities if you are using Clever.
Custom Entities from Clever can be divided in two categories: Synonyms and Patterns.
Synonym Entities: recognizes semantically close words in a category. So, for a given category, like “color”, you can specify color types as values, such as “blue”, “green” or “yellow” and, for each one of those, you can add synonym, like:
Blue: aqua, navy.
Yellow: jaune, amber, gold.
To build synonym entities, create a value, such as “blue” and add synonyms: blue, aqua, navy, aquamarine, etc. Synonyms are added like tags, by hitting enter.
Remember to insert the value name as one of the synonyms. The blue entity must have “blue” besides “navy” and “aqua” as synonyms.
Pattern Entities: recognize a model that you insert so you do not have to write a different utterance for every time a user insert new information that follows a specific pattern.
A good example is emails. Instead of creating an intent for every possible email, you create a pattern entity that recognizes the structure of an email address ([email protected]).
To create a pattern entity, you need technical knowledge, as you have to create a RegEx, or regular expression. Those are sequences of characters that define a search pattern.
For example, to create an email pattern entity, you would have to build a RegEx for emails. The email [email protected] (and every other email) would be rendered as:
The first part, ^[A-Z0-9._%+-], looks for characters from A to Z and 0 to 9, followed by a @ and then by [A-Z0-9.-]+\, representing characters from A to Z and 0 to 9.
This is followed by a dot (.) and [A-Z]{2,}$, representing characters from A to Z. This allows eva to look for patterns that are similar to each other.
To avoid entities that overwrites each other, use one RegEx by entity and do not repeat the same pattern in two entities. You can use a pattern entity more than once in a flow. Also, be careful to choose patterns that points to different universes.
Important:
eva blocks the same expression in two different entities, but similar expressions can overwrite each other.
Example:
Check the following Regular Expressions:
.+ - (any character 1 or more times)
\d+ - (any number 1 or more times)
\d{3} - (any number of 3 digits)
The sequence 123456 suits the three different regular expressions, making the three overwrite each other.
Venn diagram showing RegEx overlapping
To learn more about Regular Expressions, check https://www.regular-expressions.info/tutorial.html
Important:
    Entities cannot share names
    Pay attention to value names and their synonyms
    Pay attention not to overlap pattern or synonym entities. As they are treated equally by Clever, they will be chosen randomly.
Different entities with similar values might overwrite each other. The same happens with entities containing similar synonyms for different values. An entity with values too similar to each other (a value to “blue” and another one to “aqua”) will not work properly as the cognitive engine will not know which value to use.
There are some best practices when building Entities:
    When building a Synonym Entity, pay attention to how a user use synonyms to refer to something. Example: “cold tomato soup”, “gazpacho”, “salmorejo” and “gaspacho”.
    Instead of creating multiple Entities referring to similar actions, such as order_pizza and order_soda, create a single intent, such as order, and an entity to refer to these objects, such as “soda” or “pizza”.
    Pay attention to overlapping Entities. Some words can fit in more than one category. “Blue”, for example, can be a color and an emotion.

b) System Entities

Are those feature lists that comes with some NLPs. These entities can only be enabled or disabled.
Clever offers 5 (five) system entities: Cardinal (recognizes quantity), Date (recognizes a specific date), Address, Product (recognizes products, from a spoon to a car) and Language.
Although Clever offers pre-built Entities for numbers, addresses, date, languages and products, if you make a Pattern or Synonym Entity for any of those categories, Clever prioritizes user-created entities over system entities.
This means that if you build yourself any entity that overlaps a system entity (a pattern entity for number or a synonym entity for addresses) and insert both the system entity and the entity you made in a flow, Clever will use the entity you build to interpret a user utterance.
How to use system entities:
1) First, go to the Entities field and select System Entities.
2) Then, click on the pen of the entity you want to enable
3) Click on the button to enable the entity.
4) In the snack message, type "ENABLE" and save.
5) Go to the desired flow and create an Entitiy cell.
6) Between New and List, choose List.
7) The system entity will be in the list.
8) Just click on it and you are done
😉

Using entities from the NLP

Use Entity from the NLP
When you integrate a NLP that is not Clever, the entity database built there is synchronized with eva. This means that you can keep building your flows with entities that you have made in the NLP.
Use NLP Entity
To use a NLP entity, you have to insert its name exactly as it is written in the NLP. If you are using system entities, you can find their correct names in the NLP documentation.
Example: if the entity is saved as @tomato_soup__151451 in the NLP, to use it in eva you have to write it down in the modal (even the double underline and numbers).
On the value field, you can either enter a specific value from the NLP or you can leave it blank to consider all entity values registered. If you want to use a specific value, you have to insert its name exactly as it is written in the NLP.
Example: as with the entities, if the value is saved as “gaspacho”, you will have to write it down in the modal as “gaspacho”, not “gazpacho”.
You can use those entities in your flow, and edit their values, names, description and tags.
Important:
It is not recommended to change an NLP entity name or values because it can affect the synchronization.
After finishing, you have to go back to the NLP and train your flow.
If you are using Luis, check the appendice “Using system entities in Luis”.

Answer

Create an Answer Screen
An Answer is, in its simplest form, a speech from a bot in response to an input from a human.
In Clever, eva’s NLP, is very simple to create an Answer. First, name your answer. Then, you can describe it and add up to 5 (five) tags.
You can also make your answer evaluable. This means the answer will have a thumbs up/thumbs down evaluation, for the user to like/dislike it.
There are some best practices when creating answer:
    Always build answers that works in all channels as fallbacks to channel-specific answers.
    Pay extreme attention to which channel you are building your answer. Not only channels have different specifications but also users behave differently in each channel. A user might be one person in a proprietary chat and another very different person in WhatsApp.
    The templates you choose are part of your bot personality, so pay attention to who your bot is talking to when choosing how you will build your answers.
Important:
    Answers cannot share names
    Deleting an answer is an irreversible action
    Intents and Answers don’t have to be connected directly to function as a flow. If an intent and an answer have the same name, they will be paired
There are 6 (six) types of answer:
a) Simple Answer
b) Not Expected Answer
c) FAQ
d) Dynamic Answer
e) Transactional Answer
f) Answer by Channel
If you are a developer, click here to get more informations

a) Simple Answer

Simple Answer
A simple answer is straightforward. A user asks something and the bot answers based on its knowledge base.
Here is an example of a simple answer.
To create one, just click “Create Answer”, the possible contents for an answer will be explained later on in this chapter.

b) Not Expected Answer

Not Expected Answer
Not expected answers are delivered when the user says something “strange” to the purpose of the bot.
When you are building a flow, Not Expected cells are added automatically by the system on the same level of validation cells.
You cannot add Not Expected Answers by yourself, but you can edit them as regular answers.
By editing your Not Expected Answers, you can guide your User better through the flow. For example, more than just saying something like “I didn’t understand what you said”, the bot can also point options to the User, such as “Please, write ‘menu’, if you want to see the menu”.

Feature Flow Exit

When you create a Not Expected Answer, you can select how many times an answer will be delivered to a user before the flow is terminated for that user.
This feature is available from the version 3.3.0.0
For example, if you choose two times, when a user inserts an unexpected input for the third time, the flows ends.
The counter indicates how many times this response will be delivered. If it is 1 time, the user says something unexpected and the Not Expected Answer will be delivered 1 time. If the user says something unexpected again, the system will leave that flow and will fetch another flow that better matches what the user said.
You can program the counter from 1 to 100 times.
Choose how many times the answer will be delivered

c) FAQ Answer

FAQ Answer: to create one, just give an Intent and an Answer the same name
eva also allows you to build answers that are independent of flows. Those are the Frequently Asked Questions (FAQ) answers.
To build a FAQ answer, just create an Intent and an Answer and give them the same name.
It's a great way to link user questions to specific answers. For example: registering an Intent cell called "Recycling", with utterances such as "How do I discard a package?", etc... And also an Answer cell with the same name, "Recycling". In this Cell, you should write the specific solution/information to the user who wants to recycle a package.
FAQ: notice that Intent and Answers have the same name
Important:
Through FAQs, you do not need to build a simple flow, with an Intent and its Answer. Simply by registering an Answer that has exactly the same name as an Intent, the NLP will automatically identify the user interaction and lead to the correct answer
😎

d) Dynamic Answer

Dynamic Answer
The Dynamic Answer has the ability to personalize the responses. For example, the same bot can greet different users by their names, “Hi, Ana”, “Hi, Andrew”…. In other words, allows the bot to use in the responses all the information that the User had given to eva.
This feature is available from the version 3.3.0.0
To use the Dynamic Answer, you must first have triggered first the Input Cell (click here to read more about the Input Cell). If you mark the button “Remember Input”, the Input Cell collects the information that the user write in the bot through a Variable. You must use the same Variable used in the Input Cell to write the Answer (as shown in the picture above).
Through the Dynamic Answer, you can add variables in eva that can be used in Answers without the need of creating a service to pull up that information. They can be used in Intents, Entities, Text, Session Information, Parameters, Session Code, Code, Open Context (insecure), Visible Context (medium security), Hidden Context (hight security).
If you are not familiar with codes, see the table below and copy-paste the formula to customize your Dynamic Answers:
Predict responses
according to:
Function
Formula
Intents
to use in the response the main Intent of a conversation
$intents[0].name (OBS: this formula stays the same, no matter the Intent's name)
Entities
to use in the response the last Entity used in a conversation
$entities['entity's_name']['0'].value
Text
to use the last user's writing in the response
$text
Information about the bot
to use the name of the bot in the answer
$info.bot
Information about the channel
to use the channel's name in the answer
$info.channelName
Information about the channel type
to use the channel's type in the answer (if it's web, Facebook, Alexa, etc..)
$info.channelType
Session Code
to inform the UUID/GUID in the answer
$sessionCode
Code
to use in the response the Code of the last user's writing
$code
Parameter
to use in the response the parameters' value
$parameters['parameter's_name']
If you are familiar with codes, you can use this tool in the same Answer with different Parameters (click here to learn more about Parameters).
To predict different responses to different Parameters, just write write the programming logic in same the Answer field. (eva uses the codes available in The Apache Velocity Project.)

e) Transactional Answer

Transactional Answer Needs Webhook
Transactional Answer is very useful to provide informations contained in servers outside of eva. For example, a banking bot that report bank balances for each user. That’s why a Transactional Answer depends on external sources.
When you turn on this option, you will have to insert a webhook (an URL, and also an integration agreement between two platforms).
This is an external API called by eva that must be created following the rules in the Development Manual. The Header and Value fields can be left blank or a developer can insert a customized header and value.
After you insert a webhook and click on next, you are taken to a regular answer creation modal, but with the added option to edit the error message that eva delivers automatically.
Sometimes those integrations don’t work and eva delivers an error message to the user automatically. You can edit this message by clicking on “add error message”.
If you are a developer, click here to get more information about tables

f) Answers by Channel

Different channels means different users.
For example, a gif might be adequate to a conversation with a teenager about skateboarding on Facebook messenger, but it might be offensive to a senior citizen that was victim of fraud trying to solve his problem in a bank app chat.
You can create an answer that works in multiple channels.
For each Channel, eva also offer some templates so you can build answers according to the models.
If you want, you can build your answer template and insert as a JSON in the custom option. Its template, aesthetics and functionalities will have to respect all the selected channels rules.

Templates

Templates Dropt
Most templates allow quick answers, buttons that elicit a user response. Some templates allow buttons so you have the option to keep the user in the flow or redirect him to an external URL.
These templates also allows a technical text, a code snippet that you can add to complement an answer.
The technical text is a code that you add to you to program events in a channel. It allows you to insert specific elements to your answer. For example, if you want a calendar so your user can pick a date, you can add it using a JSON.
The standard channel selection is “ALL”. It is the default text template that works on all channels. This answer is delivered if there isn’t a specific channel tied to an answer.
If you assigned a specific channel to an answer, eva will deliver that answer in the channel assigned. If that fails, eva will deliver the generic answer.
The templates you use will depend on the channels you selected for your bot.
While Facebook Messenger allows you to build answers using text, images, audio, video and files, using buttons, quick replies and a host of options, WhatsApp only allows you to use text.
That’s why you will have to study thoroughly the channels you chose to build your answers, even (and specially) with custom templates.
Text Answer Modal

Adding buttons or options to an Answer

The text answer is the standard answer available in the channel ALL. It is the default template and works for all channels (even the ones that doesn’t support templates).
It is a 640 characters text box that can be accompanied options, that works as buttons but are rendered as text.
Just type your answer and, if you wish, add options. You can add as many options as you want, as long they respect the character limit.
To add buttons, options or quick replies to an answer, click on “Add button”, “Add option” or “Add quick reply” below the text box.

Text Answer modal

After you click it a field will appear so you can insert a call to action (the response to the User). Then, a field will appear below so you can insert a value for this button.
This value can be an Intent example, a Synonym Entity value or an expression predicted by a pattern entity.
For example, you can name a button “order tomato soup” and insert “tomatosoup” as a value, and then add an intent with an example named “tomatosoup”. You can also add an entity with “tomatosoup” as a value.
After you insert this value, you will have to add a cell for each button, option or quick reply.
There is a limit of 3 (three) buttons so the card doesn't exceed the chat window height. This limit doesn’t exist for quick replies.
In some templates, if you add buttons, two options will appear to you: direct to URL and continue on flow.
If you click on “direct to URL”, a field will appear so you can insert a URL. When a user click a button, eva will direct him to any URL inserted here (as shown in the image below).
If you click on “Continue on flow”, a field will appear so you can insert a value name (as shown in the image below). This value has to be tied to an Intent or Entity.
Tie to a Button Field

Tie a Button to an Intent

Tie a button to an intent
To tie a button to an Intent, just put the title of your Intent in the value field of the buttons.
With this feature, you will be able to jump directly to any intention, even outside the flow in which the Answer Cell was built.

Tie a Button to an Entity

Tie a button to an Entity
To tie a button to an entity, after you build an answer with buttons, create an entity where each button is a value. Then, add the same entity repeatedly, in the same validation level, but select only one value per button.
Example: for an answer with tomato soup, pea soup and garlic soup as options, you will have to create a synonym entity with values and synonyms for tomato, garlic and pea soup. Then, add the same entity repeatedly in the same validation level, but with different values selected.
Entities tied to a button
Important:
Before an Entity, you must always prepend an Input cell
You can also create a button using a value from a Pattern Entity. To do so, insert in the value field something predicted by the RegEx in the pattern entity that will come later in the flow.
Example: [email protected] for an email pattern entity

Text Answer

There is another text template that appears when you specify a channel. Depending on the chosen channel, you can add buttons by enabling the quick reply option. You can also insert a technical text if the selected channel supports it.

Image Answer

Answer with Image Modal
You can create answers with just images. Just insert the image URL. Supported formats: JPG, PNG, GIF.
You can add buttons by enabling the quick reply option. You can also insert a technical text if the selected channel supports it.
Tip: This feature also works for adding GIF to an answer
Carousel Answer Modal
You can create a sequence of up to 11 cards with an image, title, subtitle and buttons.
This template is very useful if you want to present more than one option to your user. You can show 11 possibilities in one answer. A practical example is a bot that sells tickets to a game. You can show in a single answer various categories of seats. It saves time for you, that doesn’t have to build up to 11 intents, and for the user, that doesn’t have to ask 11 times.
You can add buttons by enabling the quick reply option. You can also insert a technical text, a code snippet that complement an answer.

Audio

Audio Answer Modal
You can create an audio answer. Just insert the audio URL on the required field. Supported formats: MP3, WAV, OGG
You can add buttons by enabling the quick reply option. You can also insert a technical text, a code snippet that complement an answer.

Video

Video Answer Modal
You can create a video answer. Just insert the video URL on the required field. Supported formats: MP4.
You can add buttons by enabling the quick reply option. You can also insert a technical text, a code snippet that complement an answer.

File

File Answer Modal
You can create an answer that is just a downloadable file. Just insert the file URL on the required field. You can name your document.
You can add buttons by enabling the quick reply option. You can also insert a technical text, a code snippet that complement an answer.

Custom Template Answers

Custom Answer Modal
If you have a JSON or XML file, you can create a custom template. It is important that the developers of your channel understand how this custom template is created for them to show other types of answers for the user.
Before adding a custom template, study the channels you are using and check if it is supported.

Service

Service Screen
Sometimes you have to look for information outside your knowledge base. To do so, you use a service cell. When you insert a service cell, you are redirecting users to different points in a flow based on options you have created.
Services are always connected to an external API through a webhook. When you create a service cell, you redirect users based on their position on an external database.
To get more information about:
A good example is sorting users that are registered as clients from users that are not and might be considered prospects.
The First Step of a Service Cell
They are automatically saved in the repository when you create them.
To create a service cell, talk to your development team in advance to define what outcomes you are expecting.
After you click “Create Service”, this modal opens. You have to name it and insert a webhook (an URL that points to an external API following the rules explained in the development manual).
The Header and Value fields can be left blank or a developer can insert a customized header and value.
You can describe it and add up to 5 (five) tags. After that, you can add options. Any created service will be sent to the repository. There, it can be edited or deleted (this actions may have consequences on flows that uses them).
Important:
Services don’t share names
Create Service Modal
After you point where your service cell will look for information, you have to set where your flow will go.
To do so, you have to create options based on what the API will deliver to your bot.
So, after every option, you have to add an answer. They are not buttons, but conditions that have to be met and that allow to disambiguate the flow.
External services might not work. So, eva creates a service error option automatically. As service errors are treated by eva like any other service option, you can add answers after it.
Service Cell with Options and Service Error

Jump

Jump
The jump function allows you to go from the last created cell to any other cell in a flow and continue from there or run a completely different flow in the space of two cells.
It’s very simple: after clicking the Jump icon, choose if you want to jump to a cell in the flow you are editing or if you want to jump to a cell in another flow.
Jump Selection
If you want to jump to a cell in the flow you are editing, just choose the cell you want to jump to.
After you choose the cell you want to jump to, you will have to confirm it.
When you jump, the flow continues on the cells that comes after the destination.
Important:
    You cannot jump to a non-existent cell
    You have to create the cell you want to jump before the jump, not after

Jump to Other Flows

You can also jump to other flows, as long as they are jump and user journey flows. To do so, select “other” in the jump selection.
This feature is available from the version 3.3.0.0
After that, a modal will open so you can select a flow (as shown in the image below). You can select from the last created or look for a flow. When you do this, the whole other flow is executed from the beginning to the end.
A modal will opens, so you can select a flow
Considerations:
    If you jump to a user journey flow, its first cell (an Intent) is ignored. If you need to use it, put it on the origin flow before the jump.
    To check the flow where the jump arrive, click on the “view flow” button over the jump cell (the eye icon). Then, you will be taken to the destination flow (as shown in the image above).
Destination flow
    After the flow ends, it returns by default to the previous flow at the jump point and continues from there.
    If your destination is a jump flow, you can choose to not return to the origin flow by selecting the “end” cell after last cell.

End Cell

End Cell
The End Cell acts as a period. When placing this cell, the bot stops talking at that point. It will only take back the dialogue if the user (the bot’s interlocutor) interacts.
The End Cell is always used in Jump Flows, never in User Journey
“Why?”, you can ask yourself. Simple: because User Flow is a kind of main menu, the guiding thread that takes the user to a series of actions. And these actions are conducted through complementary flows, in other words, the Jump Flows.
A good use case example is applying the End Cell after a Service Error message (as long as it is in a Jump Flow). The End Cell will avoid the user from running a infinit loop in a dialog.

Input

Create Input Modal
The input cell just stops the flow so the user can insert a very specific information that will be interpreted later by an entity.
This information is user-specific and it might be a birth date, a ZIP code or a token, for example.
Important:
In the Input cell, when writing the stored input field, do not use accents, and in compound words, prefer underline ( _ ) to spaces. With this syntax, you will make your work easier when programming in technical cells, such as rule and code (features that will be released soon)
There are 3 (three) templates:

1) Date Template

Here, the user insert a specific date, ex January 3. This template activates a calendar where the user can select a date.

2) Time Template

The user insert a specific time, ex 3:15 pm. This template activates a clock where the user can select a time slot.

3) Custom template

You define, using a specific pattern, the input structure. This is useful for country-specific information, such as id numbers.
Remember Input Switch
The switch “Remember Input” (shown in the image above) will save the information the user inserted for later use in the same session. In other words, this information will be stored for the duration of the interaction between user and bot.
When building a flow, you may need to catch many user data to send to a company and return a response. For example, in a bank account opening flow: you ask name, birth date, ID... Send those information to the institution and then inform the best bank account to the future client.
In cases like this, you should create several Input cells and store all this information throughout the session will be stored (remember to hit the "Remember Input" button). And, very importantly, give different names, call to action, and descriptions to each Input cell.
To make this "bridge" with the company, remember to, at the end, add a Service cell to "take" the saved data to the company.
Important:
    You can use those templates at the web/app/mobile channels
    It's also possible (but not mandatory) to add a call to action describing what information your user have to insert

Code

Code Cell creation
Code Cell works with information available in eva’s system that doesn’t depend on APIs. It also allows creating variables, that's why it provides immense advantages in a bot flow creation process.
Code cells are very useful in various scenarios, for example:
    In an ecommerce, the Code Cell would be responsible for almost the entire process, such as calculating the number of items, calculating the purchase... Only the chosen products availability search and the finalization of the purchase would be in charge of the Service Cell. Below, to insert in a Code Cell, there is an example of code to calculate the value of the purchases in a shopping cart:
1
var total = 0.0;
2
if (visibleContext.shoppingCart != null && visibleContext.shoppingCart.items != null) {
3
for (i in visibleContext.shoppingCart.items)
4
total += i.price;
5
}
Copied!
    You can also create a simple variable:
1
hiddenContext.myvar = 5;
Copied!
    Or validate user login after a service call:
1
hiddenContext.logged = true
Copied!
    In a game, you can simplify a lot the creation of quiz bringing together in a single cell all the questions and answers:
1
hiddenContext.questions = {
2
"1": {
3
"question":"What is the name of the first chatbot ever?",
4
"answer":"ELIZA"
5
},
6
"2": {
7
"question":"When was ELIZA created?",
8
"answer":"1966"
9
}
10
};.
Copied!
Unlike the Service Cell, which connects data from a company via an API, Code Cell performs many activities (such as calculations and validation) without the need for this connection. This gives you the following advantages:
    Manipulate objects
    Anticipate executions and actions
    Perform services without the need for APIs
    Save time
    Reduce services costs

How can you create a Code Cell?

Just insert a code snippet in JavaScript as shown in the image below:
Code cell field
You can use JavaScript’s variables (if you wanna know more about this language, click here) and program any code in it, as long as it’s executable within 100 milliseconds.
The variables below can be used in eva on the Insert code field:
Value
Function
input
information that users write to the bot and fed into eva
opencontext
information that is open to channels to alter its values
visiblecontext
information that is open to channels, but its values cannot be changed
hiddencontext
information that is closed to channels, being visible only to eva and the services called
intents
information registered in eva that means all about what the user wants to get out of the interaction
entities
information registered in eva that means knowledge repositories used by the bot to provide personalized and accurate responses
channelType
channel's type (if it's web, Facebook, Alexa, etc..)
channelName
Channel's name registered in eva
botName
the name of the bot

Rule

Rule Cell creation
The Rule Cell allows you to manage and customize the flows according to the variations of the business rule. It’s a resource to make your dialog more assertive and much more precise, as the bot will respond to any changeable scenario.
In a flow, you will often encounter scenarios where the if-then-else conditionals are applicable. For each possibility, you will predict a Rule Cell, always foregrounding the main rule.
Summarizing, Rule Cell is fundamental in flows that need any kind of rules.
Below, there are some examples of use cases, with respective codes to base the creation of your Rule cells
😉
    If the user informs that is over 18, will be directed by the Rule Cell to a dialog to open his account. Minors will be directed to a dialog informing how to open an account with an adult guardian. In that case, you should write the following code in the Rule Cell:
1
hiddenContext.age < 18
Copied!
    Use different responses according to channels:
1
info.channelName == 'Homepage'
Copied!
    To check if user is logged in:
1
hiddenContext.logged == true
Copied!
    To check if the shopping cart has items:
1
visibleContext.shoppingCart != null &&
2
visibleContext.shoppingCart.items != null &&
3
!visibleContext.shoppingCart.items.isEmpty()
Copied!
    To validate confidence level of intent:
1
intents[0].name == 'MY_INTENT' && intents[0].confidence > 0.8
Copied!
    For single-variable validation:
1
hiddenContext.myvar == 5
Copied!
    If the user wants to create an "escape", a way to execute a flow in which no other scenario fits:
1
true
Copied!
    To disambiguate, as an alternative to the use of entities (although the recommended and simplest way to build flows is, actually, using entities). For example: if you want to differentiate a user who wants to check his bank account balance from another user who wants to check his credit card balance, you can predict two (2) Rules Cells:
1
//First Rule Cell code:
2
if(!intents.isEmpty())
3
intents[0].name =="BANK_BALANCE"
4
else
5
false;
6
7
//Second Rule Cell code:
8
if(intent.isEmpty())
9
intents[0].name =="CREDITCARD_BALANCE"
10
else
11
false;
Copied!

How can you create a Rule Cell?

Rule Cell
In the Rule’s Cell value field you can insert the code snippet in JavaScript’s variables (if you wanna know more about this language, click here) and program any code in it, as long as it’s executable within 100 milliseconds.
The Rule Cell will always be accompanied by a Not Expected Cell, which acts to predict all user interactions outside the guidelines.
The variables below can be used in eva on the Insert code field. Just copy-paste the formula in the table according your scenario:
Predict responses
according to:
Function
Formula
Text
to use the last user's writing in the response
text
Information about the bot
to use the name of the bot in the answer
info.bot
Information about the channel
to use the channel's name in the answer
info.channelName
Information about the channel type
to use the channel's type in the answer (if it's web, Facebook, Alexa, etc..)
info.channelType
Session Code
to inform the UUID/GUID in the answer
sessionCode
Code
to use in the response the Code of the last user's writing
code
Parameter
to use in the response the parameters' value
parameters['parameter's_name']
Open Context
to use in the response the Open Context's value
opencontext.information's_name (See more here)
Visible Context
to use in the response the Visible Context's value
visiblecontext.information's_name (See more here)
Hidden Context
to use in the response the Hidden Context's value
hiddencontext.information's_name (See more here)
Important: the variables within the contexts are created by the user, not by the eva platform

How to test the assertiveness of the Rule Cell?

You can test the assertiveness of the Rule Cell and also predict responses with the last user input by using in the Answer Cell a Dynamic Answer (to get more information about Dynamic Answer, click here )
If you’re not familiar with codes, you can copy paste the following shortcuts and put it in the Answer Cell, as a Dynamic Answer:
Predict responses
according to:
Function
Formula
Intents
to use in the response the main Intent of a conversation
$intents[0].name (OBS: this formula stays the same, no matter the Intent's name)
Entities
to use in the response the main Entity of a conversation
$entities['entity's_name']
Text
to use the last user's writing in the response
$text
Information about the bot
to use the name of the bot in the answer
$info.bot
Information about the channel
to use the channel's name in the answer
$info.channelName
Information about the channel type
to use the channel's type in the answer (if it's web, Facebook, Alexa, etc..)
$info.channelType
Session Code
to inform the UUID/GUID in the answer
$sessionCode
Code
to use in the response the Code of the last user's writing
$code
Parameter
to use in the response the parameters' value
$parameters['parameter's_name']
Open Context
to use in the response the Open Context's value
$opencontext.information's_name (registered in the code cell)
Visible Context
to use in the response the Visible Context's value
$visiblecontext.information's_name (registered in the code cell)
Hidden Context
to use in the response the Hidden Context's value
$hiddencontext.information's_name (registered in the code cell

How to create dialogs

Once you are familiar with the most important features from Dialong Manager, it's very easy to create dialogs and requires just a few steps:
    1.
    You can start a flow with an Intent, a Welcome message or a Not Expected Cell.
    2.
    If you start with an Intent, you can create one or use one from the repository. Always Remember: you need at least 5 Intents registered to start your flow. And also have at least 5 Examples/Utterances registered on each Intent.
    3.
    Flows that doesn’t start with Intents can only be accessed through jumps from other flows.
    4.
    When you move your mouse over the cell, you will see 3 buttons: plus (+), a pen and a trash (as shown in the image below)
A Flow
5. When you click the plus (+) button, a modal opens showing cell types you can add to your flow. You cannot add an intent after other intent. You can, however, insert an Answer, an Entity or a Service.
6. The pen button, allows you to edit that cell.
7. Clicking on the trash button, you will delete that cell.
Important:
    Every flow must end with an answer. If a flow ends with a jump to another flow, the other flow must end with an answer
    After the second intent, comes a second answer and so on

Remove and Reconnect Cells Modal

Removing a Cell
Perhaps during your work of building dialogues, you decide to delete several cells.
You can select each cell that should be removed and click on “Remove” button in Workspace.
    This feature is available from the version 3.3.0.0
    When you click on the “Remove” button, Clever (eva’s NLP) will present a bar to select if you want to remove that selected cell or remove the cell and all its sequence.
If you choose to remove only the selected cells and not their subsequent siblings, the flow will have disconnected cells that you will have to reconnect.
To reconnect those cells, you will have to link them. To see if the link is possible, click on one of the magnets that appear.
Possible links will appear as green magnets. In this case, just click on the two magnets to connect two cells or select a third cell to go on the middle.
Impossible links will appear as red magnets. In this case, you will have insert a cell between them to reconnect the flow.
To reconnect cells, you should:
1) Click on the “add cell” button (plus icon) of the first cell.
Add Cell
2) After that, you can create a cell or choose one from the repository.
Available Endpoints
3) If there is an available endpoint, the linkage will happen automatically.
Reconnected Flow
4) If there is any branch that is not connected, you can link it to an available endpoint or remove it.
Suspended Branch

How to create and manage users

In this chapter, you will learn how to create a new user and manage permissions as admin.
This is where you can control who will access your bots.
Important:
Only admins can access this screen and create, edit or delete users

Creating users

To manage users, click on “settings”, in the menu beside the user avatar, as shown in the following screen:
Select the setting option
Selecting settings will display the following screen, allowing the admin to create, delete and edit user informations and permissions. If you are an admin, this is where you can create new users and set parameters.
User Administration
To create a user, select the option "create user". You will be taken to the next screen, where you will have to insert information such as name, e-mail, company, and role.
User creation
You will have to create a password for the new user. This password can be changed later.
Remember that passwords must have letters, numbers and special characters.
You can insert an image (jpg or png, up to 1 MB) as an avatar. Then, select the access level. Every user has to be assigned to a role.
If you are a developer and need more information about tables, click here

Types of Roles

There are two (2) types of roles:
Role
Permissions
Admin
Access to all eva resources
Can grant other people access to eva, manage roles and permissions
Editor
Access to all eva resources, except for the following: Create, edit and delete users and bots.
There are no limits on how many bots any given user can access. As an admin, you have access to all bots.

Parameters

Parameter creation
If you have to change eva’s behavior, you can create new system parameters. A Parameter is a value that is added to configure software behavior. Here, a developer can insert any value to change how eva behaves.
To create a Parameter, first click on the “create parameter” button. Then, a card will appear. Insert the parameter key, value, and a description, if that's the case. Click “save”. You can enable and disable any parameter later.
In the Parameter tab, you can also set the minimum confidence score for the NLP and Automated Learning.
Minimum confidence score
In a NLP, this is a minimum level of certainty that an intent corresponds to what a user is saying. In the Automated Learning, it is the minimum level of certainty that the answer being delivered corresponds to what the user is asking. If the confidence score is below the value set, a not expected answer will be delivered. You can set the value by moving the bar.
If you want to manage the Parameter, click on “settings”, in the menu beside the user avatar, as shown in the following screen.
Selecting settings will display a screen, allowing the admin to create, delete and edit user information and permissions. If you are an admin, there is where you can create new Parameters (by the way, it’s the same screen where you can create new users).

Training

Training Screen
After building a flow, you have to make sure that they are connected to the right answers.
To do so, you train your Intents and Entities.
The training is the same process that a person goes through when learning a language. It ties sentences to meanings.
For more informations, please check the chapter How to test a bot

How to integrate others' NLPs