1 - System Overview
Asternic Scripter lets you build web based interactive decision trees, surveys, dynamic forms or tutorials.
Not only can you embed them in Asterisk based applications like FOP2, Issabel Call Center CE, but also in any kind of web based application that allows you to open or link to external URLs.
Data collected can be saved to any datastore that has a RESTFul API, and dynamic data can be gathered from remote web based tools that offer web based APIs.
In this first tutorial we will see how to create a simple interactive decision tree for a technical support contact center
2 - Create a new script
To create a new script, log into the Panel Manager and select the Scripter menu in the toolbar. You will be presented with the scripts page. Just click the Add button as shown on the following image:
You will be able to fill the basic script details, like name, description, template and transition effect. There are three templates types: buttons, panels and tutorial. the kind of template to use between panels, buttons and tutorial, and the transition effect:
The "tutorial" template is the one used to create this very tutorial you are reading. It is the simplest form of content as it does not have split decision trees, data entry fields or anything like it. Its main purpose is to generate step by step knowledgebase articles, tutorials or guides that are simple to read and visually appealing.
On the other hand, "panels" and "buttons" will use the software full potential and dynamic nature. Each node on a script can branch to different nodes based on the Answer provided. Similar to the "Choose your own adventure" book series.
The only difference between "buttons" and "panels" is the way that answers/decisions are shown: as a set of buttons or as a vertical list of options.
This is how the buttons template looks when presenting a question and answers:
And the same question/answers look like this when selecting the panels template:
In general, if you have multiple possible answers, it is more comfortable to use the "panels" view, and if you have mostly yes/no answers, or a limited number of them, buttons might be simpler to use as they can also be styled with colors, as we will see later on.
For this example we will use the buttons template.
So go ahead, and fill the form details and click the "Save" button to create the new script.
3 - Nodes: an overview
Once you created a script, it is time to fill it with actual content. Go ahead and click the "Edit Nodes" button next to the script yo have just created:
You will be presented with the Node editing grid, where the main content work is going to be made. In this grid you have also a top toolbar with action buttons to Add/Delete. Click the Add button to create the starting node on your script.
Nodes are the building blocks of any script/tree. A script will have many nodes, starting from the root and branching through leaves until it finishes. In the way to the end, you can have input forms, API calls, logic jumps, etc. Here is the main editing page:
As you can see, the node form is split in two main sections:
The Top section is for entering the node main/static information.
Node Type
There are many node types, here is a brief description of them:
Question | This is a "branching" node, where you have to ask a question and provide one of many possible answers to it. Any time you have to take a decision, you will generally use the Question type node. The question text will be shown in a prominent way on the script to guide the agent over. |
Solution | When you arrive to a solution after answering some questions, you will probably want to use a Solution node. This node has content, but no question and no answers to select from. Think kind of node is used when you reach an end to your script/tree, and you will be able to know the end result for the script (as success or failure), as a metric you can use for reporting. |
Logic Jump | When navigating the script, you can use data entry forms to gather information, or keep track of a score depending on the answers selected on your script. When you need to branch based on those variables (data entry variables or score variables), you can use a Logic Jump node. So you can branch to different nodes based on dynamic calculated values and not on a particular answer given. |
Go to Script | This node lets you jump to a different script on your system. You might have a complex contact center, and have many departments and situations to handle. In this case, it might be simpler to have smaller and simpler scripts than a super mamut type of script. They will be simpler to maintain and edit. You can have a master script organizing all your smaller scripts and jump from one to another when needed. |
Redirect to Web Page | As the name implies, it will redirect the agent/user to the specified URL. You can select to open the page on a new tab or inside the script page. |
Document | This kind of node is similar to a Solution node in the sense that is usually a finishing node, but with an important difference. It will let you merge different nodes into one big node, based on conditional logic. So you can show on one slide the content of different nodes, presented all together, and selecting which ones to display upon conditional variables. |
Title
This is the title or name for the node. It will show on your main editing node window and also in the script display as a heading.
Content
All nodes can optionally have content, You can write anything you like in here with a nice builtin html editor. You can have text, images, linked videos, source code, etc. For an agent script, you might want to write the introductory script or text to guide the agent. Content can also include variables that can be gatehered from external applications.
Question
In question type nodes, you have to enter the actual question that will be shown as the most important element on the script slide, just before the list of possible answers.
Node Result
For reporting purposes you might want to know how a script interaction went, if it arrived to a successful resolution or not. You can mark the result for a node here. Whenever in a script interaction a result different than unknown is found, it will signal that interaction accordintly so you can later gather metrics about script resolutions.
Notes
A quick field to add any kind of note. This won't be presented to the agent, is mostly as a note for the script editor.
The bottom section as a series of Tabs that let you enter dynamic options.
Answers
A list of possible answers to the node question. You can have as many as you like. It could be a Yes and No answers, or any other kind of answer that will branch to a different node.
Data Entry
You can use the scripter to gather information for that interaction. You do so by using form fields. You can add many form fields to any node. Fields can also be filled with variable data retrieved from the application that call the script. For example you can have a dialer that makes an outbound connection and has variables set like contact name, debt amount, etc. Fields can be prefilled with that information. Also there are web hook fields that let you search for remote data using RESTFul api web hooks, like looking up for a customer number and then filling all the contact important information into other fields for later use.
Web Hook
If you want to save the gathered node information at some point, you can do so by using webhooks. Any node can call one or more RESTFul services passing their data. So having any kind of datastore that is web accessible can be used to receive the node information and save it to it. There is also a templating library for common APIs or you can write your own.
4 - Our first node
Basic Node Info
Lets start by creating a really simple inbound technical support script.
Our first node will be the root one, so we will name it "Welcome" and use the content to write a simple script to guide the agent.
As this is a branching or starting node, we will select the Question type as we need to branch to other nodes based on different answers.
Notice that in the content area there is a special entry between curly braces: {agent_name}. That is a variable. Variables will be substituted by actual content whenever the script is presented to the agent. You can pass variables on the script via GET request (if you are popping up the script from an external tool with configurable external URL's, like Issabel's Call Center module). Asternic dialer will also pass variables as configured in their campaigns. You can also retrieve variables using webhook fields, something that we will explore in another tutorial.
Notice also that we have our main question. This is a support department for a speaker company, so we will ask if the customer hears any sound.
Adding Answers
After entering the basic node information, it is time to add possible answers. Look at the bottom tab section and press the "Add Answer" button:
You will see a new answer line with some input forms will shown on the answer list. Go ahead and click the "Add Answer" button again as we will add two possible answers: "Yes" and "No":
After filling the answer text on each, you need to link that answer to another node. For that you will click on the Link select box. As this is a totally new script, there are no nodes yet created, so we are given the option to quickly create a new node:
So, on the Yes answer select the only option we have to create that new node, and a popup will appear when we can enter the new node details:
As the customer hears sound, we will use this node to ask for a little bit more information about the issue: Is the sound distorted?
After completing the information, click the "Add Node" button to create that new node.
Do the same on the No answer, but this time we should check basic things first, maybe the speaker is not plugged in!
Once we are done adding the two answers and quickly creating the branch nodes for each answer, we can Save our first node by clicking the corresponding button at the very bottom: