IVR Studio 3.0 Guide
May-2013
Knowlarity Product Team
Contents
IVR Studio Description ... 4
Workstation ... 4
Name & Description field of IVR ... 4
Set CDR maintainence property... 4
Set IVR view... 4
Object properties view ... 4
IVR States ... 5
Pre IVR ... 5
Runtime IVR ... 5
Post IVR ... 5
IVR Nodes Description ... 6
Start and Exception Flow Nodes ... 6
Start ... 6
IVR Flow ... 6
Exception Flow ... 6
Call Flow Nodes ... 7
Debug Mode ... 8
Call Conference (outgoing) ... 9
Call Transfer ... 10
Case ... 12
CDR ... 13
Conf Incoming ... 13
DTMF ... 15
Email ... 16
Fax ... 17
Goto ... 18
Hangup ... 19
If- Else ... 19
InCall-PreAnswer ... 20
Incall-Answer... 21
Record ... 21
Ring-Ready ... 22
Set- Language ... 23
Sound ... 24
Sub-IVR ... 24
Var Operations ... 25
Examples of Var Operations:... 26
Allowed Operations in Var Operations: ... 26
Web ... 27
List of System Variables available in IVR studio: ... 28
IVR Studio Description Workstation
Workstation is the window where you start development of IVR call flow using different objects /nodes.
IVR node can be inserted in any of the three stages of an IVR: Pre / Runtime / Post
Name & Description field of IVR
Fields which are mandatory for saving an IVR. Give a descriptive short name. You can include version number in the name. Description should have further details like customer, type of call flow and version etc.
Set CDR maintainence property
You can decide whether SmartIVR will maintain Call Data Records (CDR) for this IVR or not. For products using IVR studio, this is generally set to False. For all enterprise customer IVRs this should be set to True.
Set IVR view
Here we are giving two types of views to know call flow of IVR : File browser view (default view) & Tree view.
Object properties view
On-hover on Instruction (i) icon of node,property of nodes easily available in right side of page.
SPECIAL NOTES FOR IVR DEVELOPERS
IVR States Pre IVR
In Pre-IVR state, we define the nodes to execute before a call starts. Generally used for outgoing calls.
E.g. TTS or web query etc.
Runtime IVR
In the Runtime state, we define the nodes to execute during a call. Steps could include instructions like digit input (DTMF), recording, call forward etc. Or conditions like If-Else statements or Case statements.
Additionally IVR developer can add iterations and webAPI hooks in the call flow. These nodes are executed once the call lands on Knowlarity platform. Hence, some nodes can be executed before call is actually answered.
Post IVR
In the Post-IVR state, we define the nodes to execute after a call is hung up. All the data captured during the call is available in this stage, which includes caller details, transfer details, duration, hangup cause, call recording etc.
SPECIAL NOTES FOR IVR DEVELOPERS
IVR Nodes Description
An IVR node is a step in the call flow which an IVR developer will define for a customer’s call flow. An IVR node can be inserted in any of the three stages of an IVR: Pre / Runtime / Post. The IVR can be created for both incoming or outgoing calls.
Start and Exception Flow Nodes
When you create a new IVR, for each call flow (IVR), the system inserts three (3) default uneditable nodes in the call flow. System will not allow removing these nodes. These are:
Start
Node # 0000. This denotes the start of the IVR.
IVR Flow
Node # 0001. An incoming or outgoing call will follow the flow of nodes under IVR Flow node.
Exception Flow
Node # 0002. In case there is an exception in any of the nodes under IVR Flow, the system will will raise an exception and the call flow will jump to the Exception Flow. By default the system hangs up here. You can define additional steps here by inserting nodes to handle the exception. Details of exception
variables are described later in this document.
SPECIAL NOTES FOR IVR DEVELOPERS
Call Flow Nodes
Following are various types of nodes which can be inserted in an IVR call flow. These are discussed in detailed later in this document. The table below gives details of each node’s availability in each stage of the the IVR.
NODE NAME PRE-IVR RUN-IVR POST-IVR
Call Conference
Call Transfer
Case
CDR
Conf Incoming
DTMF
Fax
Goto
Hangup
If- Else
InCall-PreAnswer
Incall-Answer
Record
Ring-Ready
Set- Language
Sound
Sub-IVR
Var Operations
Web
Debug Mode
Each type of node described in this document has a check box where you can switch on “debug” node.
During a call flow when that node is executed, debugging data is gathered and stored in the events available for you in the call logs. A node with debug option set to “On” appears in bright yellow color in the IVR studio. In case a node is executed multiple times within a particular call, the debug data is captured and stored in events for each iteration.
SPECIAL NOTES FOR IVR DEVELOPERS
Call Conference (outgoing)
This node initiates outgoing conference calls where the system will generate out calls to numbers provided in the call flow and put them in a conference.
Field Description
BASIC
Provide Phone Numbers Phone numbers separated by commas. Or variable name.
Select Moderated Select True if conference should hangup once moderater quits, or False to continue with the conference even if moderater has quit.
Provide Output Variable Variable to store result of conference
Select Hold music File Select sound file from sound resources of the user account
ADVANCED
Provide Number of tries Number of times IVR will try to connect to numbers to join into conference.
Provide hold music variable Provide variable which contains path of the sound file to play as hold music
Select Sound File (Language) Language based sound file from user account.
SPECIAL NOTES FOR IVR DEVELOPERS
Call Transfer
Can initiate outgoing call to numbers provided in the call flow using any mode like sequential or parallel.
* Basic without bridge-DTMF
* Advanced with bridge-DTMF
Field Description
BASIC
Phone Number Specify the phone number(s) or variable which needs to be connected.To specify options:
9999999999, 09876543210, +919876543210
<sequential forwarding>
9999999999#20, 09876543210#60 <sequential forwarding with timeout>
9999999999|09876543210|9999999998 <parallel forwarding>
Output Variable Variable to store the number that got connected. None in case of failure to connect.
Select Hold music File Select sound file from user account sound resources as the hold music to play
ADVANCED
Provide Hold Music Variable
Provide the variable with Path of the sound file to play as hold music
Select Hold Music Language
Language based sound file from user account.
Provide Max Bridged Duration (sec)
Number of seconds call can remain in Bridged state.
Provide Overall Timeout (sec)
Number of seconds to try connecting to any of the number.
This is the complete duration – total for all numbers tried.
Provide Caller ID Specify the number or variable containing the number to be shown as caller id to Leg B (This is currently working only for SIP countries)
Select Bridge Media If True then holdmusic will be neglected and the caller tune of Leg B will be audible.
Provide Bridge DTMF This would enable option to bridge 3rd number within the call, by specifying predefined DTMF values. To specify options:
'default=<number>,1=<number1>,<dtmfExt>=<number2>'.
If this option is selected then only a single number can be provided as number to transfer call to.
SPECIAL NOTES FOR IVR DEVELOPERS
Case
Depending on numbers of cases entered, select variable fields for the respective comparison. N+1 sub- branches are created with case 0 as default branch and marking rest from case 1 to case 15 max.
Internally the IVR object with smaller object ID gets the case number in ascending order, least one being default case.
Field Description
Select Variable Variable to compare.
Number of Cases Number of sub-branches to create.
Case # Provide value to check for each case #
SPECIAL NOTES FOR IVR DEVELOPERS
CDR
Specify variables(, separated) to be visible in Events(Logging).
Field Description
Provide Name/Key to log Provide the names of the dictionary variables to be logged into the CDR events
SPECIAL NOTES FOR IVR DEVELOPERS
Conf Incoming
This node will bridge all the callers and start conference.
Field Description BASIC
Select Hold music file Sound File to be played when a single person is waiting for others to join conference.
Provide output variable Output result of conference.
ADVANCED
Provide hold music variable Provide the variable containing the file path of hold music to play
Select language based sound file Provide language based sound file Provide Max duration of
conference(mins)
Max duration for which a conference will be held.
Provide Conference Pin Provide pin to have multiple conference on single number. By default pin is 0.
SPECIAL NOTES FOR IVR DEVELOPERS
DTMF
Digit Input using prompt & proceed the flow based on given input.
Field Description
BASIC
Provide Min Number of Digits
Defines the min number of input digits to take form user.
Provide Max Number of Digits
Defines the max number of input digits to take form user.Minimun number of digits being 1 Provide Max Tries Defines number of times to prompt user in case
of no or incorrect dtmf.
Provide Wait Duration Time in secs system would wait for the input from user.
Provide Output Variable Variable to store the value of DTMF.
Select Sound File Stored Select sound file from user account or Select No match Sound file Path of the sound file with recording to notify
user about wrong input (If input does not meet either regex criteria or min/max validation).
Select No Input Sound File Path of the sound file with recording to remind user to input something in case of no input.
ADVANCED
Provide Terminating Key Defines the terminating key to end taking input from user.
Provide Sound File Variable Provide Path of the sound file with recording to prompt user for input.
Select Sound File (Language)
Language based sound file from user account.
Provide DTMF Regex Specify the regex expression. For eg. in case the user should press either 1 or 2 then to restrict specify 1,2.
Provide NoMatch sound variable
Variable containing file path of sound to play for no-match
Select Wrong language based file
Select language based sound file from user account to be played for NoMatch (Wrong match)
Provide NoInput sound variable
Variable containing file path of sound to play for no-input
Select NoInput language based sound file
Select language based sound file from user account to be played for no input
Select hangup file If selected and the user crosses the max number of tries this sound will play and call will hang up.
If no hangup file is selected then system would continue with rest of the IVR chain even after max retries.
SPECIAL NOTES FOR IVR DEVELOPERS
Can send email notifications within a call flow
Field Description
Provide Subject Subject of the Mail to be sent.
Provide From Email Optional parameter to set From Email(Email should be registered with Kemail). By default from id is
Provide To Email List of comma (,) separated emails to which mail will be sent.
Provide Content Content of the mail.To insert value of a particular variable use '${variablename}'. For eg '${email_content}’
Select File to attach Path of the file to be sent as an attachment.
Output Variable List of comma (,) separated emails to which mail will be sent.
SPECIAL NOTES FOR IVR DEVELOPERS
Fax
During a call flow you can instruct the call flow to either send or receive fax through a fax tone.
Fields Description Provide Variable to store fax file
path(incoming)
Variable to store path at which file would be saved in tiff format after recieving Fax.
Provide fax file path(outgoing) File path that will be faxed.
Select Options Default should be selected
SPECIAL NOTES FOR IVR DEVELOPERS
Goto
IVR developers can perform complex call flow steps like: iterate (loop), skip using goto object.
Field Description
Select Object ID Pull down menu to select from list of available object / node IDs.
Provide Max Pass Maximum number of times this object forwards the execution to the go-to object. (Max = 49)
Select Hangup File If selected and the user crosses the max number of tries this sound will play before hanging up.
SPECIAL NOTES FOR IVR DEVELOPERS
Hangup
This hangs up the call.
SPECIAL NOTES FOR IVR DEVELOPERS
If- Else
Conditional statement used to relate in between operators
Field Description Select Relational
Operator
==, !=, > or <.== and != run with text arguments, where as the < and >
work with numeric arguments.
Provide Value 1 One of the two variable for comparison.
Provide Value 2 The other variable / value for comparison.
The two sub-branches are marked true(T) or false(F). Internally the IVR object appearing first(file browser view) or appearing in left(tree browser view) is following the true path and the other for the false path.
SPECIAL NOTES FOR IVR DEVELOPERS
InCall-PreAnswer
Do not answer node for incoming IVR .If this is the first node then IVR will not be answered automatically. A delibrate answer node would be required for the same.
SPECIAL NOTES FOR IVR DEVELOPERS
Incall-Answer
To answer the incoming IVR.
SPECIAL NOTES FOR IVR DEVELOPERS
Record
Can record sound spoken by the caller with limitation of recording time.Recording will be available in the Voicemail tab to maintain history.
Field Description
Provide Record Time Maximum time of recording in seconds. Recording stops after this time or on detecting silence for specified number of seconds, whichever is first
Provide Silence Time Number denoting seconds of silence which marks as recording termination
Select Resource Type vm: Recordings of this categorycan be accessed only via web and will not be available for future use within IVR.
pfsr: Recordings of pfsr category will be available both via web and also within IVR.
Provide Output Variable Variable to store the recorded file uuid for later use in IVR.
Provide output url Variable to store recording URL
SPECIAL NOTES FOR IVR DEVELOPERS
Ring-Ready
This node is used for incoming calls, with before answer option. This helps in playing a sound before picking up the call.
Field Description
Provide Ring Time Duration in secs for which sound will be played Select Sound File sound file from user account.
Select sound file Variable Variable containing runtime sound file Select sound file Language Language based file from user account.
SPECIAL NOTES FOR IVR DEVELOPERS
Set- Language
Node through which we can set language based on DTMF inputs. Upto 20 languages allowed in a single call flow.
Field Description
Select input variable Value which needs to be matched against corresponding Language
Provide default value In case of no match this value will be assigned to output variable
Values(1-20) Compares the input value with integers 1-20. In case of match the value placed against that number is set as LANGUAGE.
SPECIAL NOTES FOR IVR DEVELOPERS
Sound
Can upload a static file and play that. Alternatively can play a sound provided during the call to play through an API. This node supports DTMF node,call transfer node,conference node etc.
Field Description
Select Sound File Sound file from user account, or Provide sound Variable Variable containing runtime sound file Select sound file Language Language based file from user account.
Provide output Variable Variable containing output of stream file . It will have number of miliseconds for which file was played. If user hangs up during sound play then it says “hangup”. The variable has “None” if invalid sound file or any other exception occurs.
SPECIAL NOTES FOR IVR DEVELOPERS
Sub-IVR
Refer an IVR to communicate with other IVR just by giving reference id of that ivr.
Field Description
Provide Refereice ID Provide the reference code of the ivr to be included in the chain.
SPECIAL NOTES FOR IVR DEVELOPERS
Var Operations
Node which helps an IVR developer to set their own variables with corresponding executable values (supported python values & functions)
Field Description
Var Name of variable to set
Exec Python executable value. It can be Integer, Strings, or python executable functions.
Examples of Var Operations:
A = 4, Var = "This is sample str", Var = "Templatization can be done on ${sample}",
Sum = A + B,Sub = A-B,Divide = A/B,divide_float = float(A)/float(B),multiply = A*B,
json_str = {'a':A,'b':'BB','c':{'c1':'CC'}},json_parse_c = json_str['c']['c1'],
t1 = datetime.today(), t2 = datetime(2012, 11, 14, 11, 20, 29, 375598), t = t1- t2,
time_str = t.__str__(),
concat = str1+' '+str2, split = concat.split(' ')[3],replace = concat.replace('can','Can'),
rank = xmlparser(xml_str,'country/rank')[0],gdppc = xmlparser(xml_str,'gdppc') Allowed Operations in Var Operations:
Operations Supported Not supported
Assignment Number, string, dict, list, boolean -
TypeCast str, int, float -
inbuilt functions allowed
len','dict','type','xmlparser','datetime','sorted' -
String/dict ops capitalize', 'count', 'find', 'isdigit', 'islower', ,isupper', 'join', 'replace', 'split', 'strip', 'upper','update'
- Modules Math ('pow','factorial','ceil','floor','isinf','isnan','pi') -
datetime - sleep not allowed
Binary Ops Add, subtract, divide, Mod
Mult - Only between integers
or float values
Pow - Upto 1 level for values
not greater than 100 Bool Ops And , Or
Compare Ops Gt, Lt, GtE, LtE, Eq
Lambda - Completely
unsupported
While loop - Completely
unsupported
For loop - Completely
unsupported multiple
statements
- Completely
unsupported
json dumps,loads -
SPECIAL NOTES FOR IVR DEVELOPERS
Web
The url for the http api. Value of variables can be inserted in the url using ${variable_name} format. eg:
'http://api.knowlarity.com/testapi?caller=${caller}'
Field Description
BASIC
Provide URL URL to be called for the web node
Output Variable Variable to store the response from the http api call or to save path of temporary file(if save file to disk option is selected) ADVANCED
Save file to Disk Optional checkbox. If selected the result from api would be saved in temporary file in the specified format.
Timeout Give the timeout value. Default = 30
Post Params Required to pass parameters for POST request.It will be in python dictionary format {'data1': 'val1','data2': val2}.
In case of GET request leave blank.
Post File Required to post a file. It will be in python dictionary format {'post_file': path_var} or {'post_file': '/path/of/file'}. 'post_file' is the name of parameter to be sent.
SPECIAL NOTES FOR IVR DEVELOPERS
List of System Variables available in IVR studio:
Python supported custom variables in IVR 3.0
DESCRIPTION Availability
(In IVR or Events) recordingurl_system List of urls from call conference/call
transfer/incoming conf
Within IVR
& Events
voicemailurl_system List of urls from record node Within IVR
& Events conferenceid_system session_uuid in case of call conference/call
transfer/incoming conf
Within IVR
& Events platform_status_from_bridge_api complete status from knowlus in case of call transfer In events
member_info_n in case of call conference/call transfer/incoming con Within IVR
& Events
IVR_DISP_NUM_SYS Display number Within IVR
& Events
REF_NUM_SYS IVR refrence number Within IVR
& Events
SESSION_ID_SYS Session id Within IVR
& Events
INCOMING_SYS True or False (Incoming status) Within IVR
& Events
CALLERID_SYS Caller id (called - outcall / caller - incall) Within IVR
& Events
SESSION_KNUMBER knumber Within IVR
& Events
hangup_time_system hangup time of leg A Within IVR
& Events
direction_system for outgoing and incoming Within IVR
& Events
pickup_time_system Pickup time of Leg A Within IVR
& Events
hangup_cause_system hangup cause Within IVR
& Events
legA_duration_system leg A duration Within IVR
& Events
legB_duration_system Leg B duration Within IVR
& Events
start_time_system Leg A start time Within IVR
& Events
end_time_system Leg B end time Within IVR
& Events language_system Language set after set language node Within IVR
& Events conference_path_system recording file name in case of call
transfer/conference/incoming conf
Within IVR
& Events
exception_name_sys Exception name Within IVR
& Events
exception_code_sys Exception code Within IVR
& Events
exception_details_sys Exception details Within IVR
& Events
exception_node_num_sys Exception node number Within IVR
& Events
exception_node_name_sys Exception node name Within IVR
& Events exception_dict_sys List of all the Exceptions within IVR In events
pre_debug_dict_sys Debug details of preprocess In events
runtime_debug_dict_sys Debug details of runtime In events
postprocess_debug_dict_sys Debug details of postprocess In events
SPECIAL NOTES FOR IVR DEVELOPERS