Scripter Overview
Asternic Scripter lets you build web based interactive decision trees, surveys, dynamic forms, tutorials and phone based scripts.
It can be embedded inside FOP2 and other Asterisk based applications like Issabel Call Center CE, but it can also be launched from any web application that can open an external URL.
Collected data can be stored with the builtin datastore or sent to external systems by using web hooks against RESTFul APIs.
For step by step examples, see the Basic Script tutorial, Forms tutorial, Conditional Routing tutorial, and Post Call Satisfaction Survey tutorial.
Creating a Script
From the Panel Manager open the Scripter menu and click Add.
You can define the script name, description, template and transition effect.
| Template | Usage |
|---|---|
| Buttons | Best for short answer sets like yes/no flows. Answers can be styled with CSS classes. |
| Panels | Better when you have many possible answers shown as a vertical list. |
| Tutorial | Best for static step by step guides. It does not use branching or data entry fields. |
| Phone | Used for IVR or post call surveys where callers answer using their phone keypad. |
For concrete examples of these templates, refer to the Basic Script tutorial, Forms tutorial, and Post Call Satisfaction Survey tutorial.
Nodes and Script Flow
Scripts are built from nodes. A root node starts the interaction and each answer can branch to another node until the script ends.
The top section of a node stores the static information like title, content, question, result and internal notes.
The bottom tabs provide the dynamic behavior:
- Answers to branch to other nodes
- Data Entry fields to collect information
- Conditions for logic jumps
- Web Hooks to save or forward collected data
Common node types:
| Node Type | Purpose |
|---|---|
| Question | Presents a question and branches to other nodes. |
| Solution | Final node used to end the interaction and optionally mark success or failure. |
| Logic Jump | Routes to another node using conditions instead of a clicked answer. |
| Playback | Plays audio prompts on phone based scripts. |
The Basic Script tutorial shows Question and Solution nodes, the Conditional Routing tutorial shows Logic Jump nodes, and the Post Call Satisfaction Survey tutorial shows Playback nodes on phone scripts.
Variables and Dynamic Content
Node content and form fields can use variables inside curly braces, for example {agent_name}, {name} or {alldata}.
Variables can come from:
- URL parameters when launching the script externally
- values typed or selected in previous data entry fields
- score variables assigned to answers or form inputs
This lets you personalize content and reuse collected information later in the flow.
See the Basic Script tutorial for content variables like {agent_name}, the Forms tutorial for collected field variables like {name}, and the Conditional Routing tutorial for score based variables.
Building Interactive Decision Trees
For a standard agent script, create a Question node as the welcome step, write the agent guidance in the content area, add the main question, and then create answers that link to new or existing nodes.
You can keep branching until you reach Solution nodes that represent successful or unsuccessful outcomes. Those node results can later be used for reporting.
If you use the Buttons template, answers can include CSS classes before the label text to visually distinguish options like yes and no actions.
For a full walkthrough, see the Basic Script tutorial.
Forms and Data Collection
Any node can collect data through the Data Entry tab.
Typical field types used in the tutorials are:
- single line text for values like customer name
- email fields
- radio buttons for single choice selections
- likert scales for satisfaction surveys
Fields can be marked as required, and their variable names become available for later nodes. For example, a second node can thank the user with {name} after the first node collected the customer name.
For examples of text, email and likert fields, see the Forms tutorial. For score driven radio button fields, see the Conditional Routing tutorial.
Saving Data with Web Hooks
To persist form information, add a web hook on the node where you want to save data.
For builtin storage, select the scripter-datastore API template. The web hook will use {alldata} so all collected values are saved together.
Saved entries can then be reviewed from the Saved Data icon in the scripts grid. The viewer includes fixed metadata like queue, agent and timestamp, plus one column for each field created in your form. Data can be exported to CSV, Excel and PDF.
The Forms tutorial covers saving form data with scripter-datastore, and the Post Call Satisfaction Survey tutorial shows where to review saved survey results.
Conditional Routing
Branching does not need to depend only on button clicks. A Logic Jump node can route the interaction according to form answers or numeric scores.
A common pattern is:
- collect customer information on a Question node
- store a text value and a numeric score in data entry fields
- continue to a Logic Jump node
- add ordered conditions that compare a variable to a value and link each match to a destination node
Conditions are evaluated in order. The first match wins, and a default route can be used when none of the previous rules match.
See the Conditional Routing tutorial for a complete example that routes by age range using score values.
Using Scripter in FOP2 and External Apps
Every script gets a unique hash URL that can be copied from the scripts list and launched from any application that supports external links.
If you use FOP2, enable the Scripter plugin on a user. When that user receives a queue call and the queue name matches a script name, the widget can automatically open the corresponding script.
This integration flow is shown in the Basic Script tutorial.
Phone Based Post Call Surveys
Scripter also supports phone scripts for automated keypad driven surveys.
To build one:
- create a script using the Phone template
- add Question nodes with answer digits like 1 to 5
- save each node, then upload or record its audio prompt
- finish with a Playback node that thanks the caller
- reload the panel so the dialplan is generated
In Issabel, the survey can be selected as a custom destination on a queue so callers are transferred to it after the agent hangs up by using the queue continuation configuration.
For the full phone survey setup, recording flow and Issabel queue integration, see the Post Call Satisfaction Survey tutorial.
Asternic Call Center Stats PRO Integration
Survey results are stored in tables named like scriptersaveddata_XX, where XX is the script ID. Those tables can be joined with Asternic queue data by using the Asterisk uniqueid field.
The tutorial flow is:
- grant the Asternic database user permission to read the Scripter database
- identify the Scripter script ID
- join the survey table in Report Designer with JOIN_TABLE
- expose calculated averages with COLUMN_ANSWERED
- add the fields to existing reports or custom reports
- optionally format or chart the results with Report Designer and custom functions
This makes it possible to correlate survey ratings with queue metrics and recordings inside Asternic CCStats PRO.
See the Post Call Satisfaction Survey tutorial for the detailed Asternic Report Designer steps, including JOIN_TABLE, COLUMN_ANSWERED, custom reports and chart formatting.
FOP2 Scripter Guide