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 tutorial we will see how to create a simple form survey and saving the data into the builtin datastore.
2 - Creating a new script
Creating forms is simple: whenever you create a node, you have a "Data Entry" tab where you can add form fields to that particular node.
All of the data entry fields will be listed at the end of the node content, and before the question or answers it might have defined.
For this tutorial we will create a new script, with a "Satisfaction Survey" name.
Once filled, click Save
3 - Adding the data entry node
Once you create your script, you will be back to the scripts view:
We need to add our content. Click the Edit Nodes button to start doing it.
As this is a new script, our node list will be empty:
Go ahead and click the Add button to create our first node.
We will use the name "Satisfaction Survey" and leave it as type Question because we want to have a second step on the survey. Having a question node let us link our node to another one.
As we want to create a form to enter data, we need to click on the Data Entry tab as shown below:
Once there, a new button will reveal: Add Field.
In this tutorial we will use three fields: name, email and survey.
So, click the Add Field button and create our first input form:
We want a single line of text to ask for the customer's name. We will also mark this input as required. The user or agent won't be able to continue unless it fills that input box. Click Add Field to save the data.
Then click Add Field on the node editor one more time to add the email data entry field:
Save it by clicking the Add Field button, and again click Add Field to create the last form entry, this time a likert scale:
Likert scales are widely used to measure attitudes and opinions with a greater degree of nuance than a simple “yes/no” question. Notice that its configuration is a little bit more complex than regular single line inputs.
The label will be the actual question, in this sample we will ask: How would you like to rate our Products or Services for the following parameters?
Notice that we have then Topics and Values. We need to enter them one by line (do not leave an empty line at the end as it will be given as an empty topic or value).
The survey will be presented as a grid with topic as rows and values as columns, as we will see at the end of the tutorial.
4 - Completing the data entry node
After adding the form fields we will see something like this:
Our initial node is not yet completed. We added three form fields, but we now need to give the option to finish the survey. We also want to save results using the built in Scripter data store.
For that we first(1) need to click on the Answers tab and click the Add Answer button. We will give the answer the text Continue.
Our second(2) action will be to click on the Link select box to create a new node, as shown:
On this new node we will be thanking the user for completing the survey, and saving the data in the datastore. Fill the information on the popup and click the Add Node button.
We will see something like this: