# Create your first conversational flow!

### **Your first conversation flow** <a href="#cfz1szmv6jwe" id="cfz1szmv6jwe"></a>

Here's a quick breakdown of Studio. Once you open the production canvas you will be greeted with the ToolBar and the Canvas:-

**The ToolBar**

On the left side of your canvas you will be able to see the ToolBar which contains everything you need to access, build and run your agent.

![](https://3877181490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_81A0PNZfdawu_TPAO%2Fuploads%2FR288XmjPMmEtPdsHKYBc%2FHTTPTOOLBAR.gif?alt=media\&token=944d3772-928f-44e9-8225-09c555248991)

In the center of the canvas, you will notice a node labeled **START**.

![](https://3877181490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_81A0PNZfdawu_TPAO%2Fuploads%2FrdaWbuuiWolR1lmdZO1x%2F1?alt=media)

This is the starting point of the conversational flow. This node has to be attached to the rest of the conversational flow.

{% hint style="warning" %}
***Note:** Without having the **START** node connected to the rest of the conversation, the virtual agent cannot be used and will not execute your flow!*
{% endhint %}

To start building, simply drag and drop the nodes from the ToolBar to the middle of the studio.

{% hint style="info" %}
***Tip:** You can rename nodes by clicking on the default name of the node!*
{% endhint %}

### **Step 1: Create a Greeting Message** <a href="#nsfet2fr3mkp" id="nsfet2fr3mkp"></a>

For your first agent, once you've figured out an easy use case, start by adding a greeting statement to introduce your virtual agent and what it can do.

To do this you need to add a **Send Message** node.

![](https://3877181490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_81A0PNZfdawu_TPAO%2Fuploads%2FAjv4KOMsv37luuiHqMPc%2F2?alt=media)

{% hint style="warning" %}
***Note:** Make sure you connect all the nodes in your flow in the right order. The arrows indicate the direction of the flow, therefore, make sure the arrows are attached to the boxes correctly.*
{% endhint %}

{% hint style="info" %}
***Tip:** You can add a node by dragging and dropping from the toolbar or right clicking and selecting add a node.*
{% endhint %}

### **Step 2: Gather Input from your user** <a href="#ewlncwjrh8yt" id="ewlncwjrh8yt"></a>

At this stage, you’ll want to collect the intention of your user. To do this you need to add the **Collect Input** node.

First, you’ll need to include a [*<mark style="color:purple;">Parameter</mark>*](https://studio.docs.ai.vonage.com/properties-1/parameters) under which the input will be collected. Each *Parameter* needs to be attached to an [*<mark style="color:purple;">Entity</mark>*](https://studio.docs.ai.vonage.com/properties-1/entities). The *Entities* entail the various kinds of input your user will provide.

There are different entity types for example “sys.names” - to capture human names, “sys.phone numbers'' - to capture the phone number with country code and “sys.any” - which captures any kind of input from words, digits to serial numbers.

You can choose a pre-loaded system *Entity* or create your own. In this case we created a custom Entity to capture the various ways a user can state pizza size.

To create a custom entity we need to set a value or category and attach its synonyms. You can also add an audio recording to each value.

![](https://3877181490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_81A0PNZfdawu_TPAO%2Fuploads%2FyHEN9J8TR7rAhPONEZ0y%2FCustomEntityGIF.gif?alt=media\&token=4bdc3886-ba24-4e43-b68a-bce09995e525)

{% hint style="success" %}
***Bonus Tip:** If you need to create a custom Entity, we recommend you go to Entities first, create your custom entity and then add the collect input node.*
{% endhint %}

If you don't need to create a custom *Entity* you can go straight to the **Collect Input** node, create a *Parameter* and choose a system *Entity* for it.

![](https://3877181490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_81A0PNZfdawu_TPAO%2Fuploads%2FE3RyFH6K5Db3OyQZzpoU%2F4?alt=media)

You can then create prompts for the user with a question to answer here.

![](https://3877181490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_81A0PNZfdawu_TPAO%2Fuploads%2Fqh9ImGAz1uBW2ZzlSlxi%2FCollectinputnewpromptGIF.gif?alt=media\&token=e19ff351-0127-4e52-9262-5f95da8f708d)

{% hint style="warning" %}
***Note:** We recommend that you name your Parameters in capital letters separated by an underscore.*
{% endhint %}

{% hint style="info" %}
***Tip:** You can access the* [*<mark style="color:purple;">system entities list</mark>*](https://studio.docs.ai.vonage.com/entities/system-entities) *to see what's included.*
{% endhint %}

### **Step 3: Understand your user**

To now give your user an adequate answer, you need to match their input to the correct place within the flow and knowledge base that you have created.

After **Collect Input**, there are various follow-up options. You can either use the **Classification** or the **Conditions** node to classify the user input depending on your use case.

The node that we are going to choose for this flow is called **Conditions**. In this case we want to be able to differentiate between the different ways that the user can state the same intention.

Using the **Conditions** node we are able to create an environment that relies on strict rules that need to be adhered to in order to move on.

When we created the custom entity, we defined the synonyms under each value. This helps us create the conditions by setting the collected *Parameter*, choosing *Operation* (the relationship to the value) and finally choosing the *Value*.

![](https://3877181490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_81A0PNZfdawu_TPAO%2Fuploads%2F2lAxM8ygLfVxJhK2jDLa%2FConditionsGIF.gif?alt=media\&token=fde5903f-9164-4f2a-a222-09399d1fa886)

{% hint style="warning" %}
***Note:** Be sure to use the right Parameter which you used to collect input, choose the function or operation and appropriate value.*
{% endhint %}

### **Step 4: Decide the rest of the flow!** <a href="#ex9xt3xkdaho" id="ex9xt3xkdaho"></a>

The rest of the flow depends on the Use Case you are trying to create.

![](https://3877181490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_81A0PNZfdawu_TPAO%2Fuploads%2FBbFDX8XlJx2Ng1jJpjwt%2FSendSMSHTTP.gif?alt=media\&token=22d272ce-cfac-4f84-a739-dae6442da7ff)

Make sure to connect all the nodes in order and have a plan for fallbacks.

When we refer to fallbacks we mean cases where there are:-

* No Inputs - No input from the users end
* Missed Inputs - Perhaps your user said something that the agent wasn't able to catch?
* Invalid Entries - Cases where the wrong kind of input was provided by the user, eg. the user provides a name instead of a phone number.

For each of these, we recommend completing the happy path (i.e ideal flow) of the agent first and then deciding the best course of action for the unfavourable entries or lack thereof.

### **Step 5: TEST TEST TEST!** <a href="#unfszr43ro1l" id="unfszr43ro1l"></a>

Once you finish building your agent, be sure to test the flow using the inbuilt tester!

You can pre-fill Parameters you want to the agent to work with (by clicking on the settings icon) and also choose the mode of testing.

![](https://3877181490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_81A0PNZfdawu_TPAO%2Fuploads%2FsZfcWHPy9dBTsmFXr7lC%2FTESTGIF.gif?alt=media\&token=1bed5097-cc0b-4f1c-9509-e28600b15fe7)

Make sure you publish your agent in order to be able to use it outside the testing environment as well!

### **Step: Fin!**

This was an example of a bare bones agent. There's lots more you can accomplish with Studio!

If you need more information on the features available, the Studio Documentation dives deep into how to build a stellar agent. You can access it by clicking on the information symbol in any open node drawer.

In case you think you're stuck or want more information than what's listed in the documentation, we are also available on [<mark style="color:blue;">ai.studio.support@vonage.com</mark>](mailto:ai.support@vonage.com)

Godspeed!!
