# Answer

## About Answer Cell

This is where the virtual agent's voice and personality will be displayed. An answer cell is the virtual agent reaction to a query.&#x20;

You can also make your answer evaluable, which means your answer will appear with a thumbs up, thumbs down evaluation for users so they like or dislike the product or service.

To create a Answer cell, go to the Answer repository and click on “Create Answer”. **The possibilities and answer templates for each channel will be explained later on.**

![Create an Answer Screen](https://content.gitbook.com/content/n6zS4HeuuVpRHZEvDiFU/blobs/19yZH6Y2CNUmUNyUKAHI/1%20create%20an%20answer%20cell.png)

There are some **good practices** when creating an answer:

* Build answers that works in all channels as fallbacks to channel-specific answers.
* Always double-check to which channel you are creating your answer to. Not only channels have different specifications but also users behave differently in each channel.&#x20;

{% hint style="info" %}
Answer Cells are compatible with the [Dynamic Content](#d-dynamic-answer) feature, and may use them to dynamically customize content.
{% endhint %}

## **Types of answers:**

* [Not Expected Answer](#b-not-expected-answer)
* [FAQ](#c-faq-answer)
* [Dynamic Answer](#d-dynamic-answer)
* Transactional Answer
* [Variable Answers](https://docs.conversational-ai.syntphony.com/user-guide/build-dialogs/dialog-cells/rule/variable-answers-using-code-and-rule-cells)
* Answer by Channel

{% hint style="info" %}
If you are a developer, [access this page](https://docs.eva.bot/user-guide/for-technicians/api-guidelines/creating-channels-the-conversation-api#likable-service) for more information.
{% endhint %}

### Not Expected Answer <a href="#b-not-expected-answer" id="b-not-expected-answer"></a>

![Not Expected Answer](https://content.gitbook.com/content/n6zS4HeuuVpRHZEvDiFU/blobs/w8BhThOYM8CpQl3E6lJO/3%20not%20expected%20answer.png)

Not expected answers are fallback answers delivered when the virtual agent doesn’t understand the user’s question. They are added automatically when the a interaction is demanded to handle content that are not part of your virtual agent's knowledge base.&#x20;

You can add a counter for how many times the response will be delivered abd edit their content like regular Answer cells.

By editing your Not Expected answers, you can better guide users through the flow. For example, instead of just saying “Sorry, I don’t understand what you're saying”, the virtual agent can offer options, such as “Please, write ‘menu’, if you want to see the menu” or use buttons leading them to the options of said virtual agent.

#### **Drop-off Points** <a href="#feature-flow-exit" id="feature-flow-exit"></a>

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.

For example, if you want it to be delivered twice and the user inserts an unexpected input for a third time, the flow ends.

The counter indicates how many times this answer will be delivered. If it marks 1x (one time), when the user says something unexpected, the Not Expected answer will be delivered one time only. If the user says something unexpected again, the system will end that flow and search another flow that better matches what the user is saying.

&#x20;You can program the counter from 1 up to 100 times.

#### Jump from Not Expected answer

​Before delivering a Not Expected answer (as they are added automatically by the system), you can set your virtual agent to deliver other options even if the input is still not predicted in the knowledge base.

For example: in a Help Desk virtual agent, imagine you have built a flow to help users solve problems with the email provider. After they followed the conversation to open a ticket, you finally ask them: “Has your issue been resolved after doing these steps?” with two possible answers to disambiguate using [entities](https://docs.conversational-ai.syntphony.com/user-guide/build-dialogs/dialog-cells/entity): *yes* or *no*.

<figure><img src="https://content.gitbook.com/content/n6zS4HeuuVpRHZEvDiFU/blobs/tRmADuOiCkziABEt3H9a/image.png" alt="" width="563"><figcaption></figcaption></figure>

But the user might give an answer different from the two options available, like “I’m not sure” or "I don't know\...". If you don’t want the Not Expected answer to be delivered just yet and want to offer a third option as an alternative flow instead (directing them to an Advanced Support flow, for example), follow these steps:

1. Hover the Input cell to see the plus icon “+” to **add cell**
2. Click the **sibling** option
3. Go to the second tab for **Advanced** cells and click **Rule**
4. Insert in the value field the condition “**true**”, validate the code and click save.

You can now continue your dialogue and create a whole new sequence after the newly added Rule cell, or simply add a [Jump cell](https://docs.conversational-ai.syntphony.com/user-guide/build-dialogs/dialog-cells/jump) to another flow.&#x20;

Using the Help Desk example, you would just have to add a Jump cell leading to the Advanced Support flow:

<figure><img src="https://content.gitbook.com/content/n6zS4HeuuVpRHZEvDiFU/blobs/vXFSzUUHAZMiMBP67IXX/ezgif.com-gif-maker%20(6).gif" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
**Important:** **The order of the cells matters when it comes to validating what Syntphony CAI delivers first.** If the Rule cell with the "true" condition is placed above other Rule cell, this second cell will never be delivered, because the first cell is always "true". In this case, you must reverse the order in which you add the Rule cells.
{% endhint %}

Learn more about [Rule cells](https://docs.conversational-ai.syntphony.com/user-guide/build-dialogs/dialog-cells/rule)

## **FAQ Answer** <a href="#c-faq-answer" id="c-faq-answer"></a>

Syntphony CAI also allows you to build answers that are independent of flows: the Frequently Asked Questions (FAQ) answers.

To build a FAQ-flow, just create an Intent and an Answer and give them the same name.

{% hint style="info" %}
**Important:**

* Intents and Answers don’t have to be connected directly to make your flow work.&#x20;
* If an intents and an answer cell have the same name, they will be paired.
  {% endhint %}

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](https://content.gitbook.com/content/n6zS4HeuuVpRHZEvDiFU/blobs/GOV0wexeOWYvRXZIWQEP/6%20faq%20notice%20that%20intent%20and%20answer%20have%20the%20same%20name.png)

{% hint style="warning" %}
**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. :sunglasses:&#x20;
{% endhint %}

## **Dynamic Answer** <a href="#d-dynamic-answer" id="d-dynamic-answer"></a>

Answer Cells can use [Dynamic Content and contexts](https://docs.conversational-ai.syntphony.com/user-guide/build-dialogs/dynamic-content-and-contexts). You can use this feature to customize your answers with data pertained yo your each individual conversation. For instance, the same virtual agent can greet different users by their names, “Hi, Ana”, “Hi, Andrew”, based on previously acquired data, rather than greeting them with a static "Hi, user" prompt.

Refer to this feature's page for an in-detail explanation.

## **Transactional Answer** <a href="#e-transactional-answer" id="e-transactional-answer"></a>

![Transactional Answer Needs Webhook](https://content.gitbook.com/content/n6zS4HeuuVpRHZEvDiFU/blobs/Ko48MH65ZAxltoX5mXaD/8%20transactional%20answer%20needs%20webhook.png)

A Transactional Answer acts as a **communication tool that interacts with external systems** to perform a specific action. It is very useful to provide information that are in servers outside Syntphony CAI.&#x20;

For example, a virtual agent for a Bank delivers each user information about their balance. Syntphony CAI doesn't have access to it, hence a Transactional Answer is needed to seek and deliver the information that are in external sources.

To use this option, insert a [webhook ](https://docs.conversational-ai.syntphony.com/user-guide/api-docs/api-guidelines/webhooks)(an URL that connects two applications). This is an external API called by Syntphony CAI that must be created following the rules in the "For Technicians" manual. The Header and Value fields can be left blank or a developer can insert a customized header and value.

After you have inserted the webhook, click "next" to view the regular answer creation modal, but with the added option to edit the error message that Syntphony CAI delivers automatically.

Sometimes those integrations don’t work and Syntphony CAI delivers a fallback message to the user automatically. You can edit this message by clicking on “add error message”.

{% hint style="info" %}
If you are a developer, [access this page](https://docs.eva.bot/user-guide/for-technicians/api-guidelines/webhooks) for more information about tables
{% endhint %}

## **Answers by Channel**

Different channels mean different users. A gif might be appropriate in a conversation with young people on Facebook, but it can be rude to an adult victim of fraud trying to solve this problem in a bank app chat.

You can create answers that work for multiple channels. **For each channel, Syntphony CAI also offers templates so you can build answers according to the models**. You can build your answer template and insert as a JSON in the custom option. Its template, aesthetics and functionalities will have to follow all the rules of the selected channel.

### **Templates** <a href="#templates" id="templates"></a>

**Most templates allow quick answers**, buttons that trigger 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.

![](https://content.gitbook.com/content/n6zS4HeuuVpRHZEvDiFU/blobs/VJqduFXb45ZMMxfHXApF/ezgif.com-gif-maker%20\(2\).gif)

These templates also allow technical text, a code snippet that you can add to complement the answer with specific elements. If you want to insert a calendar, for example, so your user can pick a date, you can use JSON.

The standard channel selection is “ALL”. It's the default text template that works on all channels. This answer is delivered when there isn’t a specific channel tied to an answer.

If you assigned a specific channel to an answer, Syntphony CAI will deliver that answer in the channel assigned. If that fails, Syntphony CAI will deliver a generic answer.

{% hint style="warning" %}
**Important:** Depending on the channel, some templates won't be available. While Facebook Messenger allows you to use text, images, audio, video, and files, and to add buttons, quick replies, etc., WhatsApp only allows text.&#x20;
{% endhint %}

It is a good practice to carefully study the channels you are running your virtual agent on when building answers, even (and especially) with custom models.

**Adding buttons 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).

![](https://content.gitbook.com/content/n6zS4HeuuVpRHZEvDiFU/blobs/kTlksEZNQZ2GFr7YE0jl/image.png)

Type an answer and add options, if you want. You can add as many options as you need, as long as they follow the maximum character limit.

To add buttons, options or quick replies to an answer, click on “Add button” or “Add quick reply” below the text box.

**Text Answer modal**

When you click on the text box, you'll see two fields: one to insert a call to action for the button and another field to 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 the value, add a cell for each button, option or quick reply.

In some templates, if you add buttons, two options will appear to you: direct to URL and continue on flow.

If you click “Continue on flow”, there will be a field to insert a value. This value has to be tied to an Intent or Entity (image on the left). If you click “Direct to URL”, there will be a field to paste a URL. When users click on a button, Syntphony CAI will direct them to the URL inserted here (image on the right).

![](https://content.gitbook.com/content/n6zS4HeuuVpRHZEvDiFU/blobs/Hkumslkre2RvV0C23ZhK/image.png)

{% hint style="info" %}
There is a limit of three buttons so the card doesn't exceed the chat window height. This limit doesn’t exist for quick replies.
{% endhint %}

**Tie a Button to an Intent**

![Tie a button to an intent](https://content.gitbook.com/content/n6zS4HeuuVpRHZEvDiFU/blobs/9IUCPxiAZTQVYel8PQ3h/12%20tie%20a%20button%20to%20an%20intent.png)

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](https://content.gitbook.com/content/n6zS4HeuuVpRHZEvDiFU/blobs/d3eXzHIzZ2Ry272WvN0S/13%20tie%20a%20button%20to%20an%20entity.png)

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](https://content.gitbook.com/content/n6zS4HeuuVpRHZEvDiFU/blobs/cKpXlgpc12Fimu1bNYsy/14%20entities%20tied%20to%20a%20button.png)

{% hint style="warning" %}
**Important:**

**Before an Entity, you must always precede an** [**Input cell**](https://docs.eva.bot/user-guide/using-eva/develop-your-bot/dialog-cells/input-cells)
{% endhint %}

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\]](https://docs.eva.bot/cdn-cgi/l/email-protection#5934382b323a362b2b303e3837192a362c29293835383a3c773a3634) for an email pattern entity

### **Text Answer** <a href="#text-answer" id="text-answer"></a>

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** <a href="#image-answer" id="image-answer"></a>

![Answer with Image Modal](https://content.gitbook.com/content/n6zS4HeuuVpRHZEvDiFU/blobs/PdehdYzrhEa88AHnFGH6/15%20answers%20with%20image%20modal.png)

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.

{% hint style="info" %}
**Tip: This feature also works for adding GIF to an answer**
{% endhint %}

### **Carousel** <a href="#carousel" id="carousel"></a>

![Carousel Answer Modal](https://content.gitbook.com/content/n6zS4HeuuVpRHZEvDiFU/blobs/WF9ZfMO85DaKoOF5nO1S/16%20carousel%20answer%20modal.png)

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** <a href="#audio" id="audio"></a>

You can also use audios in the answers. Insert a URL on the requested field. The supported formats are: MP3, WAV, OGG.

It's posible to add buttons by enabling the quick reply option. You can also insert a technical text, a code snippet that complement an answer.

### **Video**  <a href="#video" id="video"></a>

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** <a href="#file" id="file"></a>

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.

### Phone templates <a href="#custom-template-answers" id="custom-template-answers"></a>

In telephony, Syntphony CAI offers three answer templates: text, audio, custom.

These three templates will have a particular difference from the other channels: they don't have quick reply and buttons.

{% hint style="success" %}
Learn how to build a [voice agent](https://docs.conversational-ai.syntphony.com/user-guide/build-dialogs/dialog-cells/broken-reference) in Syntphony CAI
{% endhint %}

When selecting the text option, the template shows the "Option" field for disambiguation. The written content inserted here will be converted into speech (text-to-speech) in the languages supported by the NLP you're using. [See list of languages](https://docs.eva.bot/user-guide/using-eva/develop-your-bot/build-your-first-bot#configure-the-nlp-engine-and-the-language).

When selecting the audio option, you’ll see the fields “Audio URL” and “Add technical text”, as in other channels with the audio template.

Supported formats: MP3, WAV, OGG, FLAC.

### **Custom Template Answers**&#x20;

![Custom Answer Modal](https://content.gitbook.com/content/n6zS4HeuuVpRHZEvDiFU/blobs/UQ1LxneysStRiPBKASek/22%20custom%20answer%20modal.png)

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.
