You are on page 1of 22

C H A P T E R 1

Script Editor Overview

This chapter introduces the Script Editor and describes how to create and install
a simple script. It includes:
• An introduction to routing scripts and administrative scripts
• Instructions on how to use the Script Editor tool
• Procedures for creating, validating, saving, and scheduling a script
Subsequent chapters provide more detail about ICM software scripting language
and other features of the Script Editor.

Introducing Routing Scripts


ICM software determines the best way to handle a call through routing scripts,
which are programs that access information about calls and call center activity.
Routing scripts contain instructions that can:
• Examine the call information provided by the routing client and use that
information to classify the call as a particular call type.
• Analyze call center information and determine the best destination for the
call.
• Direct the call to an appropriate routing target; for example, an individual
agent, a skill group, or an announcement.
You can create a specific set of scripts to be executed for each call type, such as
Sales or Support. In addition, you can schedule different scripts to be used at
different times of day, or different days of the week and year, for each call type.

Cisco ICM Software Script Editor Guide


78-11590-04 1-1
Chapter 1 Script Editor Overview
Introducing Routing Scripts

What a Routing Script Looks Like


A routing script resembles a programming flowchart consisting of
nodes (represented as rectangles) and connections (represented as line segments).
You define routing logic by selecting appropriate objects from a palette of
drag-and-drop objects and placing them in the script workspace.
Each node has one or more terminals which are represented as small circles with
an arrowhead, X, or checkmark. When ICM software executes a script, control
flows into a node through an input terminal and out through an output terminal.
Some nodes (like Start) have a single output terminal with an arrowhead. Others
(like Select, shown in Figure 1-1) have two output terminals.

Figure 1-1 Connections and Input and Output Terminals

Note The input terminal appears only after a connection is made to the node.

If the node’s operation succeeds, control flows from the node through the success
output terminal (indicated by the checkmark). If the node’s operation fails, control
flows from the node through the failure output terminal (indicated by the X). For
example, in the case of the Select node, if a target is selected, control flows
through the success terminal. If no target is found to satisfy the selection rule,
control flows through the failure terminal.

Cisco ICM Software Script Editor Guide


1-2 78-11590-04
Chapter 1 Script Editor Overview
Introducing Routing Scripts

The information you provide through nodes, and the connections you establish
between them, instruct ICM software how to best handle a call. Figure 1-2 shows
a simple script and describes the steps it would take in processing a routing
request.

Figure 1-2 Example of a Routing Script

Cisco ICM Software Script Editor Guide


78-11590-04 1-3
Chapter 1 Script Editor Overview
Introducing Administrative Scripts

Introducing Administrative Scripts


An administrative script executes periodically on a specific time schedule, rather
than in response to a route request. Administrative scripts can perform
background processing such as setting persistent variables—that can then be used
by routing scripts—or collecting data from third-party systems.
Figure 1-3 shows an administrative script that sets the userLastCheck global
variable to the current date.

Figure 1-3 Sample Administrative Script

Note Only a subset of the Script Editor’s nodes can be used in an administrative
script. (The Script Editor will prevent you from inserting invalid objects in an
administrative script.)

For more information about using administrative scripts, see Script


Administration.

Cisco ICM Software Script Editor Guide


1-4 78-11590-04
Chapter 1 Script Editor Overview
Introducing the Script Editor Tool

Introducing the Script Editor Tool


You create routing scripts using the Script Editor tool. The parts of the Script
Editor user interface are shown in Figure 1-4. (Not all menu and toolbar options
appear in the Script Editor window until you have opened a script file.)

Figure 1-4 Script Editor Window

Cisco ICM Software Script Editor Guide


78-11590-04 1-5
Chapter 1 Script Editor Overview
Introducing the Script Editor Tool

Script Editor Toolbars


The Script Editor toolbars correspond to command options available through the
menus. (For example, the default Scripting toolbar contains options available
through the Script menu.) Some toolbars, such as the Main toolbar, contain
options from more than one menu.
When you initially open the Script Editor, the toolbars are anchored at the top of
the Script Editor’s main window. However, you have the option of changing the
appearance and location of the toolbars. For instance, you can:
• View or hide a toolbar.
• Anchor a toolbar to another edge of the main window or create a floating
toolbar that you can move anywhere on the screen.
• Display toolbars with large icons (with labels) or small icons (without labels).
To change the appearance of a toolbar or icons, use the View > Toolbar menu
options. (To directly access this shortcut menu, position the pointer anywhere on
a toolbar and left-click the mouse.)
To move a toolbar, position the pointer over the toolbar’s “gripper”—the double
vertical lines on the graphic—press-and-hold the left mouse button, and do the
following:
• To create an anchored toolbar, drag the toolbar anywhere near the edge of the
main window and release the mouse button.
• To create a floating toolbar, drag the toolbar to its new location and release
the mouse button. (To create a floating toolbar near an edge of the main
window, hold down the Ctrl key to prevent docking.)

The Object Palette


The object palette contains icons that represent commands in ICM software
scripting language. You drag object icons into the Script Editor window’s
workspace, where they become scripting language nodes.
The object palette contains four tabs which group the object icons by category:
• The General tab contains objects that apply to both routing and
administrative scripts.

Cisco ICM Software Script Editor Guide


1-6 78-11590-04
Chapter 1 Script Editor Overview
Introducing the Script Editor Tool

• The Routing tab contains objects specifically related to how ICM software
classifies or routes a call.
• The Targets tab contains objects that are call routing targets, that is, where
the routing client sends a call.
• The VRU tab contains objects specifically related to ICM software’s
interaction with an IVR/VRU.
You can reposition the object palette as you would a toolbar. In addition, you can
choose to display large icons (with text labels) or small icons (without text labels.)
There are two methods of moving objects into the workspace:
• Drag-and-drop. Place the cursor over an object and press the left mouse
button; drag the object into the workspace and release the mouse button.
• “Sticky” mode. Place the cursor over an object and click the left mouse
button; move the cursor into the window’s workspace and click the mouse
button. To insert more of the same node, reposition the cursor and click again.
To turn sticky mode “off,” either move the cursor back over the object on the
palette and click the left mouse button or click the palette’s Selection mode
icon.

Script Modes
The Script Editor supports three modes:
• Edit mode. You can view the script and make changes to it. The script
background is white. This is the default mode for new scripts. When you enter
edit mode, the Script Editor automatically obtains the script lock. If the lock
is not available, you cannot enter edit mode.
• Browse mode. You can only view the script; you cannot make changes. The
script background is gray.
• Monitor mode. You can view the script and monitor how it processes calls;
you cannot make changes. The script background is gray.

Note For further information on monitor mode, see Script


Administration.

Cisco ICM Software Script Editor Guide


78-11590-04 1-7
Chapter 1 Script Editor Overview
Script Editor Online Help

The Script Editor displays the mode of the current script in the Script Editor status
bar. In order to make changes to a script, the script must be in edit mode. (When
you create a new script, the Script Editor automatically places it in edit mode.)
You can change the mode at any time by choosing the appropriate option from the
Script menu (Edit Script, Browse Script, or Monitor Script) or by clicking one of
the mode buttons.

Script Editor Online Help


Script Editor online help is available to provide information about Script Editor
options and features. To access Script Editor online help:
• Click the Help button in a node’s Properties dialog box.
• Select Help > Help Topics.
• Click the Display Help icon on the Script Editor Toolbar.
• Click the Context Sensitive Help button on the toolbar.

Note Context-sensitive help is available only for Script Editor nodes.

Creating a Script
To successfully create or edit a routing script file that can then be scheduled and
run by ICM software, you must do the following:
• Start the Script Editor and open a script.
• Place nodes in the workspace, draw connections between them, and edit their
properties.
• Validate the script.
• Save the script.

Note You can also create a script by copying one from another system. For more
information, see Importing and Exporting Scripts in Script Administration.

Cisco ICM Software Script Editor Guide


1-8 78-11590-04
Chapter 1 Script Editor Overview
Creating a Script

The sections that follow take you through the process of creating a simple script.

Starting the Script Editor and Creating a Script


To begin creating a script, you must invoke the Script Editor and set up the initial
window.

How to start the Script Editor and create a script

Step 1 Double-click the Script Editor icon in ICM software Admin Workstation group.
The Script Editor window opens.
Step 2 In Script Editor, choose File > New from the menu bar or click the New Script
button on the main toolbar. The Create a New Script dialog box appears.

There are two types of scripts:


• Routing scripts. Used by ICM software to analyze call information and
determine the best destination for the call.
• Administrative scripts. Used by ICM software to perform background
processing at specific intervals.

Note Administrative scripts use a subset of object palette icons: all of


the objects on the General tab, plus the Wait object (which appears
on the VRU tab).

Cisco ICM Software Script Editor Guide


78-11590-04 1-9
Chapter 1 Script Editor Overview
Creating a Script

Step 3 Click the button for a routing script. This creates an empty script in edit mode
that consists only of a Start node.

Inserting Nodes in a Script


After a script is opened and in edit mode, you are free to add, modify, delete and
connect script nodes. This section describes how to insert the following nodes:
• Select node
• Skill Group node
• Announcement

How to insert the Select and Skill Group nodes

First, you’ll insert a Select node and Skill Group nodes to set a rule which ICM
software can use to choose among a set of targets.

Step 1 Position the mouse pointer over the Select object on the object palette’s Routing
tab. Press-and-hold the left mouse button and drag a Select object to below the
Start node in the script window workspace.
Step 2 Position the mouse pointer over the output terminal of the Start node.
Press-and-hold the left mouse button and drag a connection to the Select node. A
connection line appears between the two nodes and an input terminal appears on
the Select node.
Step 3 Position the mouse pointer over the Skill Group object on the object palette’s
Targets tab. press-and-hold the left mouse button and drag a Skill Group object to
the right of the Select node you created.
Step 4 Right-click the Skill Group and choose Properties from the shortcut menu. The
Skill Group Properties dialog box appears.

Cisco ICM Software Script Editor Guide


1-10 78-11590-04
Chapter 1 Script Editor Overview
Creating a Script

Step 5 Click the Add Targets button. The Add Skill Groups Targets dialog box appears.

Step 6 Select a value from the Available Targets list and click the Add button. Repeat
until all the skill groups you require appear in the Add Targets list.

Cisco ICM Software Script Editor Guide


78-11590-04 1-11
Chapter 1 Script Editor Overview
Creating a Script

Step 7 Click OK to add the changes to the Skill Group Properties dialog box.

Note If there is only one route option available, it is automatically inserted


in the dialog box. If there is more than one option available, you must
use the Route or Translation Route drop-down lists to select a route
for the target.

Step 8 If necessary, specify a Route or Translation Route value using the drop-down lists.
Step 9 Click OK to close the Skill Group Properties dialog box.
Step 10 Position the mouse pointer over the Select node’s success output terminal.
press-and-hold the left mouse button and drag a connection to the Skill Group
routing target. A connection line appears between the Select node and the Skill
Group routing target and an input terminal appears on the routing target.

Step 11 Right-click the Select node and choose Properties from the shortcut menu. The
Select Properties dialog box appears.

Cisco ICM Software Script Editor Guide


1-12 78-11590-04
Chapter 1 Script Editor Overview
Creating a Script

Step 12 Click OK to accept the default values—the Standard selection rule of Longest
Available Agent (LAA) and the evaluation order of Start with First Target—and
close the dialog box.

Note For more information on selection rules, see Standard Selection Rules in
Target Selection.

Next, you’ll connect an Announcement node to the Select node’s failure terminal.

Cisco ICM Software Script Editor Guide


78-11590-04 1-13
Chapter 1 Script Editor Overview
Creating a Script

How to insert the Announcement node

The Announcement node provides call-handling instructions if ICM software ever


runs into the situation where it cannot route a call to a member of the target skill
group. In such a case, ICM software will play a pre-recorded message and
terminate the call.

Step 1 Drag an Announcement object from the object palette’s Targets tab to below the
second Select node.
Step 2 Right-click the Announcement node and choose Properties from the shortcut
menu. The Announcement dialog box appears, displaying all announcements
currently configured for the system.

Step 3 Choose a name from the Announcements list.


Step 4 Click OK to apply the changes and close the dialog box.
Step 5 Position the mouse pointer over the failure output terminal of the second Select
node, press-and-hold the left mouse button, and drag a connection to the
Announcement node. A connection line appears between the two nodes.

The script is complete and you can now validate and save it.

Cisco ICM Software Script Editor Guide


1-14 78-11590-04
Chapter 1 Script Editor Overview
Validating the Script

Validating the Script


Before you save a script, you should check it for errors and to ensure that it is valid
and consistent with currently installed configuration information. When you
validate a script, the Script Editor checks whether or not there are any problems
and groups them into two categories:
• Errors. Serious problems that must be fixed before you install the script.
ICM software cannot use a script that contains an error.
• Warnings. Less serious problems, but which probably indicate an error in the
script. You should make a point to clearly understand any warning messages.
It is a good policy to fix any conditions that cause warnings before you use
the script.
The Script Editor provides several ways to check your script for errors:
• For most nodes, when you place an object in the Script Editor workspace, by
default, an error or warning icon appears in the upper right corner of the node
to remind you that there are attributes that need to be set.

Figure 1-5 Error Icon in Node

• Some Properties dialog boxes include a Validate button that allow you to
check the settings before closing the dialog box.
• Script > Validate Script and the Validate button
examine the current script.
• Script > Validate All and the Validate All button
examine all saved scripts or all open scripts.

Cisco ICM Software Script Editor Guide


78-11590-04 1-15
Chapter 1 Script Editor Overview
Validating the Script

How to validate a node’s properties

Step 1 Within a node’s Properties dialog box, click the Validate button. One of the
following happens:
• If the Script Editor does not detect any problems, it displays the following
message.

• If the Script Editor does detect problems, it displays an error message. For
example, if a Skill Group Properties dialog box contains a Skill Group entry
that does not include a route, the following error message displays after
clicking the Validate button.

Cisco ICM Software Script Editor Guide


1-16 78-11590-04
Chapter 1 Script Editor Overview
Validating the Script

How to validate the current script

Step 1 Within Script Editor, select Script > Validate or click the Validate Script button
on the main toolbar. One of the following happens:
• If the Script Editor does not detect any problems, it displays the following
message.

• If the Script Editor does detect problems, it displays the Validate Script dialog
box, which lists all errors and warnings generated by the validation routine.
(The total number of errors and warnings are summarized in the dialog’s
status bar.) An example dialog box with several errors and warnings is shown
below.

Step 2 Click the Next Error button to step through the errors and warnings. As you move
through the messages, the Script Editor highlights the script object that caused the
error.
Step 3 When you have finished reviewing the errors, click Close to close the dialog box.

Cisco ICM Software Script Editor Guide


78-11590-04 1-17
Chapter 1 Script Editor Overview
Saving the Script

Step 4 Fix any problems before saving the script.

Saving the Script


Once you validate the script, save it.

Note ICM software cannot begin using a script until you have saved it.

How to save a script

Step 1 Within Script Editor, select File > Save or click the Save button on the main
toolbar. Since this script has not been saved before, the Save As dialog box
appears.

Step 2 The Script Editor assigns a temporary name (such as SCRIPT1) in the Script
Name field.
Step 3 You can type a new name in the Script Name field or choose the name of an
existing script from the selection list.

Cisco ICM Software Script Editor Guide


1-18 78-11590-04
Chapter 1 Script Editor Overview
Saving the Script

Step 4 Optionally, deselect the Activate Script Version After Save checkbox.

Note When you save a script, the Script Editor attaches a version number to
the name. By default, the Script Editor will make the most recent
version of a script the active version. An active script is the version
that ICM software runs if the script is currently scheduled. (For more
information on active scripts, see Script Administration.)

Activate requires that the script be put in browse mode, which releases
the lock. If a script is not activated, the script stays in edit mode and
the lock is not released.

Step 5 Click Save to save the script to ICM software database. The Script Editor
automatically tests that the script is valid and the script lock you hold on it is
released so that other users can make changes to the script.

Note If the script is not valid, you can still save it, but ICM software cannot
put it into service.

Adding Comments to a Script


To make scripts easier to maintain, you can include comments within the script.
Two types of comments are available:
• A comment within a node
• The Comment object

Adding Comments Using the Comment Tab


You might find it useful to display text other than the default within a node. For
example, the Announcement node’s text default is the name of the announcement
you select. If you prefer that the node display the text of the message the caller
will actually hear, you can enter that text using the Comment tab in the node’s
Properties dialog box.

Cisco ICM Software Script Editor Guide


78-11590-04 1-19
Chapter 1 Script Editor Overview
Saving the Script

How to add a comment in a Properties dialog box

Step 1 Right-click the node and choose Properties from the shortcut menu. The
Properties dialog box appears.
Step 2 Click the Comment tab. (The Announcement node’s Properties dialog box
Comment tab is shown below.)

Step 3 Enter the text you want displayed in the node and choose how you want the text
justified within the node by clicking one of the nine alignment boxes. (Vertically,
you can justify the text to the top, bottom, or center of the node. Horizontally, you
can justify the text to the left, right, or center of the node.)
Step 4 Click OK to return to the script window workspace. The text you entered now
appears in the node, centered both vertically and horizontally, in place of the
announcement name.

Cisco ICM Software Script Editor Guide


1-20 78-11590-04
Chapter 1 Script Editor Overview
Saving the Script

Adding Comments Using the Comment Object


Occasionally, you might want to add a general comment to the script; for example,
a comment that describes the purpose of the entire script rather than just a single
node. You would use the Comment object on the object palette’s General tab to
specify such text.

How to add a general comment

Step 1 Drag the Comment object from the object palette’s General tab to where you want
the comment to appear in the script. A comment “note” appears.

Step 2 Right-click the comment and choose Properties from the shortcut menu. The
Comment Properties dialog box appears.

Step 3 Enter the text you want to appear in the comment.

Cisco ICM Software Script Editor Guide


78-11590-04 1-21
Chapter 1 Script Editor Overview
Exiting the Script Editor

Step 4 Click one of the three justification buttons to indicate that the text be
left-justified, centered, or right-justified. If you want the height of the comment
object to be automatically adjusted to the length of the text, choose Auto-Size
Height. Otherwise, you can adjust the height by sizing the comment with the
mouse.
Step 5 Click OK to return to the script window. The text you entered appears in the
comment object.

Exiting the Script Editor


When you have finished editing, validating, and saving the script, exit the Script
Editor.

How to exit the Script Editor

Within the Script Editor, select File > Exit. If you have any unsaved changes, the
Script Editor prompts you to save the changes.

Cisco ICM Software Script Editor Guide


1-22 78-11590-04

You might also like