Answer Cells

Description of how to use answer cells to respond to virtual assistant users.

An Answer is, in its simplest form, a speech from a virtual agent in response to an input from a human.

With eva NLP, it is very simple to create an Answer. First thing, you have to name it. 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 virtual agent personality, so pay attention to who your virtual agent 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 intent and an answer have the same name, they will be paired

There are 7 types of answers:

  • Simple Answer

  • Not Expected Answer

  • FAQ

  • Dynamic Answer

  • Transactional Answer

  • Variable Answers

  • Answer by Channel

If you are a developer, access this page for more information.

Simple Answer

Simple Answer

A simple answer is straightforward. A user asks something and the virtual agent answers based on its knowledge base.

To create one, just click “Create Answer”, the possible contents for an answer will be explained later on in this chapter.

Not Expected Answer

Not Expected Answer

Not expected answers are delivered when the user says something “strange” to the purpose of the virtual agent.

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 virtual agent 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

FAQ Answer

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.

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. 😎

Dynamic Answer

Dynamic Answer

The Dynamic Answer has the ability to custom the responses. For example, the same virtual agent can greet different users by their names, “Hi, Ana”, “Hi, Andrew”. In other words, it allows the virtual agent to use in the responses all the information that the user had given to eva.

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 virtual agent 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 virtual agent (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).

Transactional Answer

Transactional Answer is very useful to provide informations contained in servers outside of eva. For example, a banking virtual agent 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, access this page for more information about tables

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

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 virtual agent.

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.

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 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.

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 virtual agent 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

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.

Last updated