Get
Numbers
The Get
Number module will play a sound file, and save the number sequence
entered by the caller. Caller can enter the numbers
using the telephone keypad and indicates that they have finished
entering the number by pressing the "#" key, or waiting for the
module to timeout awaiting next key press. Module can
optionally verify that number is of correct length
(both
minimum and maximum lengths
can be set) and passes a VBScript
based verification check. It can also optionally play back the
number sequence for customer verification.
Sound
files
Multiple
sound files can be selected to be played by separating the
successive files by commas. eg:
prompts\1.wav,
prompts\2.wav
would result
in two files from the prompts subdirectory being played (1.wav and
2.wav) one after another. If you do not want a sound file to be
played at all you can also specify “none” in the sound file text
field.
If
Text to Speech (TTS) is enabled then a text file can be specified
in the ”Sound File” text box and VoiceGuide will read in the text
file and will speak (TTS) the contents of that file.
Play back
entered number and ask caller to confirm
If this
option is selected and the caller has entered something then
VoiceGuide will play back the entered number and ask the caller to
confirm it. The caller will need to press '1' to confirm the entry,
any other keypress will result in VoiceGuide asking for the caller
to enter the number again.
Minimum
entered number length
The minimum
length of there entered number which this module expects to receive
from user.
Maximum entered number length
The maximum
length of the entered number which this module should wait for.
Once this many digits have been entered the module will immediately
perform the next action - be it taking the best matching path or
running any selected confirmation and verification options.
Verify
Entered Number Tab
Quite often it
is desirable to determine if the entered number satisfies some
criteria, and if it does not then the option should be given to the
caller to enter the number again. A VBScript can be specified here
to check if the number passes any required
checks/tests.
For example to
check that the entered number is between 13 and 16 characters long
and begins with either a 3 or a 4 the following VBScript would be
used:
set vg =
CreateObject("vgServices.CommandLink")
iLen = Len("$RV_ENTEREDNUMBER")
sFirstChar = Left("$RV_ENTEREDNUMBER",1)
if iLen<13 or iLen>16 or (sFirstChar <> "3" and
sFirstChar <> "4") then
sResult = "verify_failed"
else
sResult = "verify_passed"
end if
vg.Run_ResultReturn $RV_LINEID, sResult
set vg = Nothing
For more information on VBScripts and how they are used from within
VoiceGuide please refer to this Help file's entry on Run VBScript module.
As a
quick-start guide lets just say here that this line should be at
the beginning of every VBScript used to verify the
number:
set vg =
CreateObject("vgServices.CommandLink")
and these lines should be at the
end:
vg.Run_ResultReturn
$RV_LINEID, sResult
set vg = Nothing
an the value of sResult should be set within the script to be either "verify_passed" or "verify_failed". That way
VoiceGuide will be informed whether the verification of the entered
number passed or failed.
If "verify_failed" is
returned back to VoiceGuide then VoiceGuide will play either play
the sound file(s) specified in the "file to play if entered number
is wrong length or verification failed" text box, or if that text
box is not set it will just play the main prompt asking the caller
to enter the number again. If the VBScript starts playing another
file before returning "verify_failed" then
VoiceGuide will just wait for caller to start entering the
number again, without starting to play any other sound files. This
allows customized sound files to be played depending on why the
entered number failed verification.
$RV_ENTEREDNUMBER
contains the number just entered by
the caller. Use this Result Variable instead of the $RV[ModuleName]
style variable. When the verification VBScript is ran the
$RV[ModuleName] style result variable has not been set
yet.
Paths
Here is an
example of valid paths:
Success
Path
Taken if the
caller has pressed some number keys.
If any of the paths match the entered number exactly then that path
is taken, otherwise the 'Success' path will be taken.
If the 'Success' path is not defined when it should be taken then
the caller will be asked to enter the number again.
Fail
Path
Taken if the
caller has not pressed any number keys at all, ie. caller just presses the
"#" key or VoiceGuide times
out awaiting first key.
If the 'Fail' path is not defined then the system will hang up the
call.
Timeout
Paths
The timeout
between key presses is set by default to 6 seconds. Default timeout
values used by this module can be changed in VG.INI file - in
the [moduleGetNbrs] section.
If a
‘Timeout’ path is specified then that path overrides the default
inter-digit key press timeout, and that path will be taken whenever
a timeout occurs awaiting a key press.
‘Exact
Match’ Paths
If any of the
paths match the entered number exactly then that path is taken
immediately. It will be taken immediately even if the path does not
satisfy the minimum and maximum number length limits. The "Confirm
entered number" option will also be ignored, and no verification
script will be ran.
Note: Manual
editing of the path trigger entry loaded by script designer in the
{} brackets will be necessary to specify the ‘exact number’
used. ie. the exact_number placeholder loaded by the
script designer needs to be replaced with the actual number
combination to trigger on.
‘*’ Paths
If an
"on {*} " path is defined then pressing the
* key results in VoiceGuide assigning a
"*" to the Result Variable for the module and
going down the "on {*}
" path. This feature can be used
to easily implement a "press * to correct" option - just point the
"On {*} " path back to the same module and then when
caller presses the *
key they will be able to just
start entering the number again from start.
If a
"on {*} " path is not specified then the * key will
be included in the string of numbers captured by the
module.
Result
Variables
Two RVs are
created by the module:
$RV[moduleTitle]
Stores the characters entered by caller.
$RV[moduleTitle_PathTaken]
Stores which path was taken when exiting the module. This could be
"success", "fail", "Timeout", "*" or the entered number if the
exact path match was made.