Create your first conversational flow!
This tutorial shows how to create a simple but effective telephony agent on the studio.
Last updated
This tutorial shows how to create a simple but effective telephony agent on the studio.
Last updated
Here's a quick breakdown of Studio. Once you open the production canvas you will be greeted with the ToolBar and the Canvas:-
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.
In the center of the canvas, you will notice a node labeled START.
This is the starting point of the conversational flow. This node has to be attached to the rest of the conversational flow.
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!
To start building, simply drag and drop the nodes from the ToolBar to the middle of the studio.
Tip: You can rename nodes by clicking on the default name of the node!
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 Speak node.
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.
Tip: You can add a node by dragging and dropping from the toolbar or right clicking and selecting add a node.
At this stage, you’ll want to collect the reason your caller is calling in. To do this you need to add the Collect Input node.
First, you’ll need to include a Parameter under which the input will be collected. Each Parameter needs to be attached to an Entity. The Entities entail the various kinds of input your caller will provide.
There are different entity types for example “sys.names” - to capture proper names, “sys.phone numbers” - to capture the phone number with country code and “sys.any” - which captures any kind of input from words, to digits and serial numbers.
You can choose a pre-loaded system Entity or create your own. In this case we used “sys.any” which can collect any type of input.
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.
You can then create prompts for the caller with a question to answer here. If you add multiple prompts like we did here, the agent will randomly choose from them every time it passes by the node.
Note: We recommend that you name your Parameters in capital letters separated by an underscore.
Tip: You can access the system entities list to see which values are included. You can also include several prompts for the agent to choose from in case you want to use multiple prompts.
To now give your caller 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 caller input depending on your use case.
The node that we are going to choose for this flow is called Classification. In this case we want to be able to differentiate between our desired caller intent.
By using the Classification node to categorize the different ways your caller can imply the same intent, the agent building process becomes more efficient.
To be able to use this node we will first have to create the different Intents our callers might be calling in for.
Under each specific Intent, we need to provide training phrases, i.e different ways a caller can ask for the same topic.
We can then add the Classification node to classify between the created Intents.
Note: Be sure to use the right Parameter which you used to collect input, choose the function or operation and appropriate value.
The rest of the flow depends on the Use Case you are trying to create.
Make sure to connect all the nodes in order, end your conversation with the End Call node and have a plan for fallbacks.
When we refer to fallbacks we mean cases where there are:-
No Inputs - Silence from the callers end
Missed Inputs - Perhaps your caller said something that the agent wasn't able to catch?
Invalid Entries - Cases where the wrong kind of input was provided by the caller, eg. the caller provides a name instead of a phone number.
Routing - Cases where you are sure you want the agent to route a call, eg. when the caller specifically asks for an operator.
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.
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.
Make sure you publish your agent with a phone number in order to be able to receive and make calls.
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.
Here's a video on how we built a quick agent for this channel:-
In case you think you're stuck or want more information than what's listed in the documentation, we are also available on support@aistudio.vonage.com
Godspeed!!