You are on page 1of 814

297-2183-930

Nortel Contact Center Manager


Scripting Guide for Communication Server 1000/Meridian 1
PBX

Product release 6.0 Standard 8.05 December 2007


Nortel Contact Center Manager Scripting Guide for
Communication Server 1000/Meridian 1 PBX

Publication number: 297-2183-930


Product release: 6.0
Document release: Standard 8.05
Date: December 2007

Copyright © 2006 Nortel Networks. All Rights Reserved.

Information is subject to change without notice. Nortel Networks reserves the right to make changes
in design or components as progress in engineering and manufacturing may warrant.

The process of transmitting data and call messaging between the Meridian 1 PBX and Contact
Center Manager is proprietary to Nortel Networks. Any other use of the data and the transmission
process is a violation of the user license unless specifically authorized in writing by Nortel Networks
prior to such use. Violations of the license by alternative usage of any portion of this process or the
related hardware constitutes grounds for an immediate termination of the license and Nortel
Networks reserves the right to seek all allowable remedies for such breach.

This page and the following page are considered the title page, and contain Nortel Networks and
third-party trademarks.

*Nortel Networks, Nortel, Nortel (Logo), the Globemark, CallPilot, IVR, Meridian, Meridian 1 PBX,
Meridian Mail, Optivity, Communication Server, and Symposium are trademarks of Nortel.
CRYSTAL REPORTS is a trademark of Crystal Decisions, Inc.
MICROSOFT, MICROSOFT ACCESS, WINDOWS, WINDOWS NT, and WINDOWS XP are
trademarks of Microsoft Corporation.
SYBASE is a trademark of Sybase, Inc.
Contents

1 Getting started 13
New in this release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
How to use this guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Skills you need . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Related documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
How to get help. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

2 Understanding and planning your scripts 25


Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Using scripts in your contact center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
How call routing and call treatment work . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Types of scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Script building blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Planning your scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Scripting tools and procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

3 Scripting rules and conventions 55


Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Script formatting conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Script naming guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Script rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
General scriptwriting tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Guidelines for providing feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Scriptwriting tips for specific commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Script example using formatting conventions and rules. . . . . . . . . . . . . . . . . 87
Opening the scripting tool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

4 Working with script variables 99


Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Starting the Script Variables tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Types of variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Creating script variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

Scripting Guide for Communication Server 1000/Meridian 1 PBX v


Contents Standard 8.05

Checking variables for referencing scripts . . . . . . . . . . . . . . . . . . . . . . . . . . 117


Changing script variable properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Copying script variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Deleting script variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Printing script variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

5 Creating and administering scripts 139


Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Section A: Creating and editing scripts 141
Creating new scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Editing scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Adding script elements to scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Saving changes to scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Opening Web Scripts Editor in a new window. . . . . . . . . . . . . . . . . . . . . . . 158
Using text find and replace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Using character count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Section B: Importing and exporting scripts 167
Importing scripts into Contact Center Manager . . . . . . . . . . . . . . . . . . . . . . 168
Exporting scripts to a remote location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Section C: Administering scripts 175
Validating scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Activating and deactivating scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Deactivating scripts with circular dependencies. . . . . . . . . . . . . . . . . . . . . . 186
Renaming scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Deleting scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

6 Basic script commands 193


Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Section A: Basic general commands 195
ASSIGN TO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
EXECUTE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
EXECUTE SCRIPT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
IF-THEN-END IF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
IF-THEN-ELSE-END IF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
QUIT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
SECTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
WAIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206

vi Contact Center Manager


December 2007 Contents

Section B: Basic contact processing commands 209


CHANGE PRIORITY IN AGENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
CHANGE PRIORITY IN SKILLSET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
DISCONNECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
GIVE BUSY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
GIVE MUSIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
GIVE OVERFLOW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
GIVE RAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
GIVE RINGBACK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
GIVE SILENCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
QUEUE TO AGENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
QUEUE TO SKILLSET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
REMOVE FROM AGENT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
REMOVE FROM SKILLSET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
ROUTE CALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

7 Advanced script commands 245


Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
EVENT HANDLER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
LOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
READVAR and SAVEVAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
WHERE-EQUALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261

8 Networking commands 267


Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Section A: Network ACD routing 277
CHANGE PRIORITY IN NACD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
QUEUE TO NACD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
REMOVE FROM NACD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Section B: Network Skill-Based Routing 285
CHANGE PRIORITY IN NETWORK SKILLSET . . . . . . . . . . . . . . . . . . 286
QUEUE TO NETWORK SKILLSET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
REMOVE FROM NETWORK SKILLSET . . . . . . . . . . . . . . . . . . . . . . . . 290

9 Voice processing commands 293


Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Choosing the most efficient commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Section A: Basic IVR 301

Scripting Guide for Communication Server 1000/Meridian 1 PBX vii


Contents Standard 8.05

GIVE IVR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302


Section B: Voice session commands 305
COLLECT DIGITS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
OPEN VOICE SESSION and END VOICE SESSION . . . . . . . . . . . . . . . 309
PLAY PROMPT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Section C: Broadcast announcements 319
GIVE CONTROLLED BROADCAST ANNOUNCEMENT . . . . . . . . . . . 320

10 Host Data Exchange commands 327


Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
SEND INFO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
SEND REQUEST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
GET RESPONSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Database Integration Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339

11 Intrinsics 343
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
Examples of intrinsics use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
Section A: Skillset intrinsics 349
Overview of skillset intrinsics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
ANSWERED COUNT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
AVERAGE SPEED ANSWER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
EXPECTED WAIT TIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
IDLE AGENT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
IDLE AGENT COUNT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
LOGGED AGENT COUNT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
LOGGED OUT AGENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
LONGEST IDLE AGENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
MOST LOGGED AGENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
OLDEST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
OUT OF SERVICE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
POSITION IN QUEUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
PRIORITY IN QUEUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
PRIORITY IN NETWORK QUEUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
QUEUED COUNT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
Section B: Time intrinsics 393
DAY OF WEEK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
DATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396

viii Contact Center Manager


December 2007 Contents

DAY OF MONTH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398


MONTH OF YEAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
TIME OF DAY. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
Section C: Traffic intrinsics 405
CALL RATE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
CONTACT RATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
TOTAL ACTIVE CALLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
TOTAL ACTIVE CONTACTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
Section D: Call intrinsics 411
AGE OF CALL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412
CALL FORWARD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
CALL FORWARD BUSY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
CALL FORWARD DO NOT DISTURB. . . . . . . . . . . . . . . . . . . . . . . . . . . 415
CALL FORWARD NO ANSWER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
CDN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
CLID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
CONFERENCED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
DIALED DN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
Transferring calls with the dialed DN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
DIRECT CALL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
DNIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
INTERNATIONAL CALL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
LOC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
NETWORK CALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
NPA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
NXX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
NPANXX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
ON HOLD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
QUEUED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
ROUTE NUMBER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
TRANSFERRED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
Section E: Open Queue Intrinsics 441
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
AGE OF CONTACT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
CONTACT DATA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
CONTACT TYPE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
ROUTE POINT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450
URI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453

Scripting Guide for Communication Server 1000/Meridian 1 PBX ix


Contents Standard 8.05

12 Script expressions 455


Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
Logical expressions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
Mathematical expressions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460
Relational expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
Order of operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466

13 Applications 467
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
Applications and application thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469

14 Using sample scripts 479


Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480
Section A: Getting started with sample scripts 481
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482
Creating the initial scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
Editing the master script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
Section B: Common scripts 493
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
c_Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
c_Basic_Backup_Skillset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
c_Emergency_Boolean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
c_Emergency_Skillset_Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
c_Excess_Call_Volume_Give_Busy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
c_Expected_Wait_Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509
c_Forced_Announcement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514
c_Holiday_Broadcast_Announcement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516
c_Priority_in_Queue_DNIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
Section C: Network Skill-Based Routing scripts 523
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524
c_NSBR_Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525
c_NSBR_Primary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527
c_NSBR_Distribution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530
c_Network. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532
Section D: Nodal Routing examples 533
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534
c_Master_Handles_Call_Transfers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535
c_Master_with_Exception_Checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537

x Contact Center Manager


December 2007 Contents

c_Master_with_Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
c_Primary_One . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543
c_Primary_Two . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544
c_Primary_Three . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545
c_Primary_Four . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546
c_Primary_Five. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547
c_Common_Secondary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548

A Troubleshooting 551
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552
Script execution problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553
Voice processing problems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556
Networking problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561
Phantom calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563
Validation errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565
Validation option rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579

B Scripting keywords 583


Reserved keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584

C Using HDX 597


Using Provider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598

D Scripting for Multimedia and Outbound 615


Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616
Using Multimedia Contact Intrinsics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617
%AGENT%AGENT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618
%DATE%DATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620
%INTEGER%WAITTIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622
%PRIORITY%PRIORITY. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624
%SKILLSET%SKILLSET. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625
%TIME%TIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626
CONTACTSUBTYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628
CUSTOMERID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631
CUSTOMFIELD1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632
FROMADDRESS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633
NEXTYEAR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634
QUEUETYPE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636
TOADDRESS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641

Scripting Guide for Communication Server 1000/Meridian 1 PBX xi


Contents Standard 8.05

Recommended scripts for Contact Center Multimedia. . . . . . . . . . . . . . . . . 643


Filtering Real Time Display statistics for rescheduled contacts. . . . . . . . . . 662
Modifying the multimedia scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667

E SIP Contact Center 675


Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676
GIVE IVR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679
Example usage scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688
SIP intrinsics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 700
Configuration guidelines and general scripting considerations . . . . . . . . . . 705
Test script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 710

F Scripting Reference 735


Commands and intrinsics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736

Glossary 757

Index 797

xii Contact Center Manager


Chapter 1

Getting started

In this chapter
New in this release 14
Overview 17
How to use this guide 20
Skills you need 20
Related documents 21
How to get help 23

Scripting Guide for Communication Server 1000/Meridian 1 PBX 13


Getting started Standard 8.05

New in this release

The following sections detail what is new in the Nortel Contact Center Manager
Scripting Guide for Communication Server 1000/Meridian 1 PBX (297-2183-
930) for release 8.5.
„ “Features” on page 14
„ “Other changes” on page 15

Features
See the following sections for information about feature changes:
„ “SIP-enabled Contact Center Manager Server” on page 14
„ “Script Variables window” on page 14
„ “Script Manager” on page 15
„ “New Script Editor window” on page 15
„ “Open Queue” on page 15

SIP-enabled Contact Center Manager Server


Modifications for scripting are required when using a SIP-enabled Contact
Center Manager Server. The SIP changes to scripting affects the following
sections:
„ “GIVE IVR” on page 679
„ “SIP intrinsics” on page 700
„ “Configuration guidelines and general scripting considerations” on page
705

Script Variables window


In the new Script Variables window, you can view all variables in both folder
and grid format, and perform many functions. The Script Variables window
description affects the following sections:
„ “Starting the Script Variables tool” on page 104
„ “Creating script variables” on page 109

14 Contact Center Manager


December 2007 Getting started

„ “Checking variables for referencing scripts” on page 117


„ “Changing script variable properties” on page 119

Script Manager
The Script Manager lists all scripts in a table and provides a Last modified by
filter, which sorts by user name. The Script Manager is described in the
following sections:
„ “Scripting tools and procedures” on page 47
„ “Creating and editing scripts” on page 141
„ “Importing and exporting scripts” on page 167
„ “Administering scripts” on page 175

New Script Editor window


From the new script editor window, you can edit, validate, and activate scripts.
You can also perform the following tasks:
„ “Opening Web Scripts Editor in a new window” on page 158

Open Queue
The Open Queue is a licensed feature that provides seamless integration between
the Contact Center Manager Server, Contact Center Manager Administration,
Contact Center Multimedia, and Communication Control Toolkit products. It
provides workflow, queuing, routing, reporting, and management e-mail,
outbound, Web communications contacts. Open Queue provides a truly
integrated multimedia contact center. The Open Queue feature affects the
following sections:
„ “Open Queue Intrinsics” on page 441

Other changes
See the following sections for information about changes that are not feature-
related.
„ “Additional updates” on page 16

Scripting Guide for Communication Server 1000/Meridian 1 PBX 15


Getting started Standard 8.05

Additional updates
Several intrinsics were changed to reflect the fact they now represent both voice
and video.

The number of call variables that can be defined is increased from 20 to 50.

16 Contact Center Manager


December 2007 Getting started

Overview

The Nortel Contact Center Manager Scripting Guide for Communication Server
1000/Meridian 1 PBX provides an overview of the functions of contact center
scripts and explains the scripting process. The guide describes how to
„ plan the scripts used in your contact center
„ create, modify, and delete script variables
„ create, validate, activate, and delete contact center scripts
„ view applications, and change application thresholds
„ use sample scripts for your contact center

Throughout this guide, the term contact applies to both voice and non-voice
contacts.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 17


Getting started Standard 8.05

How to use this guide

This guide covers the following:


„ understanding and planning your scripts
„ scripting rules and conventions
„ working with script variables
„ creating and administering scripts
„ working with basic and advanced script commands
„ working with networking commands
„ working with voice processing commands
„ working with Host Data Exchange commands
„ working with intrinsics
„ using script expressions
„ script-related applications
„ using sample scripts
„ scripting in Contact Center Multimedia
„ scripting for SIP-enabled Contact Center

This guide includes a detailed table of contents and an index to help you find
specific information or procedures related to scripting. “Where to start in this
guide” on page 19 focuses only on the most common tasks. If the task you want
to perform is not listed, use the table of contents or index to find the information
you need.

18 Contact Center Manager


December 2007 Getting started

Where to start in this guide


The following table describes where to start for common procedures.

If you want to do this Start here

Plan your scripts Chapter 2, “Understanding and


planning your scripts.”

Work with script variables Chapter 4, “Working with script


variables.”

Create or manage scripts Chapter 5, “Creating and


administering scripts.”

Use script related applications Chapter 13, “Applications.”


Use sample scripts Chapter 14, “Using sample scripts.”

Use scripting in Contact Center Appendix D, “Scripting for


Multimedia Multimedia and Outbound.”

Use scripting in SIP-enabled Appendix E, “SIP Contact Center.”


Contact Centers

Scripting Guide for Communication Server 1000/Meridian 1 PBX 19


Getting started Standard 8.05

Skills you need

This guide is intended for individuals responsible for designing, writing, and
maintaining the scripts used in Contact Center Manager.

This section describes the skills and knowledge you need to use this guide
effectively.

Nortel product knowledge


Knowledge of, or experience with, the following Nortel products is helpful
when you create scripts for Contact Center Manager:
„ Contact Center Manager
„ Communication Server 1000 or Meridian 1 PBX
Unless otherwise specified, references in this guide to the Communication
Server 1000 are applicable also to the Meridian 1 PBX switch.
„ Communication Server 1000/MCS 5100 + Media Application Server
switch (For SIP-enabled contact centers only)

PC experience or knowledge
Knowledge of, or experience with Windows Server 2003 is helpful when you
administer Contact Center Manager.

Other experience or knowledge


Other experience or knowledge that can be of use include:
„ programming
„ flowcharting
„ analytical skills
„ contact center operations and contact-routing requirements

20 Contact Center Manager


December 2007 Getting started

Related documents

The following guides are available on the Contact Center portfolio DVD or on
the Nortel Web site (www.nortel.com).

For information about Refer to NTP number

Planning and Contact Center Planning and 297-2183-934


engineering guidelines, Engineering Guide
and server requirements
Contact Center Manager CapTool 297-2183-935
User’s Guide

Server requirements Contact Center Server and Operating 297-2183-263


System Requirements Guide

The Contact Center Contact Center What is New in 297-2183-903


portfolio Release 6.0

Switch configuration Contact Center Communication 297-2183-931


Server 1000/Meridian 1 and Voice
Processing Guide

SIP Contact Center Switch 297-2183-962


Configuration Guide

Contact Center 6.0 Security Guide


Contact Center Portfolio Service
Packs Compatibility and Security
Hotfixes Applicability List

Installation, upgrades, Contact Center Manager Server 297-2183-925


migration, and Installation and Maintenance Guide
maintenance
Contact Center Manager 297-2183-926
Administration Installation and
Maintenance Guide

Scripting Guide for Communication Server 1000/Meridian 1 PBX 21


Getting started Standard 8.05

For information about Refer to NTP number

Nortel Media Application Server 297-2183-227


Installation and Configuration Guide
for Contact Center 6.0

Scripting Contact Center Manager Scripting 297-2183-930


Guide for Communication Server
1000/Meridian 1 PBX

Contact Center Manager Database 297-2183-940


Integration User Guide
Administering contact Contact Center Manager 297-2183-927
centers Administrator’s Guide

Handling contacts Contact Center Agent Desktop User 297-2183-945


Guide

CallPilot Application Builder Guide

Programming Host Data Exchange API


Programmer’s Guide

22 Contact Center Manager


December 2007 Getting started

How to get help

This section explains how to get help for Nortel products and services. However,
before contacting Nortel for support, see “Troubleshooting” on page 551 of this
guide.

Finding the latest updates on the Nortel Web site


The content of this documentation was current at the time the product was
released. To check for updates to the latest documentation and software for
Contact Center 6.0, click one of the following links:

Link to Takes you directly to

Latest software The Nortel page for Contact Center located at http://
www.nortel.com/espl.
Latest documentation The Nortel page for Contact Center documentation
located at http://www.nortel.com/helmsman.

Getting help from the Nortel Web site


The best way to get technical support for Nortel products is the Nortel Technical
Support Web site:

www.nortel.com/support

This site provides quick access to software, documentation, bulletins, and tools
to address issues with Nortel products. From this site, you can:
„ download software and related tools
„ download technical documents, release notes, and product bulletins
„ sign up for automatic notification of new software and documentation
„ search the Technical Support Web site and Nortel Knowledge Base for
answers to technical issues
„ open and manage technical support cases

Scripting Guide for Communication Server 1000/Meridian 1 PBX 23


Getting started Standard 8.05

Getting help over the phone from a Nortel Solutions Center


If you do not find the information you require on the Nortel Technical Support
Web site, and you have a Nortel support contract, you can also get help over the
phone from a Nortel Solutions Center.

In North America, call 1-800-4NORTEL (1-800-466-7835).

Outside North America, go to the Web site below to obtain the phone number for
your region:

http://www.nortel.com/callus

Getting help from a specialist by using an Express Routing Code


You can use an Express Routing Code (ERC) to more quickly route your call to
the appropriate support specialist. To locate the ERC for your product or service,
go to:

http://www.nortel.com/erc

Getting help through a Nortel distributor or reseller


If you purchased a service contract for your Nortel product from a distributor or
authorized reseller, you can contact the technical support staff for that distributor
or reseller.

24 Contact Center Manager


Chapter 2

Understanding and planning your


scripts

In this chapter
Overview 26
Using scripts in your contact center 27
How call routing and call treatment work 29
Types of scripts 33
Script building blocks 37
Planning your scripts 40
Scripting tools and procedures 47

Scripting Guide for Communication Server 1000/Meridian 1 PBX 25


Understanding and planning your scripts Standard 8.05

Overview

A script is an application that contains instructions that determine the sequence


of steps that a contact follows after the contact arrives at Contact Center
Manager. These steps include call treatments (such as music or ringback), call
routing (such as skill-based routing), or interaction with the caller.

Scripts perform two major functions: they define the path a contact follows, and
they provide treatments to a contact as the contact moves through Contact
Center Manager. Scripts are also used by the Contact Center Manager Server to
track and record information about each step in a contact’s progress. You can use
this information to analyze how your contact center is functioning and decide
how to improve service.

26 Contact Center Manager


December 2007 Understanding and planning your scripts

Using scripts in your contact center

To use scripts effectively, you must understand the objectives of the contact
center. Generally, a contact center has three major objectives:
„ maximize contact center efficiency
„ maximize user satisfaction
„ analyze your contact center performance, and decide on how to improve
service

Maximize contact center efficiency


To maximize the efficiency of your contact center, you must accomplish the
following goals:
„ increase productivity
„ improve service
„ decrease costs
„ handle unusual situations

In an efficient contact center, agents process contacts that they are qualified to
handle. You must design a script so that incoming contacts are presented to the
agents who are best prepared to deal with the requirements of the contact.
Matching contacts with a qualified agent is the basis for skill-based routing:
determine a contact’s requirements and route the contact to an agent who has the
knowledge to deal with it effectively.

Contacts must reach an agent as soon as possible to:


„ prevent the contact from disconnecting while waiting in a queue
„ ensure agents spend as little time as possible waiting to answer contacts

When both conditions are met for all contact types, costs decrease and profits
increase.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 27


Understanding and planning your scripts Standard 8.05

Occasionally, an incoming contact does not follow the path specified in the
script; for example, if a voice contact is returned to the queue or is disconnected.
Design scripts to prevent such situations or to deal with them if they do occur.
You must consider unexpected conditions and use scripting tools to resolve
them.

Maximize user satisfaction


You must route all contacts to a qualified agent immediately unless a call back
time is specified (such as for outbound or e-mail contacts). However, because of
large call volumes and a limited number of agents, this is not always possible.
Try to reduce the amount of time each contact waits in a queue.

User satisfaction is extremely important. For example, voice contacts waiting in


a queue do not want to hear silence until their call is answered. They want to
know what is happening to their call. If callers doubt that their call is being
handled properly, they may disconnect.

Prioritizing contacts based on contact importance ensures maximum user


satisfaction; however, for voice contacts, you can also:
„ give selection options to contacts while they wait in a queue
„ tell contacts how long they can expect to wait in a queue
„ inform contacts of their position in a queue
„ allow contacts to speak with an agent of their choice
„ allow contacts to speak with an agent in the language of their choice

Use well-designed scripts to accomplish these tasks.

Track and report on contact information


Use scripts to track contact-related information and store it in a database for
future analysis. If scripts are well designed, tracking contact data uses minimal
system resources. Take time to plan and design your scripts to track the
information you need. You can use this information later in reports that help you
analyze how your contact center functions, and to decide how to improve
service. For example, you may want to know the average amount of time agents
spend answering contacts or the number of abandoned contacts.

28 Contact Center Manager


December 2007 Understanding and planning your scripts

How call routing and call treatment work

Specific scripts run when certain types of contacts enter Contact Center
Manager. These scripts must recognize contact requirements and route the
contacts to an agent who can deal effectively with these requirements.

As a script designer, you must write scripts to ensure that contacts are routed to
the qualified agents as quickly as possible. A contact is not always answered
immediately by an agent. However, you can provide treatments to the voice
contacts while they wait in a queue. These treatments can include telling callers
the estimated amount of time before their call is answered, or playing music to
callers while they wait in a queue.

Call routing and call treatment methods


You can route calls by queuing them to:
„ specific or multiple skillsets
„ specific agents
„ other contact center destinations
„ other sites

Examples of call treatments provided to voice contacts include:


„ music
„ ringback tones
„ silence
„ recorded announcements (RAN)
„ voice menu options
„ the option to access automated information
„ the expected wait time in a queue

Scripting Guide for Communication Server 1000/Meridian 1 PBX 29


Understanding and planning your scripts Standard 8.05

The process of call routing and providing call treatment


When a contact enters Contact Center Manager, the contact starts running the
master script. Typically, the master script routes contacts and provides
treatments based on the incoming contact information. The master script directs
the contact to primary scripts based on this information. For example, if a calling
line identification (CLID) number for a voice contact is determined to be on the
list of VIP callers, the call can be queued to an agent or skillset reserved for calls
requiring preferential treatment.

Additionally, such items as time of day, day of the week, date, or contact center
activity are used to determine how the contact is handled.

Example of voice contact routing


The following illustration shows how a typical voice contact is handled when it
enters a contact center. The text following the illustration explains what happens
at each step in the call flow process.

30 Contact Center Manager


December 2007 Understanding and planning your scripts

1. The incoming voice contact arrives at the switch, where it is directed to a


controlled directory number (CDN). The switch sends a notification about
the voice contact to Contact Center Manager.
2. Contact Center Manager takes control of the voice contact. The voice
contact begins to follow the path specified in the master script. The master
script determines the contact type based on dialed number identification
service (DNIS), CLID, and other information, and directs the voice contact
to a primary script.
In this example, the master script determines that this is a sales voice
contact. The voice contact is directed to the primary script Sales.
3. The primary script can now provide treatments to the voice contact: the
voice contact can be queued to a skillset, or the voice contact can be
directed to a secondary script.
In this example, the primary script determines that the caller is interested in
hardware sales. The primary script directs the voice contact to the
secondary script Hardware Sales.
4. The secondary script can provide additional treatments to the voice contact:
the voice contact can be queued to the appropriate skillset or, if necessary, it
can be directed to another secondary script.
In this example, the secondary script determines that the caller is interested
in purchasing a notebook computer. The primary script queues the voice
contact to the skillset Notebooks.
5. When an agent in the skillset Notebooks is available, the voice contact is
presented to the agent.
In this example, the voice contact is presented to either Agent 155 or Agent
160, both of whom have the Notebooks skillsets. The voice contact is
presented to the first agent available to handle the voice contact.

What happens if a contact is not queued?


You can take steps to ensure that contacts are queued to the appropriate skillset.
If a contact is not queued to a skillset or to a specific agent when the contact
reaches the end of the script, you can ensure that the contact is queued to a
default skillset.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 31


Understanding and planning your scripts Standard 8.05

For example, for a voice contact, if the default skillset is out of service, you can
inform the contact of this by using a recorded announcement (default RAN) or
predefined message. After the announcement, the contact is queued to the
default automatic call distribution directory number (ACD-DN) of the CDN.

For multimedia contacts, ensure that the contact is queued until the skillset
becomes staffed or until the age of the contact intrinsic is greater than the
acceptable limit.

For information about queuing contacts to a default skillset or configuring


default RANs, see the Contact Center Manager Administration online Help.

32 Contact Center Manager


December 2007 Understanding and planning your scripts

Types of scripts

All Contact Center Manager scripts belong to one of three types:


„ system-defined
„ master

„ network

„ user-defined
„ primary

„ secondary

„ sample

System-defined scripts
The master and network scripts are system-defined, which means that they are
provided with Contact Center Manager.

Master script
The master script (Master_Script) is the central point of entry for every contact
that enters Contact Center Manager. The Master script is system-defined—that
is, it comes with Contact Center Manager, and it cannot be deactivated,
renamed, or deleted. However, you can change its contents to suit your contact
center needs and update the master script. The master script performs the
following functions:
„ It directs incoming contacts to primary scripts based on conditions such as
the DNIS, CLID, time of day, contact type, or other criteria that you
choose.
„ It schedules scripts and invokes primary scripts according to contact center
conditions in real time.

Network script
If you purchased the Network Skill-Based Routing feature, you also have a
network script. This script is used as the master script for network contacts that
return to the queue after they are forwarded between sites in a multisite contact
center.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 33


Understanding and planning your scripts Standard 8.05

Subscripts for the network script do not generate call statistics; therefore,
incoming call statistics are collected only from the Network_Script. You can use
these statistics in reports to track and record information about each step in the
progress of a call.

User-defined scripts
Primary and secondary scripts are user-defined, which means that they are not
provided with Contact Center Manager. If you are a Contact Center Manager
desktop user with the appropriate privileges, you can create, change, or delete
these scripts on the system.

Primary and secondary scripts


A primary script is executed or referenced in the master script to perform a
specific function. Primary scripts contain sets of instructions that relate to a
particular type of contact (sales) or user (nuisance), or to a set of conditions
(time of day or day of the week). A primary script can route contacts to
appropriately skilled agents, or it can send the routing control to a secondary
script.
A secondary script is any script that is referenced from a primary script or any
other secondary script. For example, consider the following situation.

Example of referenced scripts for a voice contact


In this example, a caller is interested in purchasing a notebook computer from a
computer retailer. You place commands in the master script that direct the voice
contact to a primary sales script. You use conditional tests written into the sales
script to determine if the caller intends to purchase a notebook. The sales script
then directs the voice contact to a secondary script, notebook sales. If
conditional tests written into the notebook sales script determine that the caller
intends to purchase a notebook from a specific vendor, the voice contact is
directed to another secondary script (for example, Vendor_Name_Sales). This
script then sends the voice contact to an agent qualified to deal with the
notebook products from a specific vendor.

For information about how scripts reference each other, see the following
illustrations. Referencing scripts (also known as branching), as shown in the first
illustration, are often referred to as trees.

34 Contact Center Manager


December 2007 Understanding and planning your scripts

A script can be referenced from many scripts; that is, several scripts can branch
to the same script (for example, the referenced script performs a function
required by many other scripts). When this happens, the complicated structure is
called a web, as shown in the following illustration.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 35


Understanding and planning your scripts Standard 8.05

Master_Script: Master_Script: Master_Script:


... ... ...
Execute Script A Execute Script A Execute Script A
... ... ...

A: A: A: A:
... ... ... ...
Execute Script A Execute Script B Execute Script B Execute Script
... ... ... Master_Script
Execute Script B
...

Not OK B: B: B:
... ... ...
Execute Script A Execute Script Execute Script A
... Master_Script ...
...

OK OK OK

Sample scripts
Sample scripts are provided with Contact Center Manager Administration as text
files. They help you create scripts for typical contact center situations. You can
import or copy the contents of these scripts to help you create your own scripts.

You access the sample scripts through the Import dialog box in the Scripting
component of Contact Center Manager Administration. The Import dialog box
has two importing options:
„ importing from the sample scripts directory on the Contact Center Manager
Administration server
„ importing a saved script file on the client computer or the network

There is no sample scripts directory on the client computer. The sample scripts
previously available on the client computer by using the Classic Client are now
available through the Import dialog box in the Scripting component of Contact
Center Manager Administration.

For information about the sample scripts contained in these directories, see
“Using sample scripts” on page 479.

36 Contact Center Manager


December 2007 Understanding and planning your scripts

Script building blocks

Scripts contain the instructions that tell Contact Center Manager how to process
incoming contacts. These instructions consist of commands, scripting keywords
and parameters (some of which are optional), and expressions.

Commands
Commands perform distinct functions. For example, scripts route a contact to a
specific destination, play music or recorded announcements, or disconnect a
contact. Commands consist of combinations of intrinsics, constants, variables,
and expressions.

Intrinsics
Intrinsics are words or phrases that you use in scripts to represent a value or a set
of values about the Contact Center Manager system. Intrinsics contain system-
wide information about skillsets, agents, time, and call traffic. Use intrinsics to
access system information, which is then used in formulas and decision-making
statements.

Example
In the following section of a script, the intrinsic AVERAGE SPEED ANSWER
checks whether contacts are answered more quickly, on average, by the support
skillset than by the service skillset. If they are, incoming contacts are queued to
the support skillset.
IF (AVERAGE SPEED ANSWER support_sk < AVERAGE SPEED ANSWER
service_sk) THEN
QUEUE TO SKILLSET support_sk
WAIT 2
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 37


Understanding and planning your scripts Standard 8.05

Variables
Script variables are user-defined words that you can insert in a script in place of
a value or a set of values. There are three types of variables:
„ Global variables are script variables that you can use in any script on the
system.

Example
Create a variable named business_hours_gv and assign the values 08:00..
17:00 to that variable. You can then use this variable in several scripts,
updating them all at one time (for example, if you change hours of
operation) by updating the variable.
„ Call variables are script variables with a value that can change for each
contact. These variables follow the contact through the system and are
passed from one script to another with the contact.

Example
Create a loop counter where you give a RAN to a voice contact every fourth
time around the loop. When the call variable changes to the value 4, the
loop plays the RAN.
„ Wild variables are integer call variables that encounter a READVAR/
SAVEVAR command. The value of the wild variable can then be accessed
by other scripts to execute further commands.

Example
Write a script that uses a call variable to change a wild variable. You can use
another script with the READVAR command to check the value of the wild
variable, and then perform an action. For example, disconnect a call if the
wild variable is of a certain value.

Tip: To help you identify types of variables when you write and edit your
scripts, include information about the variable type in its name. For
example, you can name a global variable for a greeting RAN
greeting_ran_gv, or you can name a call variable for contact-entered data
caller_data_cv, and you can precede wild variables with wv_.

For information about variables, see “Working with script variables” on page 99.

38 Contact Center Manager


December 2007 Understanding and planning your scripts

Expressions
Contact Center Manager uses expressions to create and compare data. To create
custom calculations for comparing known facts with conditional situations, you
can use mathematical expressions such as addition (+), subtraction (–), division
(/), and multiplication (*); logical conjunctions such as AND, OR, and NOT; and
comparisons such as less than (<), greater than (>), less than or equal to (< =),
greater than or equal to (> =), and not equal to (< >).

Example
In the following section of a script, the number of voice contacts waiting for the
sales skillset is compared to the number of agents logged on to that skillset. In
this case, if the number of voice contacts is three times larger than the number of
agents, the caller is sent an announcement stating that heavy call volumes can
delay providing service to the voice contact.
IF (QUEUED COUNT sales_sk) > (3* LOGGED AGENT COUNT sales_sk) THEN
GIVE RAN long_delay_ran_gv
END IF

Skillsets
A skillset is an area of expertise possessed by an agent or a group of agents that
corresponds to a specific contact type. Skillsets match a contact’s specific
requirements with the agents who are best prepared to meet their needs. For
example, if you expect your contact center to receive contacts requesting
information about servicing notebook computers, create a skillset (such as
skillset notebook_service_sk), and assign agents to this skillset who know about
servicing notebook computers.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 39


Understanding and planning your scripts Standard 8.05

Planning your scripts

An efficient contact center successfully matches contacts and their specific


requirements with qualified agents. If you know what the types of users contact
your contact center, and the specific information or services they require, then
you can write effective scripts.

Scriptwriting process
The following flowchart shows an overview of the scriptwriting process.

Determine the Define


types of calls Compose the Test the
the script script script
to be dealt with objective
in your call
center

Identify the Validate the Review the


Match available
call types with script results
resources
agent skillsets
(skill-based
routing)
Chart the Correct any Print and
call routing/ validation file the
treatment errors script
process

Identify and
create any Activate the
needed script
variables

Determine the types of contacts entering your contact center


After you determine the types of contacts entering your contact center, you can
create skillsets that correspond to these contact types and assign agents to the
skillsets.

40 Contact Center Manager


December 2007 Understanding and planning your scripts

Understand skill-based routing


The concept of matching qualified agents with related contact types is the basis
for skill-based routing. You must be able to match the contact’s requirements
with an agent who can meet the contact’s requirements. At the same time, you
must be aware of when to provide treatments to contacts and how contact
information is tracked. When you understand these issues, you can write
efficient scripts.

Define the script objective


Each script should meet an objective of your contact center. You may require the
script to perform one or more functions. Determine the purpose of the script (for
example, routing a specific contact to a specific agent). Remember that each
script can be referenced by, or can reference, other scripts. Consider the
following questions:
„ What kinds of scripts do you need for your system?
„ How many scripts do you need to meet these requirements?
„ How do the scripts interact with one another?

To help plan your scripts, you can create a flowchart or an illustration to outline
the logic of the script (for example, a script tree or web). A flowchart helps you
visualize the sequence of steps that a contact follows after it enters Contact
Center Manager. You can also use a flowchart to determine when you send
treatments to the voice contact and when you can collect data for reporting.

Identify the available resources


Contact Center Manager includes resources that you can use in your scripts to
control what happens to a call when it enters the contact center. Knowing about
these resources and how they work together helps you to design a logical path
that calls follow. Before you write scripts, you must be familiar with the
following resources:
„ CDNs
„ RAN routes
„ music routes

Scripting Guide for Communication Server 1000/Meridian 1 PBX 41


Understanding and planning your scripts Standard 8.05

„ skillsets
„ number of agents in each skillset
„ contact center working hours and holidays
„ IVR queues
„ call treatments
„ CLIDs and DNISs
„ CallPilot and Meridian Mail
„ Media Application Server (MAS)

Your contact center administrator has this information or, for information about
setting up these resources, see the following documents:
„ Nortel Contact Center Manager Administrator’s Guide
„ Contact Center, Communication Server 1000/Meridian 1 and Voice
Processing Guide
„ Contact Center Manager Administration online help

Chart the call routing process

Create a flowchart
You can create a flowchart that illustrates the call routing and call treatment
process. The flowchart on page 44 shows an example of call routing and call
treatment. The following text explains the call process.

A voice contact arrives at the switch and is sent to Contact Center Manager. The
voice contact moves through the master script and arrives at either the primary or
a secondary script (depending on how the master script is written).

The script first checks to see if agents are available in the requested skillets to
answer the voice contact. If not, the voice contact is disconnected.

The script then checks to see if the voice contact is on the list of VIP voice
contacts. If so, the voice contact is given preferential treatment. If not, a test
determines if there are more than twice as many voice contacts queued as there
are agents logged on to the preferred skillset (skillset A). If so, the caller receives
a busy tone. If there are fewer than twice as many voice contacts queued as there
are agents logged on to skillset A, the voice contact is queued to skillset A.

42 Contact Center Manager


December 2007 Understanding and planning your scripts

After the voice contact is queued to skillset A, the script performs conditional
tests and treatments to the voice contact until it is answered.

Are
all skillsets YES Execute Give RAN
out of Disconnect
Night_Treatment closed
service?

NO

Is the
CLID in the YES Execute Queue to skillset A Give RAN
VIP_list Special_Handling with priority 1 special_ran
variable?

NO
YES Give Music
Give Busy Classical
Are
there more
than twice as
many calls as agents
logged in to Execute
Quit
skillset Night_Treatment
A?
NO
NO
Is Is
the call YES the call YES Change priority
Queue to skillset A more than in skillset A to
with priority 3 still in the
queue? 2 minutes priority 1
old?

NO

Wait 6 seconds Execute Queue to skillset B


Wait 20 seconds
Check_Age with priority 3

Give RAN Give Music Give RAN


QUIT
agents_busy Classical agents_still_busy

Scripting Guide for Communication Server 1000/Meridian 1 PBX 43


Understanding and planning your scripts Standard 8.05

To see the sample script that this flowchart represents and a detailed explanation
of the call routing process, see “Script example using formatting conventions
and rules” on page 87.

Describe in writing
If you graphically plan the logic of a script and know its intended function, you
can write the script before you create it in the Web Scripts Editor (for
information about the Web Scripts Editor, see “Web Scripts Editor” on page 48).

Identify and create needed variables


A variable is a placeholder that stores a value or a set of values. For example,
you can create a variable named holidays_gv to store information about the days
when your contact center is closed. You use variables to test for conditions that
affect the treatments given to the contact or the data (both call information and
user-entered data) collected from a contact as it moves through Contact Center
Manager. You must define all your variables before you write your scripts. If
you define a variable that is not used in any script, delete the variable.

For information about variables, see “Working with script variables” on page 99.

Compose scripts
To compose a script, you follow a four-part process:
„ compose the script in the Web Scripts Editor
„ validate the script
„ activate the script
„ test the script

For information about composing scripts, see “Scripting tools and procedures”
on page 47.

Script maintenance and system processing power


If you create several primary scripts that perform a similar function, maintaining
these scripts can be time-consuming. Each script includes many script elements
common to all scripts. If you modify a script element that is common to all the
scripts, you must edit and then reactivate each script.

44 Contact Center Manager


December 2007 Understanding and planning your scripts

As an efficient alternative, consider combining all common elements in one


secondary script, and use multiple primary scripts to define unique call
variables.

For example, if your contact center receives three types of contacts—sales,


service, and support—create three primary scripts and one common secondary
script to handle these contact types. The three primary scripts define call
variables associated with each contact type (sales, service, or support). The
secondary script contains all routing instructions and treatments common to
each contact type.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 45


Understanding and planning your scripts Standard 8.05

Example
The following illustration shows a master script referencing three primary
scripts that direct voice contacts to a common secondary script. In the example,
the three primary scripts (sales_sk, service_sk, and support_sk) define the call
variables delay_cv, skillset_cv, and RAN_cv. The value of the CDN tested in the
master script determines which primary script executes. After the call variables
are defined in the primary script, the secondary script, common, is executed
using the values assigned in the primary script.

Master_Script
...
WHERE CDN EQUALS
VALUE 4162357001: EXECUTE SCRIPT sales_sk
VALUE 4162357002: EXECUTE SCRIPT service_sk
VALUE 4162357003: EXECUTE SCRIPT support_sk
DEFAULT: EXECUTE SCRIPT sales_sk
END WHERE
...

sales_sk service_sk support_sk


... ... ...
ASSIGN 4 TO delay_cv ASSIGN 8 TO delay_cv ASSIGN 10 TO delay_cv
ASSIGN sales_sk TO skillset_cv ASSIGN service_sk TO skillset_cv ASSIGN support_sk TO skillset_cv
ASSIGN sales_RAN_gv TO RAN_cv ASSIGN service_RAN_gv TO RAN_cv ASSIGN support_RAN_gv TO RAN_cv
EXECUTE SCRIPT common EXECUTE SCRIPT common EXECUTE SCRIPT common

common
...
QUEUE TO SKILLSET skillset_cv
WAIT 2
SECTION loop
WAIT delay_cv
IF NOT QUEUED THEN
EXECUTE jump_out
END IF
GIVE RAN RAN _cv
EXECUTE loop
SECTION jump_out
GIVE RAN sorry_closed_RAN_gv
DISCONNECT

46 Contact Center Manager


December 2007 Understanding and planning your scripts

Scripting tools and procedures

This section describes the tools that you use to view, create, and edit scripts. This
section also describes script states, validation, and activation.

Viewing, creating, and editing scripts


Use the following tools to view, create, and edit scripts:
„ the Script Manager
„ the Web Scripts Editor
„ the Script Commands Reference

Script Manager
In the Contact Center Manager Administration application, in the Scripting
component, use the Script Manager to list the scripts on the system. From this
window, you can add or remove a script and access the Web Scripts Editor to
change a script.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 47


Understanding and planning your scripts Standard 8.05

Web Scripts Editor


In the Scripting component of the Contact Center Administration application, in
the Web Scripts Editor, you can create, edit, validate, and activate the scripts that
process contacts for your contact center. The Web Scripts Editor has a text-based
editor to customize your scripts. In the Web Scripts Editor, you can import and
export scripts, and copy portions of other scripts into the current script.

Script Commands Reference


From the Web Scripts Editor, you can access the Script Commands Reference,
where you can view and select available script commands, variables, events,
intrinsics, and operators for pasting into scripts. Although you can type
commands into your scripts manually, if you use the Script Command
Reference, all parameters that you must replace are automatically inserted.
Automatically inserting parameters into scripts can reduce errors.

48 Contact Center Manager


December 2007 Understanding and planning your scripts

For information about the building blocks of scripts (commands and


expressions), see the following chapters:
„ Chapter 4, “Working with script variables”
„ Chapter 6, “Basic script commands”
„ Chapter 7, “Advanced script commands”
„ Chapter 11, “Intrinsics”
„ Chapter 12, “Script expressions”

Validation Options dialog box


From the Web Scripts Editor, you can access the Validation Options dialog box.
Use the Validation Options tool to create or edit scripts. Set validation options so
the application sends a message when you break scriptwriting rules. These rules
help eliminate run-time errors that can cause improper routing of contacts in
Contact Center Manager.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 49


Understanding and planning your scripts Standard 8.05

You can configure validation options so you receive a message about broken
scriptwriting rules automatically after you validate a script, or before you edit
and then reactivate an activated script. You can also configure validation options
to display error messages.

For a list of error messages, see Appendix A, “Troubleshooting.”

Configuring validation options


1 From the Web Scripts Editor, choose View > Validation Options.
Result: The Validation Options dialog box appears.

2 Configure validation options by selecting the appropriate check boxes.


3 Click OK.

Disabling validation options


1 From the Web Scripts Editor, choose View > Validation Options.
Result: The Validation Options dialog box appears.
2 Clear the check boxes as necessary.
3 Click OK.

50 Contact Center Manager


December 2007 Understanding and planning your scripts

Script states
A script can have one of three states:
„ Edited
The script is created or edited, and saved, but not validated.
„ Validated
The script syntax is checked for errors, and the script is ready to be acti-
vated.
„ Activated
The script is active in the system.

When you finish writing or updating a script in the Web Scripts Editor, you must
validate and activate it before it can process contacts. When you no longer want
the script to process contacts, you can deactivate it. You can also edit and
reactivate a script that is in the Activated state. Revalidation is performed when
you activate the script.

You can save a script without validating or activating it.

Validation
Before you put a script into service, or activate it, you must ensure that the
syntax and semantics are correct. This process is called validation. If the script
contains no errors, validation produces an executable version of the script. If the
script contains errors, validation produces a list of those errors and the
corresponding lines of the script.

Script validation detects only syntax errors. It cannot detect logic errors.

Activation
An activated script processes contacts. A script must be validated before it is
activated. The system validates a script automatically before it is activated, if
you have not validated the script manually.

If a script is activated but is not referenced by the master script (directly, or


indirectly through other scripts), it does not process contacts.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 51


Understanding and planning your scripts Standard 8.05

Nortel recommends that you avoid activating scripts during busy contact center
periods.

To avoid having to reactivate the master script when you write test scripts, keep a
test CDN and a test primary script activated at all times. Then, edit and change
only the test primary script, not the master script. You can also use other
secondary test scripts. However, Nortel recommends that you make changes
outside busy hours.

Activating secondary scripts


When you activate a script, all scripts that it references are automatically
activated (if they are not already activated). Therefore, you must validate all
referenced scripts before you activate your script. If you do not, activation of
your script fails.

Example
The All_Shift script references the Day_Shift, Night_Shift, and Wkend_Shift
scripts. You must validate all secondary scripts before you can activate the
All_Shift script.

Day_Shift
Night_Shift
All_Shift

Wkend_Shift

The administrator successfully validates each script. When the administrator


activates the All_Shift script, the system automatically activates the Day_Shift,
Night_Shift, and Wkend_Shift scripts.

52 Contact Center Manager


December 2007 Understanding and planning your scripts

Changing an activated script


You can make changes to a script while it is activated. You can immediately
activate the script with the changes, or you can save the script with a new name
and not immediately put the changes into service. If you put the new version of
the script into service immediately, contacts that are already in progress when
the script is changed continue to be handled by the original version of the script.
The updated version of the script processes new contacts.

If an error occurs when the script is activated, the original script is used to
process contacts. You cannot save your changes with the same name as the
currently activated script.

Deactivation
A deactivated script does not process new contacts. If calls already in the system
are using the script when the script is deactivated, the calls are processed by the
script until they are handled by an agent.

You cannot deactivate or delete a script while it is being referenced by another


activated script.

Although you cannot deactivate the master script or the network script, you can
change the contents and activate the new version. Validation is performed when
you activate the script.

Deleting references and scripts


You may not be able to delete references or scripts if you modify the master
script during busy periods.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 53


Understanding and planning your scripts Standard 8.05

54 Contact Center Manager


Chapter 3

Scripting rules and conventions

In this chapter
Overview 56
Script formatting conventions 58
Script naming guidelines 63
Script rules 65
General scriptwriting tips 68
Guidelines for providing feedback 83
Scriptwriting tips for specific commands 86
Script example using formatting conventions and rules 87
Opening the scripting tool 90

Scripting Guide for Communication Server 1000/Meridian 1 PBX 55


Scripting rules and conventions Standard 8.05

Overview

This chapter contains tips to help you plan how to write and organize your
scripts. This chapter includes the following topics:
„ “Script formatting conventions” on page 58 describes the formatting
conventions. Follow these conventions so your scripts are easy to
understand.
„ “Script naming guidelines” on page 63 describes the guidelines for naming
scripts.
„ “Script rules” on page 65 lists the rules that you must follow when you
write scripts. If you do not follow these rules, errors can occur when you
validate your scripts.
„ “General scriptwriting tips” on page 68 gives recommendations for writing
efficient scripts.
„ “Guidelines for providing feedback” on page 83 describes the guidelines
for providing feedback within your scripts.
„ “Scriptwriting tips for specific commands” on page 86 provides tips about
writing and using scripting commands such as GIVE IVR and OPEN/END
VOICE SESSION.
„ “Script example using formatting conventions and rules” on page 87
provides a sample script that demonstrates formatting conventions and tips.
„ “Opening the scripting tool” on page 90 provides instructions about
connecting to Contact Center Manager.

Before you begin


Before you begin to write scripts or create variables, Contact Center Manager
must be installed and configured.

Also, all system resources such as RAN routes, music routes, voice ports, call
treatments, DNs, and IVR DNs must be set up and acquired. You do not need to
acquire RAN and music routes. For more information, see the Contact Center -
Manager, Communication Server 1000 and Voice Processing Guide.

56 Contact Center Manager


December 2007 Scripting rules and conventions

Additionally, all agents, skillsets, and thresholds must be created. For more
information, see the Nortel Contact Center Manager Administrator’s Guide.

If you plan to use voice prompts in your scripts, all voice segments must be
created using the Voice Prompt Editor for Meridian Mail and Application
Builder for CallPilot.

For more information about Voice Prompt Editor, see the Nortel Contact Center
Manager Administrator’s Guide. For more information about Application
Builder, see the CallPilot Application Builder Guide.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 57


Scripting rules and conventions Standard 8.05

Script formatting conventions

This section provides formatting conventions for writing scripts. To ensure that
your scripts are easy to read and understand, follow a consistent format.

Commands
Type commands in uppercase letters.
QUEUE TO SKILLSET service_sk

Intrinsics
Type intrinsics in uppercase letters.
IF (AGE OF CALL > 30)

Logical expressions
Type logical operators (And, Not, Or) in uppercase letters.
IF (TIME OF DAY = business_hours_gv)
AND (DAY OF WEEK = business_days_gv) THEN
GIVE RAN open_ran_gv
END IF

Parentheses
Expressions in parentheses are processed before other expressions in a
statement. Ensure that the parentheses in your scripts correctly set the order of
call processing that you want. For information about how parentheses affect
your scripts, see “Order of operations” on page 466.

58 Contact Center Manager


December 2007 Scripting rules and conventions

Section names
Type section names with initial uppercase letters followed by lowercase letters.
SECTION Night_Treatment

Remember that the word SECTION is a command, and what follows is the
section name.

Skillset names
Type skillset names in lowercase letters or in mixed case with the first letter in
uppercase.
sales
or
Sales

Tip: If you follow the skillset name with an underscore and the letters sk (for
example, sales_sk or Sales_sk), you can identify skillsets displayed in the Web
Scripts Editor.

Non-voice contacts must have a unique identifier. For example:


„ EM_ for e-mail contacts
„ OB_ for outbound contacts
„ VI_ for video contacts
„ WC_ for Web communication contacts
These unique identifiers are reserved for non-voice contacts.
You cannot create new voice skillsets starting with the reserved unique
identifiers. If you upgraded from a previous Contact Center release and have
skillset names starting with the reserved unique identifiers, you cannot modify
them.

Variables
Type variables in lowercase letters or in mixed case with the first letter in
lowercase.
GIVE RAN closed

Scripting Guide for Communication Server 1000/Meridian 1 PBX 59


Scripting rules and conventions Standard 8.05

or
GIVE RAN openHours

Tip: To identify types of variables in your scripts, include information about the
variable type in its name. For example, you can name a global variable for a
greeting RAN greeting_ran_gv or you can name a call variable for caller-entered
data call_data_cv.
You must use the unique identifier ct_ for contact type variables. For example,
ct_SentMail.

Comparison expressions using IF-THEN-ELSE-END IF


IF and THEN must always be on the same line, unless the statement is too long
to fit on a single line. Indent commands following the IF statement by using the
tab key. When an IF statement is followed by a second IF statement (known as a
nested IF), indent the second IF statement. When you use multiple IF statements
in a script, each IF must have a matching END IF.
IF (CLID = vip_list_gv) THEN
EXECUTE Vips_Section
ELSE
IF (CLID = special_list_gv) THEN
EXECUTE Special_Section
END IF
END IF

60 Contact Center Manager


December 2007 Scripting rules and conventions

Blank lines, indenting, and comments


To improve the readability of your scripts, leave blank lines between sections,
and before and after comments. Indent commands inside sections to make it easy
to identify sections. Indent commands that extend beyond one line.

Comments help others understand your intentions for a section. Although


comments are not required, they can be extremely helpful in explaining the
original purpose of the section. Comments in your scripts must begin with an
opening marker (/*) and end with a closing marker (*/).
Tabs and extra spaces within a line do not affect the script. Blank lines do not
affect the script.

ATTENTION
Comments in your scripts must begin with an opening
marker (/*) and end with a closing marker (*/). If you do
not include both an opening and closing marker, the script
does not validate.

Example
The following example shows the correct use of comments, indenting, and blank
lines between sections:
/* This section of the script queues calls to the general skillset
during regular business hours.*/
IF (DATE = holiday_gv) OR (DAY OF WEEK = weekend_gv) THEN
EXECUTE Night_Treatment
END IF
QUEUE TO SKILLSET general_sk
QUIT
SECTION Night_Treatment
GIVE RAN closed_ran_gv
DISCONNECT

Scripting Guide for Communication Server 1000/Meridian 1 PBX 61


Scripting rules and conventions Standard 8.05

Basic script example


The following example shows a voice script with all recommended formatting
conventions applied. This example clearly distinguishes elements such as
commands, variables, and skillsets. Write all your voice scripts in this manner.

Example
IF (DATE = holidays_gv)
OR (DAY OF WEEK = weekend_gv)
OR (TIME OF DAY = after_hours_gv)
OR OUT OF SERVICE skillset_sk THEN
GIVE RAN closed_ran_gv
DISCONNECT
END IF

QUEUE TO SKILLSET skillset_sk


WAIT 2
GIVE RAN agents_busy_ran_gv
GIVE MUSIC soft_music_gv

SECTION WaitLoop
WAIT loop_time_gv
IF NOT QUEUED THEN
IF OUT OF SERVICE skillset_sk THEN
GIVE RAN sorry_day_closed_ran_gv
DISCONNECT
ELSE
QUEUE TO SKILLSET skillset_sk
WAIT 2
END IF
END IF
EXECUTE WaitLoop

62 Contact Center Manager


December 2007 Scripting rules and conventions

Script naming guidelines

Follow the guidelines in this section when you name new scripts or rename
existing scripts.

Rules for naming scripts


Follow these rules when you name scripts.
„ Script names are not case-sensitive.
„ The script name must be unique. You cannot use the name of an existing
script.
„ Do not use spaces or punctuation marks in script names, except underscores
(_).
„ Do not use a scripting keyword as a script name. See Appendix B,
“Scripting keywords,” for a list of scripting keywords.
„ Script names must start with a letter. For example, CC1_TIPS is a valid
script name, but 1_CCTIPS is not a valid script name.

Hints and tips for assigning script names


„ Script names are generally used internally by the contact center
administrator. However, if the script is referenced from the master script,
the script name becomes the application name and appears on real-time
displays and historical reports.
„ Using prefixes to indicate the contact type is optional, but if prefixes are not
used, all application statistics are considered voice statistics. Review the
historical reports when you filter by the field ContactType in the Report
Creation Wizard.
„ Nortel recommends the following naming prefixes for non-voice scripts:
„ OB_ for outbound

„ EM_ for e-mail

„ WC_ for Web communication

„ VI_ for video

Scripting Guide for Communication Server 1000/Meridian 1 PBX 63


Scripting rules and conventions Standard 8.05

The administrator can sort the scripts alphabetically on the real-time displays.

64 Contact Center Manager


December 2007 Scripting rules and conventions

Script rules

This section describes the rules for creating Contact Center Manager scripts. If
you do not follow these rules, you receive errors when you validate the script,
and the call does not receive the treatment you intend.

Most, but not all, of these script element restrictions are detected during script
validation (before the script is activated). However, the validator cannot detect
every possible situation that can cause a problem.

First command rule


Do not use the following commands as the first command executed in a script:
„ WAIT
„ QUIT
„ GIVE SILENCE
„ REMOVE FROM AGENT
„ CHANGE PRIORITY IN AGENT
„ REMOVE FROM SKILLSET
„ CHANGE PRIORITY IN SKILLSET
„ READVAR/SAVEVAR

This rule does not apply to multimedia contacts with the exception of the QUIT
command, which causes contacts to be queued to the default skillset for the
contact type.

For information about these commands in SIP-enabled contact centers, see “SIP
Contact Center” on page 675.

Call rejection
If one of the preceding commands is encountered as the first command, the call
is routed to the default ACD-DN configured for the CDN. (The call is not
queued to the default skillset or RAN). Contact Center Manager logs an error to
the alarm monitor and event browser.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 65


Scripting rules and conventions Standard 8.05

Call intrinsics rule


Do not use any of the following call intrinsics in the network script or any of its
subscripts. These intrinsics always return a value of False:
„ CALL FORWARD
„ CALL FORWARD BUSY
„ CALL FORWARD NO ANSWER
„ CALL FORWARD DO NOT DISTURB

This rule applies only if you purchased the Network Skill-Based Routing option.

Lists
For many commands and skillset intrinsics, you can list up to 20 skillsets or
agents. List entries must be separated by commas.

Example
QUEUE TO SKILLSET sales_sk, service_sk, support_sk

Parentheses rule
Parentheses are allowed in script commands to group elements and formulas in
expressions. Each open parenthesis must have a matching closing parenthesis.

Variables rule
When you use a command that changes the value of a variable, that variable
must be defined as a call variable.

EVENT HANDLER command rules


The following rules apply to the EVENT HANDLER command:
1. If you use an EVENT HANDLER command in a script, it must be the first
command. The script must also have a closing END HANDLER command.
2. The EVENT HANDLER command applies only to the script in which it
appears. If the script calls a secondary script, the EVENT HANDLER

66 Contact Center Manager


December 2007 Scripting rules and conventions

command no longer applies to the contact. If you want the EVENT


HANDLER command to apply to secondary scripts, you must repeat it at
the beginning of each script.

SECTION and EXECUTE command rules


The following rules apply to the SECTION and EXECUTE commands.
1. Any loop that is created in a script by using the SECTION and EXECUTE
commands must have a WAIT command.
2. Each EXECUTE command must have a SECTION label defined in the
script as its target.

The reverse is not true. Each SECTION label does not require an EXECUTE
command to target it.

IF-THEN-END IF command rule


The IF-THEN-END IF command can have multiple commands between THEN
and END IF.

IF-THEN-ELSE-END IF command rule


The IF-THEN-ELSE-END IF command can have multiple commands between
THEN and ELSE, as well as multiple commands between ELSE and END IF.
The ELSE branch executes only when the IF condition is not true.

WHERE-EQUALS command rule


The value used in the WHERE-EQUALS command must be an item value or an
expression that simplifies to an item value. This command must be closed with
an END WHERE command. The DEFAULT clause of the command is optional;
however, Nortel recommends you always use it.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 67


Scripting rules and conventions Standard 8.05

General scriptwriting tips

This section gives recommendations for writing efficient scripts.

Avoid circular dependencies


When two scripts reference each other, either directly or indirectly through other
scripts, they create a circular dependency. Contact Center Manager allows
circular dependencies (except that a script cannot call itself directly), but Nortel
strongly recommends that you do not use them. Circular dependencies may
cause recursive looping, which can cause the task flow executor to cease
functioning.

The following diagrams illustrate two ways in which circular dependencies can
occur. In the first diagram, the circular dependency is created by a secondary
script (script B) referencing a primary script.

Secondary
script A

Master script Primary script

Secondary
script B

68 Contact Center Manager


December 2007 Scripting rules and conventions

In the following illustration, the circular dependency is created when two


secondary scripts reference each other.

Secondary
script A

Primary script

Secondary
script B

Because you cannot deactivate a script if it is referenced by another active script,


it is complicated to deactivate a script that is in a circular dependency. For more
information, see “Deactivating scripts” on page 185.

Avoid unnecessary commands


Avoid using unnecessary commands that can decrease the efficiency of your
system.
„ Because music resumes automatically when a call returns to a queue, do not
repeat a GIVE MUSIC command.
„ For information about GIVE MUSIC in SIP-enabled contact centers, see
“RAN and MUSIC routes” on page 705.
„ After a QUEUE TO SKILLSET command executes, do not repeat it for the
same skillset.
„ After a QUEUE TO SKILLSET command, use a WAIT 2 (or more)
command before the next GIVE RAN command, if possible. If an agent is
immediately available, the 2-second delay prevents the system from
running the GIVE RAN command.
„ Do not use the LOG command in the normal call processing path. New
events overwrite old events in the log file. Events logged by this command
can reduce the amount of historical data in the log file.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 69


Scripting rules and conventions Standard 8.05

„ Do not use the following commands in non-voice contacts:


„ GIVE RINGBACK

There are no consequences when using the GIVE RINGBACK com-


mand with non-voice commands if the command is being used as a
blanket statement for the script.
„ GIVE SILENCE
„ GIVE MUSIC
„ GIVE IVR
„ GIVE RAN
„ GIVE CONTROLLED BROADCAST
„ GIVE BUSY
„ GIVE OVERFLOW

For information about these commands in SIP-enabled contact centers, see “SIP
Contact Center” on page 675.

Understand the difference between contact priority and agent priority


Contact priorities are set in the script, and agent priorities are set in
agent-to-skillset assignments.

If you use the WITH PRIORITY option, Nortel recommends that you queue the
contacts to a backup skillset as well, or change the priorities of old contacts
(using the AGE OF CALL/AGE OF CONTACT intrinsics), so they do not stay
in the queue indefinitely.

Agent priorities do not cause contacts to be left in a queue. If you use agent
priority and contacts are waiting to be answered, Contact Center Manager sends
contacts to agents regardless of their priority.

There is no relationship between contact priority and agent skillset priority.

70 Contact Center Manager


December 2007 Scripting rules and conventions

The following table compares contact priority to agent priority.

Contact priority Agent priority

Where is the Contact priority is set or changed in Agent priority is set in the User
value set? the script (by using the QUEUE TO Administration or Agent-to-Skillset
SKILLSET, QUEUE TO AGENT Assignment application on the
WITH PRIORITY, or CHANGE client.
PRIORITY commands) and can
differ for each contact.
Contact- or Contact priority is related only to Agent priority cannot be set or
agent- the contact. It is not related to changed in the script and is not
related? agents. contact-related.
How is Contact priority is used only when Agent priority is used only to
priority no agents are idle at the moment determine an agent’s place in a
used? that the QUEUE TO command queue when the agent becomes idle
executes. Contact priority and other agents are already
determines in which position available. It is not used to determine
Contact Center Manager places the agent selection. A contact is
contact. When an agent becomes presented to the agent at the top of
available, the contact with the the queue. That agent has the
highest priority and longest wait highest priority and the longest idle
time is presented. time of all idle agents within that
skillset.

For more information about setting agent-to-skillset priorities, see the Nortel
Contact Center Manager Administrator’s Guide and the Contact Center
Manager Administration online Help.

Check for the most likely conditions first


If a script checks for multiple conditions, it is most efficient to check for the
condition that is the most likely to occur first. For example, for a voice contact,
if a script processes three types of calls differently based on the DNIS, it is most
efficient to check the most commonly called number, followed by the second
most commonly called number, followed by the third most commonly called
number.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 71


Scripting rules and conventions Standard 8.05

Example
In this example, 5555604 is called most often, followed by 5555610 and
5555612.
WHERE DNIS EQUALS
VALUE 5555604: QUEUE TO SKILLSET sales_sk WITH PRIORITY 3
VALUE 5555610: QUEUE TO SKILLSET sales_sk WITH PRIORITY 2
VALUE 5555612: QUEUE TO SKILLSET sales_sk WITH PRIORITY 1
DEFAULT: QUEUE TO SKILLSET sales_sk WITH PRIORITY 4
END WHERE

Check whether skillsets are out of service


Attempts to queue calls to a skillset queue that is out of service are rejected. If a
skillset is not staffed (for example, if the skillset does not operate 24 hours a
day), use an out-of-service check in your scripts.

Example: Without check for out-of-service condition


QUEUE TO SKILLSET general_sk
SECTION wait_loop
WAIT 4
GIVE RAN pleaseContinueToWait
EXECUTE wait_loop

In this example, if the skillset is out of service, the call executes the loop until
the caller disconnects. The following example shows how to use the out-of-
service condition to prevent this situation.

Example: With check for out-of-service condition


IF OUT OF SERVICE general_sk THEN
EXECUTE Night_Treatment
END IF
QUEUE TO SKILLSET general_sk
WAIT 2 /*Allow time for the call to be queued*/
SECTION wait_loop
WAIT 20

72 Contact Center Manager


December 2007 Scripting rules and conventions

/*Check whether skillset is in service*/


IF NOT QUEUED THEN
IF OUT OF SERVICE general_sk THEN
EXECUTE DayClosed_Treatment
ELSE
QUEUE TO SKILLSET general_sk
WAIT 2
END IF
END IF
GIVE RAN pleaseContinueToWait
EXECUTE wait_loop

Use NACD routing as a backup


If you purchased the Networked Skills Based feature, you can use the
Networked ACD routing to provide backup routing in the event that a network
skill-based routing command does not successfully route the call.

After queuing a call to an NACD queue, you can use the queued intrinsic to
determine if the NACD queue is valid. Do not use the queued intrinsic within a
loop as the intrinsic always returns a value of True.

Be careful when using the queued intrinsic with NACD as the intrinsic returns a
True value even though the NACD entry is closed. This is because the call is still
considered queued. This can lead to calls remaining in a loop for a long time if
the queued intrinsic is used with NACD queuing. As an alternative, use other
intrinsics like AGE OF CALL.

Use variables to process emergency situations


You can use variables to process emergency situations at your contact center.
For example, you can create a variable named emergency and set its value to
True. For an example of how you can use this variable in a script, see “Using
sample scripts” on page 479.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 73


Scripting rules and conventions Standard 8.05

In some emergency situations (for example, ones that require evacuation), you
may not have time to change the value of the emergency variable before you
leave the contact center. For these situations, use the following procedure.

Creating an emergency skillset


1 Create an emergency agent.
2 Assign the agent a logon ID that is easy to remember, such as 999111.
3 Assign the agent to the emergency skillset.
4 Include the following lines in all loops in all scripts:
IF NOT OUT OF SERVICE emergency_sk THEN
<statements>
EXECUTE Emergency_Situation
END IF
As an alternative, you can use the following lines:
IF (LOGGED AGENT COUNT emergency_sk > 0) THEN
EXECUTE Emergency_Situation
END IF
5 When an emergency situation arises, you can quickly log on as the
emergency agent to any phoneset. The emergency skillset is immediately
placed in service when you log on as the emergency agent. The statements
you provided for emergency situations take effect immediately.

Accommodate high-traffic conditions for voice contacts


If your script starts with a significant number of non-call treatment commands
(such as WHERE-EQUALS or IF tests, or EXECUTE or EXECUTE SCRIPT
commands) before the first call treatment, the user experiences a delay before
Contact Center Manager gives treatment. Under high-traffic conditions, the
response time (imposed by the switch) can expire, causing calls to receive
default treatment intermittently.

If you expect this problem, write the script so that it executes the call treatments
(such as GIVE MUSIC or GIVE RINGBACK) before executing the non-call
treatments (such as EXECUTE SCRIPT). Begin a large number of IF tests only
after the caller hears a tone.

74 Contact Center Manager


December 2007 Scripting rules and conventions

For information about GIVE MUSIC command in SIP-enabled contact centers,


see “RAN and MUSIC routes” on page 705.

For information about other commands in SIP-enabled contact centers, see “SIP
Contact Center” on page 675.

Group IF statements
If your script has many IF statements, consider using a WHERE-EQUALS
statement to group the IF conditions.

When you use IF-THEN-END-IF and IF-THEN-ELSE-END-IF statements, do


not nest IF statements more than five times in an IF-THEN-ELSE-IF/IF-THEN-
ELSE-END-IF statement.

Use loops
A loop is a section of a script that is repeated until a call is answered. You can
use a loop to check time intrinsics, such as AGE OF CALL, or to repeat a RAN
(for example, every 30 seconds).

Avoid infinite loops


To avoid endless loops, ensure that the initial QUEUE TO SKILLSET command
works. In Example one, the QUEUED intrinsic (in each loop) checks whether
the voice contact is still in the queue.

When a voice contact is in a loop, it is important to ensure that the call is still
queued to the skillset and that agents are logged on to the skillset. In regular
script processing (that is, when a call is not in a loop), if the call is not queued
when it reaches the end of the script, Contact Center Manager automatically
checks whether the call is queued. If it is not queued, the call receives default
treatment. In a loop, however, this check is never performed because there are
always commands to run.

Before queuing a contact to a skillset or list of skillsets, use the OUT OF


SERVICE intrinsic to test the state of the skillset or use the LOGGED OUT
AGENT intrinsic if you use the QUEUE TO AGENT command to queue the
contact.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 75


Scripting rules and conventions Standard 8.05

Use the OUT OF SERVICE intrinsic rather than LOGGED AGENT COUNT to
test a skillset state. The OUT OF SERVICE intrinsic handles the transition mode
(when the skillset is going out of service, but some agents are still logged on).
The LOGGED AGENT COUNT intrinsic does not handle the transition mode.

Any loop that you create in a script by using the SECTION and EXECUTE
commands must contain a WAIT command.

Avoid repeating commands


Avoid putting commands that do not need to be repeated inside a loop. In
Example one, the QUEUE TO SKILLSET command is executed before the
loop, which repeats the RAN. You can include the QUEUE TO SKILLSET
statement in the loop, but the QUEUE TO SKILLSET statement is repeated
unnecessarily. A QUEUE TO SKILLSET statement that is repeated multiple
times is not executed more than once and results in a less efficient script.

Example one
QUEUE TO SKILLSET service_sk WITH PRIORITY 3
WAIT 3
/*This section checks to ensure that the call is queued,then
repeats a second recorded announcement after a 30 second pause
until the call is answered.*/
SECTION Play_2nd_RAN
WAIT 30
IF NOT QUEUED THEN
IF NOT OUT OF SERVICE service_sk THEN
QUEUE TO SKILLSET service_sk WITH PRIORITY 1
WAIT 2
ELSE
EXECUTE Help_Me_Now
END IF
END IF

GIVE RAN agents_still_busy_ran_gv


EXECUTE Play_2nd_RAN
SECTION Help_Me_Now

76 Contact Center Manager


December 2007 Scripting rules and conventions

...

Check for conditions


Use care when you use a loop to check whether an intrinsic meets a given
condition because an intrinsic (AGE OF CALL, for example) is equal to a
particular value for only 1 second.

For example, the statement


IF (AGE OF CALL = 10)

is true only if the skillset is checked when the call waits exactly 10 seconds. A
better method is to set a condition by using an operator that targets a range of
time, and place the conditional statement in a loop that is repeated at frequent
intervals, beginning at a time immediately before the time specified in the
condition.

For example,
IF AGE OF CALL > 60 THEN
EXECUTE WaitLoop
END IF

Example two
In this example, the priority of the call does not change until the call waits more
than 2 minutes. The condition AGE OF CALL (in the Check_Age section)
removes the call from the Check_Age loop to the Change_Priority section,
which occurs only after the call waits 2 minutes. The first WAIT statement
delays the script from beginning the loop until the system has time to check
whether an agent is available.
QUEUE TO SKILLSET service_sk WITH PRIORITY 3
WAIT 2
/* This section of the script tests the age of the call every 10
seconds. If the call is in queue longer than 2 minutes, the script
jumps to another section to increase the call’s priority in queue.
It also checks whether the call is queued, and if not, it jumps to
another section.*/
SECTION Check_Age
WAIT 10
IF NOT QUEUED THEN

Scripting Guide for Communication Server 1000/Meridian 1 PBX 77


Scripting rules and conventions Standard 8.05

EXECUTE Help_Me_Now
END IF
IF (AGE OF CALL > 120) THEN
EXECUTE Change_Priority
END IF
EXECUTE Check_Age
SECTION Change_Priority
CHANGE PRIORITY IN SKILLSET service_sk TO PRIORITY 2
WAIT 2
EXECUTE WaitLoop
SECTION Help_Me_Now

Use ranges
Ranges for variables include all numbers in the range, including the start and
end range values. For example, a range of 1 .. 4155552323 includes every CLID
from 1 to 4155552323. The starting and ending values usually have the same
number of digits (for example, 4155552134 .. 4155552688).

For time ranges, the entire minute at the end of the time range is included.
Therefore, the time range 08:00 .. 09:00 is 61 minutes. For a 60-minute period,
use the range 08:00 .. 08:59.

Ensure that your range includes only the intended values.

Use sections to provide more than one treatment


If more than one action is required when a condition is met, use a section.

Example
This script uses a section to treat very important calls; otherwise, calls are
queued to the general skillset. If the call is not answered within 30 seconds, the
call receives a message stating that the contact center is closed.
IF (CLID = vip_list_gv) THEN
EXECUTE Vip_Treatment
ELSE

78 Contact Center Manager


December 2007 Scripting rules and conventions

QUEUE TO SKILLSET general_sk WITH PRIORITY 3


WAIT 2
EXECUTE WaitLoop
END IF
/* This section of the script gives special treatment to calls in
the VIP variable list */
SECTION Vip_Treatment
QUEUE TO SKILLSET general_sk WITH PRIORITY 1
WAIT 2
GIVE RAN special_callers_ran_gv
/* This section of the script first checks to see if the call is
queued, then it checks if there are any available agents for the
general skillset. If there are no available agents the call
receives a message indicating the contact center is closed.
Otherwise the call is queued to the general skillset.*/
SECTION WaitLoop
WAIT 30
IF NOT QUEUED THEN
IF OUT OF SERVICE general_sk THEN
GIVE RAN day_closed_ran_gv
DISCONNECT
ELSE
QUEUE TO SKILLSET general_sk WITH PRIORITY 1
WAIT 2
END IF
END IF
EXECUTE WaitLoop

Define meaningful time comparisons


Meaningful time comparisons include greater than or equal to (> =) or less than
or equal to (< =) symbols. For example, given the following commands,
IF (TIME OF DAY = 08:00)

and

Scripting Guide for Communication Server 1000/Meridian 1 PBX 79


Scripting rules and conventions Standard 8.05

IF (TIME OF DAY > = 08:00) AND TIME OF DAY < 09:00)

the first expression is true for 1 minute, and the second expression is true for 1
hour. A range is easier to read, as in this example:
IF (TIME OF DAY = 08:00 .. 08:59)

Use variables to minimize script maintenance


Variables make your scripts easy to modify. For example, if you use the variable
business_hours to represent the hours that your company is open (for example,
09:00 a.m. to 05:00 p.m.), and you change the hours to 08:00 a.m. to 06:00 p.m.,
you can update only the variable, instead of all the scripts.

Naming restrictions
Variables must have unique names. Do not use keywords, skillset names, or
section labels to name variables.

To avoid errors, define all variables before you write your scripts. If you define a
variable that is not referenced by a script, delete it after you write all the scripts.

For more information about variables, see Chapter 4, “Working with script
variables.”

Treat transferred calls correctly


When a call is transferred, you must ensure that the call is treated correctly.
Your script must:
„ provide enough time for the transferring party to release the call
„ prevent pegging of the transferring party against the application

To correctly transfer a call, include the following statement at the beginning of


the master script.
IF TRANSFERRED THEN
GIVE RINGBACK
WAIT 8
END IF

80 Contact Center Manager


December 2007 Scripting rules and conventions

Use the DIALED DN intrinsic to transfer calls


You can test the DIALED DN intrinsic with DNs that are redirected to a CDN
under control of Contact Center Manager only with the CALL FORWARD,
CALL FORWARD BUSY, or CALL FORWARD NO ANSWER commands.
You use the DIALED DN intrinsic to facilitate call transfer back to Contact
Center Manager.

You can create phantom DNs in the switch, which forward calls to a CDN under
the control of Contact Center Manager. If you want to use phantom DNs to
transfer calls, you must configure a phantom DN for each skillset from which an
agent or IVR transfers calls. These DNs forward calls to one CDN controlled by
Contact Center Manager. You can program these DNs in to speed dial keys on
the agent telephone.

Example
This example shows how to transfer a call by using the DIALED DN intrinsic.
IF CDN = transfer_CDN THEN
IF TRANSFERRED THEN
GIVE RINGBACK
WAIT 20/*Allow time for transferring party to hang up*/
DISCONNECT
ELSE
WHERE DIALED DN EQUALS
VALUE XXXXXXX: EXECUTE SCRIPT ScriptA
VALUE XXXXXXX: EXECUTE SCRIPT ScriptB
VALUE XXXXXXX: EXECUTE SCRIPT ScriptC
DEFAULT: EXECUTE SCRIPT ScriptD
END WHERE
END IF
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 81


Scripting rules and conventions Standard 8.05

Use wild variables in the master script


When you place a conditional statement to trigger an emergency state using
READVAR and SAVEVAR commands in the master script as the first
command block following the EVENT HANDLER command, the calls are
rejected by Contact Center Manager and defaulted because the READVAR and
SAVEVAR bock is an illegal first statement.

Place a GIVE RINGBACK command as the first command in the Master_Script


to prevent this condition.

For information about commands in SIP-enabled contact centers, see “SIP


Contact Center” on page 675.

82 Contact Center Manager


December 2007 Scripting rules and conventions

Guidelines for providing feedback

Your scripts should provide the user with confirmation that their contact is still
being processed. For voice contacts, provide ringback or other treatments, such
as music or recorded announcements. All other multimedia contacts can use the
auto-acknowledgement features in the multimedia applications. For example,
most e-mail applications can be configured to automatically send a message to
the mail originator if the receiver is not available.

Consider what the user experiences


Examine your scripts to determine what the user experiences. For example, in
the following script for a voice contact, if an agent does not become available,
the caller receives the following feedback:
„ The caller hears ringback when the call enters the queue in the general
skillset.
„ If no agents are available, the caller hears the entire RAN
agents_busy_ran_gv.
„ The caller hears music for 20 seconds.
„ If, at the end of 20 seconds, no agents are available, the caller hears the
entire RAN agents_still_busy_ran_gv.
„ The caller hears music again until the call is answered.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 83


Scripting rules and conventions Standard 8.05

Example voice contact script


QUEUE TO SKILLSET general_sk WITH PRIORITY 3
WAIT 2 /* Check for idle agent*/
GIVE RAN agents_busy_ran_gv
GIVE MUSIC local_station_gv
WAIT 20
GIVE RAN agents_still_busy_ran_gv

Default treatments
If no other treatment is given for the following commands, ringback is
automatically applied for voice contacts:
„ QUEUE TO SKILLSET
„ QUEUE TO AGENT
„ SEND INFO
„ SEND REQUEST
„ LOG
„ QUEUE TO NACD (available with the Networked Skills Based Routing
feature only)
„ QUEUE TO NETWORK SKILLSET (available with the Networked Skills
Based Routing feature only)

QUEUE TO SKILLSET command


If a voice contact receives no treatment before it is queued to a skillset by the
QUEUE TO SKILLSET command, Contact Center Manager automatically
gives a ringback tone when the voice contact:
„ enters the skillset queue
„ is sent to an agent

The voice contact often hears only a burst of ringback in these situations,
depending on the delay—or lack of delay—in providing the next treatment.
Because a script cannot control that delay, it does not completely control the
tones heard by the caller.

84 Contact Center Manager


December 2007 Scripting rules and conventions

Example
This example shows how to give the voice contact a full cycle of ringback before
the next treatment. This method forces a 6-second delay before giving tones to
ensure a more natural-sounding ringback cycle.
QUEUE TO SKILLSET sales_sk
WAIT 6
GIVE MUSIC classical_music_gv

GIVE RAN command


By default, a voice contact hears silence after a recorded announcement or after
the completion of an IVR session. If you want the voice contact to hear anything
other than silence (music or ringback), you must insert the appropriate
command.

If the GIVE RAN command is preceded by a GIVE MUSIC command, music


does not resume play after the recorded announcement ends.

For information about GIVE RAN in SIP-enabled contact centers, see “SIP
Contact Center” on page 675.

GIVE MUSIC command


Music resumes after all commands except GIVE SILENCE and GIVE
RINGBACK. Therefore, you do not need to repeat the GIVE MUSIC command
in a script.

For information about GIVE MUSIC in SIP-enabled contact centers, see “GIVE
IVR” on page 679.

For information about other commands in SIP-enabled contact centers, see “SIP
Contact Center” on page 675.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 85


Scripting rules and conventions Standard 8.05

Scriptwriting tips for specific commands

This section provides scriptwriting tips for specific commands.

Make the GIVE IVR command interruptible


If a voice contact is queued to a skillset, agent, or NACD, the GIVE IVR
command must be interruptible. If the command is interruptible, an agent can
stop the RAN and take the call. Otherwise, the caller hears the entire
announcement and waits for the next available agent.

For information about GIVE IVR in SIP-enabled contact centers, see “GIVE
IVR” on page 679.

Make OPEN/END VOICE SESSION periods short


Voice sessions use system processing power and can use voice ports for long
periods. If you want to play multiple prompts to a caller, place the voice
segments on the same PLAY PROMPT command statement in the script. Do not
include non-voice processing commands within a voice session.

An enhanced GIVE IVR command replaces OPEN/END VOICE SESSION


commands in SIP-enabled contact centers. For more information about the
GIVE IVR command in SIP-enabled contact centers, see “GIVE IVR” on page
679.

Example
OPEN VOICE SESSION 4243
PLAY PROMPT VOICE SEGMENT greeting_vs
VOICE SEGMENT enter_acc_num_vs
COLLECT 6 DIGITS INTO acc_num_cv
END VOICE SESSION

86 Contact Center Manager


December 2007 Scripting rules and conventions

Script example using formatting conventions


and rules

The following script example combines many of the tips in this chapter.

In this example, the contact center is not open 24 hours a day.

Sample script
/* Check to see if both skillsets that can answer calls are out of
service, and disconnect the call if they are. */
IF OUT OF SERVICE general_sk, backup_sk THEN
EXECUTE Night_Treatment
END IF
/* Send VIP calls to be handled in a special way. This is done at
the beginning to ensure that VIP calls are never given a busy
signal. vip_list is a variable. */
IF (CLID = vip_list_gv) THEN
EXECUTE Special_Handling
END IF
/* Check to see if there are already more than twice as many calls
queued as there are agents logged in, and give the call a busy
signal if this is true. */
IF (QUEUED COUNT general_sk) > (2 * LOGGED AGENT COUNT general_sk)
THEN
GIVE BUSY
END IF
/* Queue the call to the general skillset and give an announcement
followed by music. */
QUEUE TO SKILLSET general_sk WITH PRIORITY 3
WAIT 6
GIVE RAN agents_busy_ran_gv
GIVE MUSIC classical_music_gv

Scripting Guide for Communication Server 1000/Meridian 1 PBX 87


Scripting rules and conventions Standard 8.05

/* This section of the script tests the age of the call every 20
seconds. If the call is in queue longer than 2 minutes, the script
jumps to another section that increases the call’s priority in
queue. If the call is not queued, the caller hears a message
informing him or her that the contact center is closed.*/
SECTION Check_Age
/* Check if call still queued - if not, Contact Center is closed
*/
WAIT 20
IF NOT QUEUED THEN
EXECUTE Night_Treatment
END IF
IF (AGE OF CALL > 120) THEN
EXECUTE Raise_Priority
END IF
GIVE RAN agents_still_busy_ran_gv
GIVE MUSIC classical_music_gv
EXECUTE Check_Age
SECTION Raise_Priority
CHANGE PRIORITY IN SKILLSET general_sk TO PRIORITY 1
WAIT 2
QUEUE TO SKILLSET backup_sk WITH PRIORITY 3
WAIT 2
SECTION Keep_RAN_Loop
/* Check if call still queued - if not, contact center is closed
*/
WAIT 20
IF NOT QUEUED THEN
EXECUTE Night_Treatment
END IF
GIVE RAN agents_still_busy_ran_gv
GIVE MUSIC classical_music_gv
EXECUTE Keep_RAN_Loop

88 Contact Center Manager


December 2007 Scripting rules and conventions

/* This section of the script is reached if the call has a CLID


that is in the VIP variable list. These calls are queued with high
priority to two queues and given a special RAN. */
SECTION Special_Handling
QUEUE TO SKILLSET general_sk WITH PRIORITY 1
WAIT 2
QUEUE TO SKILLSET backup_sk WITH PRIORITY 3
WAIT 2
GIVE RAN you_are_special_ran_gv
GIVE MUSIC classical_music_gv
EXECUTE Keep_Ran_Loop
/* This section of the script plays the closed announcement and
disconnects the call. This only happens if both the general
skillset and the backup skillset are out of service. */
SECTION Night_Treatment
GIVE RAN closed_ran_gv
DISCONNECT

Scripting Guide for Communication Server 1000/Meridian 1 PBX 89


Scripting rules and conventions Standard 8.05

Opening the scripting tool

Before you can create or edit scripts for Contact Center Manager, you must log
on to the Contact Center Manager through the Contact Center Manager
Administration tool.

Assumptions
This logon procedure is based upon the following assumptions:
„ The site and systems that you want to access are set up and configured.
For information about setting up sites and systems, see the Contact Center
Manager Server Installation and Maintenance Guide and the Contact
Center Planning and Engineering Guide.
„ You know the user ID and password to log on to Contact Center Manager.
If you do not know this information, contact your system administrator or
your contact center administrator.

Logging on for the first time


If you are logging on to Contact Center Manager for the first time after the
system is installed, see the Nortel Contact Center Manager Administrator
Guide. Otherwise, use the following procedure to log on to the system.

After you log on to the system, you can create a shortcut to reduce the number of
steps involved in the procedure. See “Creating a desktop shortcut” on page 95.

90 Contact Center Manager


December 2007 Scripting rules and conventions

Logging on to the system


1 Start Internet Explorer.

ATTENTION
For Contact Center Manager Administration Scripting to
work correctly, ensure that pop-ups are allowed. If pop-
ups are blocked, interference with scripting can occur.

2 In the Address box, type the URL of the application server. The default
URL is http://<application server name>.

ATTENTION
Do not type the IP address of the application server. If
you type the IP address instead of the URL, you may
experience problems while working the Scripting
component.

Result: The Contact Center Manager Administration logon window


appears.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 91


Scripting rules and conventions Standard 8.05

3 Enter your user name and password.


Tip: If you do not know this information, contact your system administrator.
4 Click Login.
Result: The Contact Center Manager Administration Launchpad appears.

92 Contact Center Manager


December 2007 Scripting rules and conventions

5 Click Scripting.
Result: The Contact Center Manager Administration Scripting window
appears.

6 In the Scripting window, select the appropriate Contact Center Manager


server from the system tree in the left pane.
Result: The tree expands to show three options: Script Manager, Script
Variables, and Application Thresholds.

You can add Contact Center Manager Administration to your Favorites list in
Internet Explorer, or you can create a shortcut to Contact Center Manager
Administration on your desktop.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 93


Scripting rules and conventions Standard 8.05

Adding Contact Center Manager Administration to the Favorites list


1 Open Contact Center Manager Administration in Internet Explorer.
2 In Internet Explorer, select Favorites > Add to Favorites.
Result: The following dialog box appears.

3 Accept or change the name of the hyperlink.


4 Click OK.
Result: The Contact Center Manager Administration logon page is added
to the Internet Explorer Favorites menu.

94 Contact Center Manager


December 2007 Scripting rules and conventions

Creating a desktop shortcut


1 After Contact Center Manager Administration is open in Internet Explorer,
click the Address box.
Result: The URL for Contact Center Manager Administration is selected.

2 Right-click the URL and select Copy.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 95


Scripting rules and conventions Standard 8.05

3 On the server desktop, right-click the desktop, and select New > Shortcut.

Result: The following dialog box appears.

4 Right-click the Type the location of the item box, and click Paste.
Result: The URL for Contact Center Manager Administration appears in
the box.

96 Contact Center Manager


December 2007 Scripting rules and conventions

5 Click Next.
Result: The following dialog box appears.

6 Type a name for the shortcut and click Finish.


Result: The shortcut for Contact Center Manager Administration appears
on the desktop. You can now access Contact Center Manager
Administration by double-clicking the desktop icon.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 97


Scripting rules and conventions Standard 8.05

98 Contact Center Manager


Chapter 4

Working with script variables

In this chapter
Overview 100
Starting the Script Variables tool 104
Types of variables 106
Creating script variables 109
Checking variables for referencing scripts 117
Changing script variable properties 119
Copying script variables 121
Deleting script variables 128
Printing script variables 131

Scripting Guide for Communication Server 1000/Meridian 1 PBX 99


Working with script variables Standard 8.05

Overview

Before you create your Contact Center Manager scripts, create the variables you
plan to use for your system. This chapter explains how to create and assign
values to variables, how to change the values assigned to variables, and how to
delete variables.

What are script variables?


Script variables are placeholders that you can use in scripts to represent values
that are defined outside of the script. More than one script can use the same
variable. When you change the value of a variable, scripts are not interrupted.
You can implement changes easily without interrupting contact center operation.

All script variables are either global variables or call variables.

What are global variables?


Global variables are script variables that you can use in any script on the system.
The value of a global variable can be changed only in the Script Variables
window. The value cannot be changed in the script.

Example
BestAir Airlines has a global variable named business_hours_gv that is assigned
a value of 08:00 a.m. to 05:00 p.m. BestAir uses this variable in its script as
follows:
IF (TIME OF DAY = business_hours_gv) THEN
GIVE RAN open_ran_gv
END IF

Updating global variables


When you change the value of a global variable, contacts that are already active
in the Contact Center Manager system do not use the new value unless they
branch to a new script by using the EXECUTE SCRIPT command. New
contacts use the new global variable values immediately.

100 Contact Center Manager


December 2007 Working with script variables

There is no defined limit to the number of global variables that you can create.
The number of global variables that you can create is directly related to the
amount of system memory available.

What are call variables?


Call variables are script variables whose value can change for each contact. The
value of a call variable follows passes from one script to the next with the
contact. The initial value of a call variable is assigned in the Script Variables
window. Each incoming contact uses this value unless it is changed in the script
by one of the following commands:
„ ASSIGN TO
„ COLLECT DIGITS
„ GET RESPONSE

Non-voice contacts can use only the ASSIGN TO command. The COLLECT
DIGITS and GET RESPONSE commands apply to voice contacts only.

Examples
You can use the ASSIGN TO command in a script to give a value to a variable
for the duration of a contact. The following example assigns the value of the
total number of active voice contacts, divided by the call rate, plus 10, to the
variable int_var.
ASSIGN (TOTAL ACTIVE CALLS / CALL RATE + 10) TO int_var_cv
At BestAir Airlines, voice contacts enter their customer account number.
BestAir uses the COLLECT DIGITS command to gather this information. The
customer account number is stored in a call variable. In this example, when a
voice contact enters a 10-digit account number, the information is stored in the
call variable caller_acct_num_cv. The call variable is of the DN type.
COLLECT 10 DIGITS INTO caller_acct_num_cv

Updating call variables


When you make changes to the initial value of a call variable in the Script
Variables window, contacts that are already active in the Contact Center
Manager system do not use the new value. Call variable values stay constant
throughout the life of the contact. The new value takes effect for new contacts.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 101


Working with script variables Standard 8.05

You can create up to 50 call variables. If you attempt to create one more
variable, you receive an error message.

Call variables and blind transfer calls


A blind transfer involves passing a call without notifying the recipient. It is also
known as unsupervised transfer or cold transfer.

When a contact arrives and executes a master script, the contact starts with an
empty list of call variables. Then, as the contact executes the scripts, each call
variable that it uses is copied into the list of variables for that script.

If the scripts are written so that the original incoming contact accesses some call
variables, and the consultation contact accesses different call variables, when the
transfer is complete (blind transfer only), a single list is created that contains
both the original contact call variables plus the consultative contact call
variables. The original contact starts again at the top of the master script, but this
time with the combined list of call variables. If the same call variable is used by
both the original contact and the consultative contact, the value of the
consultative contact is applied to the variable after the contact is complete. This
process occurs only for blind transfers.

What are wild variables?


A contact can use wild variables to change the value of a call variable of type
Integer and make the updated value available to other contacts.

A call variable becomes a wild variable when it is referenced by a script by using


the READVAR/SAVEVAR command block. The value of the call variable is
passed into the wild variables table. Another contact can access the saved value
in the wild variables table by using the READVAR/SAVEVAR statement. The
value is equal to the last value saved with the SAVEVAR command unless Task
Flow Executor (TFE) restarts or unless you initialize the value by using a
READVAR/SAVEVAR. Task Flow Executor is the name of the call flow
operation.

The TFE is the service that executes scripts and determines how all calls are
processed.

Wild variables can only be type Integer.

102 Contact Center Manager


December 2007 Working with script variables

Visibility
The wild variables table is not synchronized with the call variables table. When
a call variable becomes a wild variable, Contact Center Manager Administration
displays only the initial value of the variable and not the current value of the
wild variable.

Setting and resetting wild variables


After the value is passed to the wild variables table, you can perform the
following steps to set or reset the value:
„ Restart TFE.
„ Write a script to initialize or reinitialize the wild variable.

Sets of values in variables


Some variables can have a set of values instead of only a single value. For
example, you can create a variable for holidays that includes all holidays for the
year. Variables with sets of values can include up to 100 items.

Consider the following when using sets of values in variables:


„ Item class variables must have a single value.
„ Replacement of a specific agent value in Contact Center Manager with an
agent variable does not require you to modify your scripts if an agent leaves
the contact center and is replaced by another agent.
„ You must use sets with global variables rather than call variables because
the ASSIGN statement (for call variables) supports assigning values only to
an item and not to a set.

Voice segment variables


Voice segment variables can be set only as global variables—not call
variables—and must also be defined with a set value.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 103


Working with script variables Standard 8.05

Starting the Script Variables tool

From Contact Center Manager Administration, use the Script Variables window
to list the script variables on the system. From this window, you can create or
delete a script variable. You can also access the Script Variable Properties
window where you can change the values stored within the variable.

You cannot delete script variables while they are referenced by activated scripts.

Opening the Script Variables window


1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.

104 Contact Center Manager


December 2007 Working with script variables

4 Click Script Variables.


Result: The system tree in the left pane expands to show all types of script
variables. In the right pane is an alphabetical list of all script variables.

Tip: You can sort all columns in the Script Variables grid in ascending or
descending order by clicking on the column header.
Example: If you click the column heading Name, the grid is sorted with all
script variable names (and corresponding script variable data) in ascending
order. If you click the Name column heading again, the grid is sorted in
descending order.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 105


Working with script variables Standard 8.05

Types of variables

The following table lists the types of variables you can create.

Leading
Class zero
Data type allowed allowed Valid value Example

ACD Item Yes 2–7 digit string 8900

AGENT ID Item or set Yes 16-digit number 456852753954785


2

BOOLEAN Item No True or False True

CDN Item or set No 1–30 alphanumeric abc123


characters
CLID Item or set Yes 10 digits (negative numbers 4165552244
are not allowed)
If you have the network skill-
based routing option, the
network script for the calling
line identification number
(CLID intrinsic) requires the
use of the exchange and the
extension. When you use the
CLID intrinsic in the Master
script for the local network
calls, the 4 digits of the
extension make up a valid
value.
CONTACT Item or set No String values Voice
TYPE

DATE Item or set No Jan 1 to Dec 31 9/1


January 1 to December 31 12/23

106 Contact Center Manager


December 2007 Working with script variables

Leading
Class zero
Data type allowed allowed Valid value Example

DAY Item or set No Monday to Sunday Tuesday

DAY OF Item or set No 1–31 23


MONTH
DN Item or set Yes 1–32 digits (negative 5552356
numbers are not allowed)

DNIS Item or set Yes 1–31 digits 5400

INTEGER Item No Number from – 22938


1,999,999,999 to
1,999,999,999

LANGUAGE Item No French, German, English, French


Spanish, Portuguese,
Chinese, Japanese

LOC Item or set Yes three-digit string 123


MONTH Item or set No Jan to Dec Mar
January to December March
MUSIC Item No Music route, 0–511 73

NPA Item or set No three-digit string 123

NPANXX Item or set No six-digit string 123456

NXX Item or set No three-digit string 123

PRIORITY Item No numbers 1–6 5

RAN Item No RAN route, 0–511 72


ROUTE Item or set Yes Route number, 0–511 234
NUMBER

SECONDS Item No 0–65535 10

Scripting Guide for Communication Server 1000/Meridian 1 PBX 107


Working with script variables Standard 8.05

Leading
Class zero
Data type allowed allowed Valid value Example

SKILLSET Item or set No 1- to 30-character string (no French_sales


spaces allowed)

STRING Item No 1–80 characters Log message


TIME Item or set No 0:00 to 23:59 11:15

TREATMENT Item Yes 1–7 digit string 0123456

VOICE Item No <filename>:<seg#> VM_Prompt:111


SEGMENT
WILDCLID Item or set No 1- to 32-digit number 416@
containing wildcard @ or 41?
placeholder ? symbols

108 Contact Center Manager


December 2007 Working with script variables

Creating script variables

Follow the procedure in this section to create script variables in Contact Center
Manager.

Before you begin


Before you create variables, all system resources, such as RAN routes, music
routes, voice ports, call treatments, and CDNs must be set up. For more
information about setting up these resources, see the Contact Center - Manager,
Communication Server 1000 and Voice Processing Guide.

Additionally, all agents and skillsets must be created. For more information
about creating agents and skillsets, see the Nortel Contact Center Manager
Administrator’s Guide and the Contact Center Manager Administration online
Help.

Finally, if you plan to create voice segment variables, you must create all of the
voice segments. If you are using Contact Center Voice Services on Meridian
Mail, create the voice segments with the Voice Prompt Editor (refer to the Nortel
Contact Center Manager Administrator’s Guide). If you are using Contact
Center Voice Services on Messaging Server, create your voice segments with
Application Builder (refer to the CallPilot Application Builder Guide).

Naming script variables


When you name script variables, ensure that you meet the following
requirements:
„ Script variable names must be unique and they cannot be the same as
skillset names, script language keywords, or intrinsics. For a list of script
language keywords, see Appendix B, “Scripting keywords.”
„ Script variable names must begin with a letter and cannot contain spaces.
„ Valid characters for script variable names are A to Z, a to z, 0 to 9, and
underscore (_).
„ For naming conventions for SIP-specific variables, see Appendix E, “SIP
Contact Center.”

Scripting Guide for Communication Server 1000/Meridian 1 PBX 109


Working with script variables Standard 8.05

Tips:
1. When possible, give variables generic names so you can reuse them in
different scripts.
2. To help you identify types of variables when you write and edit your
scripts, include information about the variable type in its name. For
example, name a global variable for a greeting RAN greeting_RAN_gv, or
name a call variable for caller-entered data caller_data_cv.

Adding variables
1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.
4 Click Script Variables.
Result: The Script Variables window appears.

110 Contact Center Manager


December 2007 Working with script variables

5 In the left pane, right-click Script Variables and then click New.
Tip: Alternatively, you can right-click a specific variable type to create a
new variable of that type.
Result: The Script Properties and Script Attributes load in the right pane.
6 In the right pane, click Script Variables to minimize the list of script
variables.
7 Click Script Variable Properties to expand the Script Variable Properties
property sheet.
Result: The Script Variable Properties property sheet appears.

8 On the General page, enter information in the following fields:


Name: Type the name of the variable. For information about naming
variables, see “Naming script variables” on page 109.
Group: Select Global Variable or Call Variable.
Comment: Type a description of the variable.
For more information about global and call variables, see “What are global
variables?” on page 100 and “What are call variables?” on page 101.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 111


Working with script variables Standard 8.05

9 Click the Attribute tab.

10 Enter information in the following fields:


Type: Select the data type of the variable. For more information, see “Types
of variables” on page 106.
Class (if applicable): Indicate whether the variable has a single value
(Item) or a set of values (Set).
11 Choose one of the following actions:
To assign a single value to the variable, perform the following steps:
a. Set the Class option to Item.
b. In the Value box, select the value you want to assign to the variable.
To assign more than one value to the variable (that is, a set) such as
Agent_ID, perform the following steps:
a. Set the Class option to Set.
b. From the Value list, select an value, and click Add.
Result: The value is added to the List of Values list.

112 Contact Center Manager


December 2007 Working with script variables

c. Repeat step b for each value that you want to add to the set.
Note: You can include up to 100 items in the set.
To assign a range of values to the variable (that is, a set), perform the
following steps.
a. Set the Class option to Set.
b. In the Value box, select the beginning of the range.
c. In the To box, select the end of the range.

Note: The To box appears only if the variable Class is Set and the Type
is Day, Day of Month, or Month.
d. Click Add One or Add Range.
Note: These buttons appear only if the script variable Class is Set and
the Type is Day, Day of Month, or Month, or if there is a predefined list
of values from which to choose.
12 Click Submit.
Result: The script variable is saved.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 113


Working with script variables Standard 8.05

Removing values from sets


1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.
4 Click Script Variables.
Result: The Script Variables window appears.

5 Select the script variable from which you want to remove a value. For
example, select the Agent_ID variable.

114 Contact Center Manager


December 2007 Working with script variables

6 Click Script Variable Properties to expand the Script Variable Properties


property sheet.
Result: The Script Variable Properties property sheet appears.

7 On the Attribute tab, click the button beside the value you want to remove.
Result: The value is highlighted.
8 Click Remove.
Result: The selected value is removed.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 115


Working with script variables Standard 8.05

9 Click Submit.
Result: The script variable is saved.

116 Contact Center Manager


December 2007 Working with script variables

Checking variables for referencing scripts

Follow this procedure to check whether a variable is referenced by any active


scripts.

If a script variable is referenced by any active scripts, you cannot change its
properties (except the value) or rename or delete it.

Checking for referencing scripts


1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.
4 Click Script Variables.
Result: The Script Variables window appears.
5 In the left pane, select the script variable that you want to check.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 117


Working with script variables Standard 8.05

6 In the right pane, click Script Variable Properties.


Result: The Script Variable Properties property sheet appears.

Tip: The Referencing Scripts section lists the names of scripts that
reference this variable.
7 If any activated scripts appear in the list, take one of the following actions:
a. Deactivate the script. For more information, see “Activating and
deactivating scripts” on page 182.
b. Remove the reference to the variable from the referencing script.
8 Click Save to close the Script Variable Properties property page.

118 Contact Center Manager


December 2007 Working with script variables

Changing script variable properties

Follow this procedure to change the properties of a script variable. You cannot
change the class of a script variable—you can change only the value. For more
information, see “Checking variables for referencing scripts” on page 117.

You cannot change the variable name or group type. If you want to change the
name or group type, you must delete the variable and create it again.

Changing variable properties


1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.
4 Click Script Variables.
Result: The Script Variables window appears.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 119


Working with script variables Standard 8.05

5 Select a script variable that you want to change.


6 Click Script Variable Properties to expand the Script Variable Properties
property sheet.
Result: The Script Variable Properties property sheet appears.

7 Change information in the following fields as necessary:


„ Comment: Change the description of the variable.
„ Class: Choose whether the variable has a single value (Item) or a set of
values (Set).
„ Value: Type a new value for the variable.
„ List of Values: If you chose Set, enter the new list of values.
Tip: You cannot change the variable type. If you want to change the type,
you must delete the variable and create a new variable.
8 Click Submit.
Result: All changes are saved.

120 Contact Center Manager


December 2007 Working with script variables

Copying script variables

Follow this procedure to copy the properties of a script variable to create a new
script variable.

Copying variables
1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.
4 Click Script Variables.
Result: The Script Variables window appears.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 121


Working with script variables Standard 8.05

5 Right-click the script variable that you want to copy, and select Copy.

Result: The script variable is copied. The script variable properties are
reset, so you can add new data to the copied variable.
6 In the right pane, minimize Script Variables.

122 Contact Center Manager


December 2007 Working with script variables

7 Maximize Script Variable Properties.

8 In the Name box, type the name of the variable.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 123


Working with script variables Standard 8.05

9 Click the Attribute tab.


Result: The Attribute tab appears with the values from the original variable.

10 Change the values as required.

124 Contact Center Manager


December 2007 Working with script variables

11 Click Submit.
Result: The copied variable is saved.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 125


Working with script variables Standard 8.05

To copy variables from the Script Variables grid


You can copy script variables from the Script Variables grid in the right pane of
the Scripting window.
1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.
4 Click Script Variables.
Result: The Script Variables window appears.

126 Contact Center Manager


December 2007 Working with script variables

5 From the Script Variables grid, select the row for the script variable you
want to copy, and right-click the row.

6 Select Copy.
Result: The script variable is copied. The script variable properties are
reset so you can add new data to the copied variable.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 127


Working with script variables Standard 8.05

Deleting script variables

Follow this procedure to remove a script variable from the system.

You cannot delete a script variable if it is referenced by any active scripts. For
more information, see “Checking variables for referencing scripts” on page 117.

Deleting variables
1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.
4 Click Script Variables.
Result: The Script Variables window appears.
5 Right-click the script variable that you want to delete.

128 Contact Center Manager


December 2007 Working with script variables

6 Select Delete.
Result: The Confirm Delete message box appears.

7 Click Yes to confirm that you want to delete the variable.


Result: The variable is deleted.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 129


Working with script variables Standard 8.05

Deleting variables from the Script Variables grid


You can delete script variables from the Script Variables grid in the right pane of
the Scripting window.
1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.
4 Click Script Variables.
Result: The Script Variables window appears.
5 From the Script Variables grid, select the row for the script variable you
want to delete, and right-click the row.

6 Select Delete.
Result: The script variable is deleted.

130 Contact Center Manager


December 2007 Working with script variables

Printing script variables

Follow these procedures to print script variables. You can write script variables
to a file, or you can be send them to a printer.

Printing script variables to file


1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.
4 Click Script Variables.
Result: The Script Variables window appears.
5 Right-click the Script Variables tree value.
6 Select Print Preview.
Result: The Crystal Reports viewer appears displaying all script variables.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 131


Working with script variables Standard 8.05

7 Select the Export Report icon.

Result: The Export Report dialog box appears.

132 Contact Center Manager


December 2007 Working with script variables

8 From the File Format list, choose one of the following:


„ Crystal Reports
„ Microsoft Excel
„ Microsoft Excel (data only)
„ Microsoft Word
„ Rich Text Format
„ Adobe Acrobat (pdf)
9 Choose the Page Range
10 In the File name box, type a file name.
Tip: Click Browse to select the path for the export file.
11 Click OK.
Result: The script variables are exported to the file.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 133


Working with script variables Standard 8.05

Printing script variables to file from the Script Variables grid


You can print script variables to file from the Script Variables grid in the right
pane of the Scripting window.
1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.
4 Click Script Variables.
Result: The Script Variables window appears.
5 From the Script Variables grid, select the row for the script variable you
want to save to a file, and right-click the row.

6 Select Print Preview.


Result: The Crystal Reports viewer appears displaying the details of the
selected script variable. You can proceed with saving the script variable to
file. See “Printing script variables to file,” on page 131.

134 Contact Center Manager


December 2007 Working with script variables

Printing script variable to a printer


1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.
4 Click Script Variables.
Result: The Script Variables window appears.
5 Right-click the Script Variables tree value.
6 Select Print Preview.
Result: The Crystal Reports viewer appears displaying all script variables.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 135


Working with script variables Standard 8.05

7 Select the Print Report icon.

Result: The Print Report dialog box appears. In the Select Printer section,
all printers mapped to your local computer are displayed.

136 Contact Center Manager


December 2007 Working with script variables

8 Select a printer and click Print.


Result: The script variables are sent to the selected printer.

Printing script variables to a printer from the Script Variables grid


You can print script variables from the Script Variables grid in the right pane of
the Scripting window.
1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.
4 Click Script Variables.
Result: The Script Variables window appears.
5 From the Script Variables grid, select the row of the script variable you
want to print, and right-click the row.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 137


Working with script variables Standard 8.05

6 Select Print.
Result: The script variable is be sent to the default printer that is mapped to
your local computer.
Tip: To see the script variable before printing, choose Print Preview. This
opens the Crystal Reports viewer. From here, can you proceed with
printing. See “Printing script variable to a printer,” on page 135.

138 Contact Center Manager


Chapter 5

Creating and administering scripts

In this chapter
Overview 140
Section A: Creating and editing scripts 141
Section B: Importing and exporting scripts 167
Section C: Administering scripts 175

Scripting Guide for Communication Server 1000/Meridian 1 PBX 139


Creating and administering scripts Standard 8.05

Overview

This chapter provides details about how to create, import, export, and administer
scripts in the Contact Center Manager Administration scripting environment.

Section A, “Creating and editing scripts,” explains how to:


„ create a new script
„ use the Web Scripts Editor to edit an existing script
„ add script elements to scripts
„ save your script
„ open Web Scripts Editor in a new window
„ use text find and replace
„ use the character count

Section B, “Importing and exporting scripts,” explains how to import and export
scripts, including the sample scripts that are provided with Contact Center
Manager Administration.

Section C, “Administering scripts,” explains how to administer scripts and


provides procedures to:
„ validate scripts and resolve validation errors
„ activate and deactivate scripts
„ deactivate scripts with circular dependencies
„ rename scripts
„ delete scripts

140 Contact Center Manager


December 2007 Creating and administering scripts

Section A: Creating and editing scripts

In this section
Creating new scripts 142
Editing scripts 150
Adding script elements to scripts 152
Saving changes to scripts 156
Opening Web Scripts Editor in a new window 158
Using text find and replace 162
Using character count 165

Scripting Guide for Communication Server 1000/Meridian 1 PBX 141


Creating and administering scripts Standard 8.05

Creating new scripts

Before you begin


Before you begin to create scripts, Nortel strongly recommends that you
carefully read “Getting started” on page 13. This chapter lists the system
resources that must be set up before you can use your scripts. Chapter one also
describes the script planning process.

Creating a new script


1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.

142 Contact Center Manager


December 2007 Creating and administering scripts

4 Right-click Script Manager, and then select New.


Result: The Web Scripts Editor appears. The left pane of the window
shows the selected script and its subscripts in the tree view. The right pane
shows the line numbers and text of the currently selected script. The
bottom section of the window shows errors that occurred during validation
of the selected script.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 143


Creating and administering scripts Standard 8.05

5 In the right pane, enter the text of the new script. You can add items such as
commands, variables, and intrinsics manually, or you can use the Script
Command Reference panel. For more information, see “Adding script
elements to scripts” on page 152.
6 Choose File > Save.
7 In the Confirm box, click Yes to save the script.
8 In the New Script Name box, type the name of the new script. For further
information about naming scripts, see “Naming guidelines” on page 145.
9 Click OK.
Result: The new script is created.

144 Contact Center Manager


December 2007 Creating and administering scripts

Naming guidelines
Use the following guidelines when naming scripts:
„ Script names are not case-sensitive; however, the first character in each
script name must be a letter.
„ The name you assign to a new script must be unique. You cannot enter the
name of an existing script.
„ If the script is referenced from the master script, the name given to the
script becomes the application name, and it appears on real-time displays
and historical reports.
„ You must also consider customer requirements when you view the
applications. Does the customer want all relevant applications for each
department to appear together? If so, the applications must be in
alphabetical order.
„ The use of prefixes to indicate contact type is optional. However, if the
prefixes are not used, all application statistics in historical reporting are
considered voice statistics if they are filtered by the variable ContactType in
the Report Creation Wizard. Nortel recommends the following naming
prefixes for contact type:
„ OB_ for outbound

„ EM_ for e-mail

„ WC_ for Web communication

„ VI_ for video

Using Web Scripts Editor in full screen mode


To maximize the work area for creating and editing scripts, you can use the Web
Scripts Editor in full-screen mode. To use full-screen mode, hide the Web
Scripts Editor tree view and status window by clicking arrows in the application
frame. You can expand the working area further by using the Web Scripts Editor
On/Off Toolbar option.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 145


Creating and administering scripts Standard 8.05

Maximizing the Web Scripts Editor working area


1 In the Web Scripts Editor window, click the Close Tree arrow.

Result: The tree view closes.

146 Contact Center Manager


December 2007 Creating and administering scripts

2 Click the Close Bottom arrow.

Result: The bottom of the Web Scripts Editor closes.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 147


Creating and administering scripts Standard 8.05

3 From the Web Scripts Editor menu, click View > On/Off Toolbar.

Result: The toolbar closes. The Web Scripts Editor is now maximized.

148 Contact Center Manager


December 2007 Creating and administering scripts

Tip: To show the hidden screen components, expand the Open Tree arrow
and the Open Bottom button.
4 Click View > On/Off Toolbar to show the Web Scripts Editor toolbar.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 149


Creating and administering scripts Standard 8.05

Editing scripts

Use the following procedures to edit existing scripts.

Editing a script
1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.
4 Click Script Manager.
Result: The Script Manager appears in the right pane of the Scripting
window.
5 Double-click the script that you want to edit.
Result: The Web Scripts Editor appears.

6 Edit the script in the Web Scripts Editor.

150 Contact Center Manager


December 2007 Creating and administering scripts

You can enter text manually, or you can insert elements using the Script
Command Reference panel. For further information about the Script
Command Reference panel, see “Adding script elements to scripts,” on
page 152.
Tip: Nortel recommends that you do not change scripts directly in the Web
Scripts Editor. Instead, copy the text of the script, paste it into Notepad, and
make your changes in Notepad to prevents loss of data should an error
occur on the server before you can save your changes.
7 Choose File > Save to save your changes.

Copying from sample scripts


You can copy parts of the sample scripts that are provided with Contact Center
Manager Administration into your own script. To do so, import the script that
you want to use. For instructions, see “Importing scripts into Contact Center
Manager” on page 168.

Script limits
Single scripts cannot exceed 50 000 characters. If you reach 50 000 characters in
a single script, an error message appears.

A space counts as one character; a carriage return counts as two characters.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 151


Creating and administering scripts Standard 8.05

Adding script elements to scripts

Use the Script Command pane to add commands, intrinsics, variables, events,
operators, and other elements to your script.

In the Script Command pane, all parameters that you must replace are
automatically inserted to help to reduce errors in your scripts.

Script elements
You can insert all of the following types of script elements from the Script
Command pane.

Commands
Basic commands include basic call processing elements, general elements, and
voice processing elements. For more information about these commands, see
“Basic script commands” on page 193.

Advanced commands
Advanced commands include basic call processing elements, general elements,
host connectivity elements, and voice processing elements. For more
information about these commands, see “Advanced script commands” on page
245.

ATTENTION
Contact Center 6.0 Networked Voice Agents is required to
support networking commands.

Intrinsics
Intrinsics include skillset, time, traffic, and call intrinsics. For more information
about intrinsics, see “Intrinsics” on page 343.

Variables
Variables include global variables and call variables. For more information, see
“Working with script variables” on page 99.

152 Contact Center Manager


December 2007 Creating and administering scripts

Events
Events are unsolicited events or failed responses that you can instruct the Event
Handler to check for. For more information, see “EVENT HANDLER” on page
247.

Operators
Operators include logical, mathematical, and relational operators. For more
information, see “Script expressions” on page 455.

Adding elements to scripts


1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.
4 Click Script Manager.
Result: The Script Manager appears in the right pane of the Scripting
window.
5 Double-click the script to which you want to add an element.
Result: The Web Scripts Editor appears.
Tip: Open the master script to see a view of all referenced scripts.
6 Position the cursor at the point where you want to insert the element.
7 At the bottom of the left pane, click the Script Commands tab.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 153


Creating and administering scripts Standard 8.05

8 Click the folder for the element type that you want to use. In this example,
the user selected the Commands folder.
Result: The folder expands to show the various elements of the basic
commands.

9 Click the type of element that you want to insert.


Example: In this example, the user is adding the CHANGE PRIORITY IN
AGENT command. Select Basic Call Processing Elements.
Result: The list of commands for the selected element type appears.
10 Click Insert.
Result: The element appears in the script.
11 Edit the script as required.
Example: Edit the script for the new CHANGE PRIORITY IN AGENT
command, by replacing the parameter <agent id> or <agent id list> with the
names of agents, and replacing the parameter <priority> with the new
priority.

154 Contact Center Manager


December 2007 Creating and administering scripts

12 Repeat steps 6 to 11 for each element that you want to insert.


13 Choose File > Save to save your changes.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 155


Creating and administering scripts Standard 8.05

Saving changes to scripts

You can make changes to a script while it is activated. You can then choose to
activate the script with the changes immediately, or you can save the script
without immediately implementing the changes. There are two ways to save a
script that is currently activated:
„ If you want to put the script into service immediately after making changes,
activate the script.
„ If you do not want to put the script into service immediately after making
changes, save the script using a different name.

When you activate a change to a script (under the existing name of the script),
calls in progress are processed using the old version of the script, and new calls
are processed using the new version of the script.

If the activation fails (because of a compilation error), the change to the script is
not saved. New calls still use the old version of the script.

Saving a change to a script


Follow these steps to save changes to a script.
For a new script:
„ To save the script using the current name, choose File > Save, type a
script name, and click OK.
For an existing, unactivated script:
„ To save the script using a new name, choose File > Save As. Type the
new name of the script, and click OK.
For a script in an edited or validated state:
„ Choose File > Save, and click OK.

156 Contact Center Manager


December 2007 Creating and administering scripts

For an active script:


„ To apply changes to an active script, choose File > Activate, and click
OK to confirm that you want to save the script.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 157


Creating and administering scripts Standard 8.05

Opening Web Scripts Editor in a new window

You can open the Script Manager, the Script Variables window, and the Web
Scripts Editor as new browser windows in the same session. You can open the
Web Scripts Editor for many scripts so you can work on more than one script at
a time.

Opening Script Editor in a new window


1 From the Scripting window, expand the required server.

158 Contact Center Manager


December 2007 Creating and administering scripts

2 Right-click Script Manager and select Open in New Window.


Result: The Script Manager appears in a new browser window.

Opening multiple scripting windows


1 From the Scripting window, expand the required server.
2 Right-click Script Manager, and click Open in New Window.
Result: A new Script Manager appears in a new browser window.

3 In the Script Manager grid, select the required scripts.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 159


Creating and administering scripts Standard 8.05

4 In the Script Manager grid, right-click the highlighted script, and click Open.
Result: The Web Scripts Editor appears in a new browser window and
displays the script.

160 Contact Center Manager


December 2007 Creating and administering scripts

5 From the Scripting window, click the Script Variables tree item.
Result: The Script Variables window appears in the right pane.

Tip: The Script Manager, Script Variables, and Web Scripts Editor all
appear in separate browser windows.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 161


Creating and administering scripts Standard 8.05

Using text find and replace

In the Web Scripts Editor, you can find text elements in scripts and, if required,
replace script text.

The search can be case-sensitive and non-case-sensitive with multiple word


search and the ability to search forward and backward through the script.

Using text find


1 From the Script Manager, select and open a script.
Result: The Web Scripts Editor appears with the selected script.

2 Select Edit > Find.


Result: The Find dialog box appears.

162 Contact Center Manager


December 2007 Creating and administering scripts

3 Enter the search text and click Find Next.


4 Continue clicking Find Next until you find the required text.

Using text replace


1 From the Script Manager, select and open a script.
Result: The Web Scripts Editor appears with the selected script.

2 Select Edit > Replace.


Result: The Replace dialog box appears.

3 In the Find what box, enter a value.


4 In the Replace with box, enter a value.
5 Click Find Next to search for the Find what value in the script text.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 163


Creating and administering scripts Standard 8.05

6 Click Replace to replace the Find what text with the Replace with text.
Tip: To replace all of the found Find what values with the Replace with
value, click Replace All.

164 Contact Center Manager


December 2007 Creating and administering scripts

Using character count

The Web Scripts Editor can count the number of characters in a script. This
helps you ensure that the maximum character count for a script is not exceeded.

Using character count


1 From the Script Manager, select and open a script.
Result: The Web Scripts Editor appears with the selected script.
2 Select View > Character Count.
Result: The Character Count message box appears.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 165


Creating and administering scripts Standard 8.05

166 Contact Center Manager


December 2007 Creating and administering scripts

Section B: Importing and exporting


scripts

In this section
Importing scripts into Contact Center Manager 168
Exporting scripts to a remote location 170

Scripting Guide for Communication Server 1000/Meridian 1 PBX 167


Creating and administering scripts Standard 8.05

Importing scripts into Contact Center Manager

Import command
Use the Import command to copy an existing script from your local hard drive, a
network drive, or a floppy disk into the current script. This command adds the
text of the imported script to text in the current script.

You cannot import a script that was created in another application, such as
Microsoft Word, because formatting characters may not properly import into the
Web Scripts Editor. However, if you create a text document that you want to use
as a script, you can copy the text into a script in the Web Scripts Editor.

Importing sample scripts


To use the sample scripts that are provided with Contact Center Manager
Administration, you must first import them using the following procedure.

Importing scripts
1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.
4 Click Script Manager.
Result: The Script Manager appears in the right pane of the Scripting
window.
5 Double-click the script into which you want to import another script.
Tip: If you want to import the script into a new script, right-click Script
Manager, and select New.
Result: The Web Scripts Editor appears.

168 Contact Center Manager


December 2007 Creating and administering scripts

6 Choose File > Import.


Result: The following dialog box appears prompting you for the location of
the script that you want to import.

7 Navigate to the file that you want to import.


8 Select the file to import.
9 Click OK to import the script.
Result: The text of the imported file appends to text in the Web Scripts
Editor.
10 Modify the imported script as necessary.
Tip: The script that you import may contain references to variables.
Variables are not imported with the script. You must define the variables on
your system. For details, see “Creating script variables” on page 109.
11 Choose File > Save to save your changes.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 169


Creating and administering scripts Standard 8.05

Exporting scripts to a remote location

Export command
The Export command writes the currently opened script to a file on your local
hard drive with the file extension .s.

ATTENTION
If there is already a script in this location with the same
name as the exported script, the exported script overwrites
it.

Exporting a script to a new file


1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.

170 Contact Center Manager


December 2007 Creating and administering scripts

4 Click Script Manager.


Result: The Script Manager appears in the right pane of the Scripting
window.

5 Double-click the file that you want to export.


Result: The Web Scripts Editor appears.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 171


Creating and administering scripts Standard 8.05

6 Choose File > Export.


Result: A dialog box appears prompting you for the location to which you
want to export the script.

7 In the File name box, type the name of the new script file.
8 Click Save.
Result: A copy of the script is placed in the location you specified.

Export All command


The Export All command is similar to the Export command, but in addition to
saving the current script, it saves all its subscripts and you can choose the export
directory.

Risk of overwriting data

.
If there are already scripts in this location with the same names as
the exported scripts, the exported scripts overwrite them.

172 Contact Center Manager


December 2007 Creating and administering scripts

Exporting the current script and all of its subscripts to a new file
1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.
4 Click Script Manager.
Result: The Script Manager appears in the right pane of the Scripting
window.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 173


Creating and administering scripts Standard 8.05

5 In the Script Manager grid, double-click a script to export.


Result: The Web Scripts Editor appears displaying the selected script.

6 Choose File > Export All.


Result: A Save As dialog box appears. You can select the file location for
the scripts.

174 Contact Center Manager


December 2007 Creating and administering scripts

Section C: Administering scripts

In this section
Validating scripts 176
Activating and deactivating scripts 182
Deactivating scripts with circular dependencies 186
Renaming scripts 188
Deleting scripts 190

Scripting Guide for Communication Server 1000/Meridian 1 PBX 175


Creating and administering scripts Standard 8.05

Validating scripts

Follow the procedure in this section to validate a script. If you want to save a
script without validating it (for example, you plan to continue working on it
later), see “Saving changes to scripts” on page 156.

You can save a script without validating it. However, you cannot activate the
script if it is not validated.

What is script validation?


Before a script is put into service or activated, it must be checked to ensure that
the syntax and semantics are correct. This process is called validation. If the
script contain no errors, validation results in an executable version of the script.
If the script contains errors, validation results in a list of those errors and the
corresponding lines of the script where the errors occurred.

If you create a new script or modify an existing non-active script, you must
validate the script manually before it can be activated. If you are working with
an active script, you must save changes by activating the new version of the
script. The activation process validates the script automatically.

The system attempts to activate all referenced scripts when a script is activated.
However, the referenced scripts are not validated automatically. You must
validate each referenced script separately before you activate the script.

Validating scripts
1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.

176 Contact Center Manager


December 2007 Creating and administering scripts

4 Click Script Manager.


Result: The Script Manager appears in the right pane of the Scripting
window.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 177


Creating and administering scripts Standard 8.05

5 Double-click the script file that you want to validate.


Tip: You can also import a script to validate.
Result: The Web Scripts Editor appears.

6 Choose Edit > Validate.


7 Click Yes to begin the validation process.
Result: If you did not save this script, the system prompts you to save it
now.

178 Contact Center Manager


December 2007 Creating and administering scripts

8 Type a name for the script, and then click OK.


Result: The results of the validation process appear in the lower pane of
the Script Manager window.
Tip: If the script contains no errors, a message appears indicating that the
operation successfully completed. If the script contains errors, you must
correct them before you can activate the script.

9 Activate the script.


For more information, see “Activating and deactivating scripts” on page
182.
If the script contains errors, you must correct them before you can activate
the script.
10 Review errors that appear in the bottom section of the window.
For information about the errors and what they mean, see “Validation
errors” on page 565.
11 Continue to correct the errors and revalidate the script until no further errors
appear.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 179


Creating and administering scripts Standard 8.05

Example
This example demonstrates how to interpret script error messages.

If you try to validate the following section of script text,


IF (DAY OF WEEK = business_days_gv)
AND (TIME OF DAY = night_hours_gv) THEN
QUEUE TO SKILLSET english_sales_sk
GIVE elevator_music_gv

the following errors appear:


Operation Failed: Failed to validate script.
Error: 20509 Script compiling failed.
Line: 1 Position: 19 Code: 100 Error: An undefined identifier is
encountered.
Line: 1 Position: 17 Code: 77 Error: Incompatible types in Equal
relational expression.
Line: 2 Position: 20 Code: 100 Error: An undefined identifier is
encountered.
Line: 2 Position: 18 Code: 77 Error: Incompatible types in Equal
relational expression.
Line: 3 Position: 20 Code: 97 Error: An undefined skillset is
used.
Line: 4 Position: 13 Code: 100 Error: An undefined identifier is
encountered.
Line: 5 Position: 2 Code: 16 Error: An end of file is encountered
in the script in the middle of a statement.
Source: CSriptWrapOAM.ScriptCOM.1

To correct these errors, perform the following tasks:


„ Define the variables business_days_gv, night_hours_gv and
elevator_music_gv in the Script Variables window.
„ Define the skillset english_sales_sk in the Skillset window.
„ Complete the GIVE command by adding the word Music.
„ Complete the IF-THEN-END IF command by adding END IF to the script.

180 Contact Center Manager


December 2007 Creating and administering scripts

After you correct the errors, the script appears as follows:


IF (DAY OF WEEK = business_days_gv)
AND (TIME OF DAY = night_hours_gv) THEN
QUEUE TO SKILLSET english_sales_sk
WAIT 2
GIVE MUSIC elevator_music_gv
END IF

If you validate the script again, the request is successful—no errors occur.

For a complete list of validation errors and what they mean, see “Validation
errors” on page 565.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 181


Creating and administering scripts Standard 8.05

Activating and deactivating scripts

Perform the procedures in this section to activate or deactivate your scripts.

What is an activated script?


An activated script is a script that is processing calls or that is in an active state,
ready to process calls.

If you create a new script or modify an existing non-active script, you must
validate the script manually before it can be activated. If you are working with
an active script, you must save changes by activating the new version of the
script. The activation process validates the script automatically.

The system attempts to activate all referenced scripts when a script is activated.
However, the referenced scripts are not validated automatically. You must
validate each referenced script separately before you activate the script.

Example
One of the BestAir scripts, the All_Shift script, references the Days, Nights, and
Wkends scripts. The All_Shift script is the primary script, and the others are
secondary scripts. Before activating the primary script, BestAir’s system
administrator must validate the secondary scripts.

182 Contact Center Manager


December 2007 Creating and administering scripts

What is a deactivated script?


A deactivated script is a script that processes no new calls. If calls are already in
the system using the script when you deactivate it, the script remains active for
those calls until the calls are complete.

You can deactivate a script only if it is not referenced by other active scripts.

You cannot deactivate the master script or the network script. However, you can
change the contents and activate the new version.

Activating scripts
1 Open the Scripting window.
2 Expand the system tree in the Scripting window.
3 Click the appropriate server.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 183


Creating and administering scripts Standard 8.05

4 Click Script Manager.


Result: The Script Manager appears in the right-hand pane of the Scripting
window.

5 Double-click the script file to activate it.


Result: The Web Scripts Editor appears.
6 Choose File > Activate.
Result: If the script was not validated before, the validation process begins.
Otherwise, the script is activated immediately.
A script must be in a validated state before it can be activated. If the script
is currently activated when you make changes, it is validated automatically.
You must reactivate the script.

When activating scripts:


„ If a script is activated but is not referenced by the master script (directly, or
indirectly through other scripts), it does not process calls.
„ Nortel recommends that you do not activate scripts during busy contact
center periods.
„ To avoid having to reactivate the master script when you write test scripts,
keep a test CDN and a test primary script activated at all times. Then, edit

184 Contact Center Manager


December 2007 Creating and administering scripts

and change only the test primary script, not the master script. You can also
use other secondary test scripts. However, it is still advisable to make
changes outside busy hours.

Deactivating scripts
1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.
4 Click Script Manager.
Result: The Script Manager appears in the right pane of the Scripting
window.
5 Double-click the file you want to deactivate.
Result: The Web Scripts Editor appears.
6 Choose File > Deactivate.

You cannot deactivate a script if it is referenced by another active script. You


must first either deactivate the referencing script or remove the reference.

To deactivate scripts with circular dependencies, see “Deactivating scripts with


circular dependencies” on page 186.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 185


Creating and administering scripts Standard 8.05

Deactivating scripts with circular


dependencies

This section provides a procedure to deactivate scripts with circular


dependencies by first breaking the dependencies.

What are circular dependencies?


When two scripts reference each other (directly or indirectly through other
scripts), they have a circular dependency. Circular dependencies are accepted by
Contact Center Manager (except that a script cannot reference itself directly),
but they are not recommended. Because you cannot deactivate a script if it is
referenced by another active script, you first must break the dependency.

Example
The following illustration shows how a circular dependency is created when two
scripts reference each other.

For example, if you want to deactivate secondary script A, you must first delete
the reference to secondary script A from the primary script and from secondary
script B. Then you can deactivate secondary script A.

186 Contact Center Manager


December 2007 Creating and administering scripts

Deactivating scripts with circular dependencies


1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.
4 Click Script Manager.
Result: The Script Manager appears in the right pane of the Scripting
window.
5 Select a script that references the script you want to deactivate.
Example: In the example shown on page 186, this is either the primary
script or secondary script B.
6 Double-click the script name.
Result: The Web Scripts Editor appears.
7 Remove the EXECUTE SCRIPT command that causes the circular
dependency.
8 Validate and activate this new version of the script.
9 Repeat steps 5 to 8 for each script that references the script you want to
deactivate.
When you change all of the referencing scripts, the circular dependency is
broken.
10 Deactivate each script that is no longer referenced by the script in step 5.
When calls are still active in the system, wait until active calls are complete
before you deactivate the referenced scripts.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 187


Creating and administering scripts Standard 8.05

Renaming scripts

You can rename a script in either the Script Manager or the Web Scripts Editor.
Contact Center Manager does not create a copy of the existing script with the old
name. Ensure that you meet the following requirements when you rename a
script:
„ Deactivate the script. For more information, see “Deactivating scripts” on
page 185.
„ Give the script a unique name. You cannot enter the name of an existing
script. Spaces are not allowed in script names.

Renaming scripts
1 Open the Scripting window.
2 Expand the system tree.
3 Click the appropriate server.
4 Click Script Manager.
Result: The Script Manager appears in the right pane of the Scripting
window.
5 Choose one of the following options:
a. To rename the script in the Script Manager, right-click the script you
want to rename and choose Rename.
b. To rename the script in the Web Scripts Editor, open the script and
choose File > Rename.
Result: Rename Confirmation message appears.

188 Contact Center Manager


December 2007 Creating and administering scripts

6 Click Yes.
Result: The Rename Script dialog box appears prompting you for the new
name of the script.

7 Type a new name for the script.


8 Click OK.
Tip: The new name you assign to the script must be unique. You cannot
enter the name of an existing script. For further information about naming
scripts, see “Naming guidelines” on page 145.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 189


Creating and administering scripts Standard 8.05

Deleting scripts

Follow the procedure in this section to remove a script from the system.

Before you begin


Ensure that the script is deactivated before you remove it from the system. For
more information, see “Activating and deactivating scripts” on page 182.

Deleting scripts
1 Open the Scripting window.
2 Expand the system tree in the Scripting window.
3 Click the appropriate server.
4 Click Script Manager.
Result: The Script Manager appears in the right-hand pane of the Scripting
window.
5 Right-click the script that you want to delete, and choose Delete.

190 Contact Center Manager


December 2007 Creating and administering scripts

6 Click OK to confirm the deletion of the script.


Result: The script is deleted.

When you delete a script, you delete the script, but not the referenced
variables. If no other scripts use the referenced variables, you can delete
them to save space on the server. For more information, see “Deleting
script variables” on page 128.

Removing references and deleting scripts


You may not be able to remove references and delete scripts if you modify the
master script during a period of heavy traffic.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 191


Creating and administering scripts Standard 8.05

192 Contact Center Manager


Chapter 6

Basic script commands

In this chapter
Overview 194
Section A: Basic general commands 195
Section B: Basic contact processing commands 209

Scripting Guide for Communication Server 1000/Meridian 1 PBX 193


Basic script commands Standard 8.05

Overview

This chapter describes the basic script commands to which all Contact Center
Manager systems have access. This chapter shows how to write the commands
in your scripts (script syntax) and the parameters and optional segments that
make up the commands.

Section A, “Basic general commands,” describes the general commands that you
can use in your scripts. These include commands such as IF-THEN-ELSE-END
IF, EXECUTE, and QUIT. All commands in this section apply to both voice and
multimedia contacts.

Section B, “Basic call processing commands,” describes the basic call


processing commands that you can use in your scripts. These commands include
DISCONNECT, GIVE RINGBACK, QUEUE TO AGENT, and ROUTE
CALL. All commands in this section apply to voice contacts only.

All examples in this chapter demonstrate basic script commands using voice
contacts only. Commands, such as GIVE RAN or GIVE MUSIC, do not apply
for multimedia contacts.

For information about the GIVE MUSIC or GIVE RAN and other commands in
SIP-enabled contact centers, see “SIP Contact Center” on page 675.

194 Contact Center Manager


December 2007 Basic script commands

Section A: Basic general commands

In this section
ASSIGN TO 196
EXECUTE 198
EXECUTE SCRIPT 199
IF-THEN-END IF 200
IF-THEN-ELSE-END IF 201
QUIT 203
SECTION 205
WAIT 206

Scripting Guide for Communication Server 1000/Meridian 1 PBX 195


Basic script commands Standard 8.05

ASSIGN TO

Use the ASSIGN TO command in your scripts to assign values to call variables.
For more information about call variables, see “Working with script variables”
on page 99.

Syntax change
The syntax of the ASSIGN TO command is different from previous product
releases. Now you can use the ASSIGN TO command in a voice session.

You can still use the old syntax, Assigned, in Contact Center Manager scripts.

Script syntax
ASSIGN <value> TO <variable>

Parameters
Enter information for the following parameters:
„ <variable> The name of the call variable to which you want to assign a
value when a script executes. You can use call variables of only type Item.
„ <value> The value that you want to assign to the call variable. Replace this
parameter with an item or with an expression.

Examples

Example 1
The following command assigns a value of 10 to the variable int_var_cv.
ASSIGN 10 TO int_var_cv

Example 2
The following example assigns the value of the total number of active calls,
divided by the call rate, plus 10 to the variable int_var_cv.

196 Contact Center Manager


December 2007 Basic script commands

ASSIGN (TOTAL ACTIVE CALLS / CALL RATE) + 10 TO int_var_cv

Example 3
The following example causes the section Loop to repeat three times.
ASSIGN 0 TO counter_cv
SECTION Loop
WAIT 30
GIVE RAN all_agents_busy_ran_gv
IF (counter_cv = 3) THEN
EXECUTE SCRIPT Finished
END IF
ASSIGN counter_cv + 1 TO counter_cv
EXECUTE Loop

Scripting Guide for Communication Server 1000/Meridian 1 PBX 197


Basic script commands Standard 8.05

EXECUTE

Use the EXECUTE command to branch to a section in the same script.

After the specific section executes, the script continues executing to the end of
the script or until it encounters a QUIT command. The script does not return to
the section of the script from which it was executed.

Script syntax
EXECUTE <section_label>

Parameter
Enter information for the following parameter:
„ <section_label> The name of the section that you want to execute.

Example
In this example, if the number of calls queued to the sales skillset exceeds 20,
the section named Estimate_wait_section runs. Otherwise, the caller hears music
until the call is answered.
IF (QUEUED COUNT sales_sk > 20) THEN
EXECUTE Estimate_Wait_Section
ELSE
GIVE MUSIC pop_music_gv
QUIT
END IF
SECTION Estimate_Wait_Section
...

198 Contact Center Manager


December 2007 Basic script commands

EXECUTE SCRIPT

Use the EXECUTE SCRIPT command to branch from one script to another.

The call branches to the referenced script and does not return at the end of the
referenced script.

Script syntax
EXECUTE SCRIPT <Script_Name>

Parameter
Enter information for the following parameter:
„ <Script_Name> The name of the script that you want to run.

Example
In this example, the EXECUTE SCRIPT command runs different scripts
depending on the day and time that a call comes in to the contact center.
IF (DAY OF WEEK = weekend_gv) THEN
EXECUTE SCRIPT Script_B
END IF
IF (DAY OF WEEK = business_days_gv)
AND (TIME OF DAY = business_hours_gv) THEN
EXECUTE SCRIPT Script_C
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 199


Basic script commands Standard 8.05

IF-THEN-END IF

Use the IF-THEN-END IF command in conditional situations. If the specified


condition is met, the THEN statements are executed. Otherwise, the script skips
to the next command.

An IF-THEN-END IF command can have multiple statements between THEN


and END IF.

An IF command can appear within the THEN or ELSE clause of another IF


command, and each IF must have exactly one matching END IF command.

Script syntax
IF <logical_condition> THEN <statements> END IF

Parameters
Enter information for the following parameters:
„ <logical_condition> The condition for which you want the script to test.
„ <statements> The action that you want the script to take if the condition is
met.

Example
In this example, calls whose CLID is included in the vip_list variable receive
special treatment, including a recorded announcement, and are queued to the
preferred customer skillset with high priority.
IF (CLID = vip_list_gv) THEN
GIVE RAN special_callers_ran_gv
QUEUE TO SKILLSET preferred_cust_sk WITH PRIORITY 1
WAIT 2
GIVE MUSIC classical_music_gv
END IF

200 Contact Center Manager


December 2007 Basic script commands

IF-THEN-ELSE-END IF

Use the IF-THEN-ELSE-END IF command in conditional situations. If the


specified condition is met, then the THEN statements are executed. Otherwise,
the script executes the ELSE statements.

An IF-THEN-ELSE-END IF command can have multiple statements between


THEN and ELSE, and multiple statements between ELSE and END IF.

An IF command can appear within the THEN or ELSE clause of another IF


command, and each IF must have exactly one matching END IF command.

Script syntax
IF <logical_condition> THEN <statement1> ELSE <statement2> END IF

Parameters
Enter information for the following parameters:
„ <logical_condition> The condition for which you want the script to test.
„ <statement1> The action that you want the script to take if the condition is
met.
„ <statement2> The action that you want the script to take if the condition is
not met.

Examples

Example 1
The following script example checks the CLID of the call. If the CLID is 905-
863-3123 the call is queued to the customer service skillset with a priority of 1.
This caller also hears a special announcement. Otherwise, the call is queued with
a priority of 3 and the caller hears a different announcement.
IF (CLID = 9058633123) THEN
QUEUE TO SKILLSET customer_service_sk WITH PRIORITY 1
WAIT 2

Scripting Guide for Communication Server 1000/Meridian 1 PBX 201


Basic script commands Standard 8.05

GIVE RAN special_ran_gv /* Special Greeting */


ELSE
QUEUE TO SKILLSET customer_service_sk WITH PRIORITY 3
WAIT 2
GIVE RAN alternate_ran_gv
END IF
GIVE MUSIC classical_music_gv

Example 2
The following example shows how you can use an IF-THEN-END IF command
within an IF-THEN-ELSE-END IF command. You must have an END IF
command for each IF command.

Each END IF is associated with the nearest IF command.


IF (CLID = vip_list_gv) THEN
EXECUTE Vips
ELSE
IF (CLID = special_list_gv) THEN
EXECUTE Special
END IF
END IF

202 Contact Center Manager


December 2007 Basic script commands

QUIT

The QUIT command is necessary only when the execution of a script must end
while commands still remain to run in the script.

Because scripts stop executing automatically when no commands remain to


execute, the QUIT command usually is not needed at the end of a script.

Script syntax
QUIT

When to use
Use the QUIT command to terminate further script execution.

This command does not disconnect the call. For example, if the call is already
queued to a skillset, the call remains queued and continues to receive whatever
tones, silence, or music were specified for the call earlier in the script. QUIT
ends only the script execution, not call processing.

Restriction
The QUIT command cannot be the first command in a script.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 203


Basic script commands Standard 8.05

Example
In this example, the script checks whether the customer service skillset is out of
service. If the skillset is out of service, the script jumps to the closed section.
Otherwise, the script continues to queue the call to customer service with a
priority of 1. After 2 seconds, the caller hears a recorded announcement and then
music. The QUIT command after the GIVE MUSIC command prevents the
script from continuing on to the closed section.
IF OUT OF SERVICE customer_service_sk THEN
EXECUTE Closed
END IF
QUEUE TO SKILLSET customer_service_sk WITH PRIORITY 1
WAIT 2
GIVE RAN sevice_ran_gv
GIVE MUSIC classical_music_gv
QUIT
SECTION Closed
GIVE RAN closed_ran_gv
DISCONNECT

204 Contact Center Manager


December 2007 Basic script commands

SECTION

Use the SECTION command to define a section of commands. The execution of


the script can jump to any section in the same script by using the EXECUTE
command.

Script syntax
SECTION <section_name>

Parameter
Enter information for the following parameter:
„ <section_name> The name of the section.

Example
The following example uses a SECTION command with an EXECUTE
command to create a simple loop. The call is sent to a section which requeues
the call if the call is not queued, thereby moving the call out of the Wait_Loop
section.
SECTION Wait_Loop
WAIT wait_delay_gv
IF NOT QUEUED THEN
EXECUTE Requeue_Call
END IF
GIVE RAN please_wait_ran_gv
EXECUTE Wait_Loop
SECTION Requeue_Call
/* script continues here */

Scripting Guide for Communication Server 1000/Meridian 1 PBX 205


Basic script commands Standard 8.05

WAIT

Use the WAIT command to suspend a script for a period before executing the
next script command. Nortel recommends that you run a WAIT command of at
least 2 seconds after queuing a call to a skillset or to an agent. The 2-second
pause provides time for the call to be answered by the agent before the command
is executed.

You enter the WAIT time in seconds format. If you enter a WAIT time of 0, the
system resets the value to 2 seconds. Zero is the only value that receives special
handling. The system uses timers when processing calls in a WAIT state.
Therefore, the WAIT time is accurate to +/– 1 second.

For example, if you specify a WAIT time of 5 seconds, the WAIT time can be
anywhere between 4 and 6 seconds.

Script syntax
WAIT <time_in_seconds>

Parameter
Enter information for the following parameter:
„ <time_in_seconds> The amount of time, in seconds, that you want the
script to pause.
Replace this parameter with a variable of type seconds or with a numerical
constant.

206 Contact Center Manager


December 2007 Basic script commands

Restriction
The WAIT command cannot be the first command given to a voice contact. If a
WAIT command is the first command applied to a call, the voice contact is
rejected and given default treatment.

Example
In this example, calls are queued to the sales skillset. After a 2-second delay,
callers hear a recorded announcement asking them to wait.
QUEUE TO SKILLSET sales_sk
WAIT 2
GIVE RAN please_wait_ran_gv

WAIT command and report statistics


The placement of the WAIT command, particularly in the master script, can
affect report statistics.

For example if the master script includes the following:


GIVE RINGBACK
WAIT 6
IF CDN = test_cdn THEN
EXECUTE Sales_App
END IF

And the primary script performs the following:


QUEUE TO SKILLSET Sales_Sk
WAIT 2

If a call arrives and agents are available in Sales_Sk, then the Application
Report shows an Average Delay of at least 6 to 8 seconds, depending on the
timing queue, and the Skillset Report shows 0 to 2 seconds.

Nortel recommends that you qualify the GIVE RINGBACK command as shown
in the following script so that only transferred calls are affected by the WAIT
statement—new calls are not affected.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 207


Basic script commands Standard 8.05

IF TRANSFERRED THEN
GIVE RINGBACK
WAIT 6
END IF
IF CND = test_cdn THEN
EXECUTE Sales_App
END IF

208 Contact Center Manager


December 2007 Basic script commands

Section B: Basic contact processing


commands

In this section
CHANGE PRIORITY IN AGENT 210
CHANGE PRIORITY IN SKILLSET 214
DISCONNECT 216
GIVE BUSY 217
GIVE MUSIC 219
GIVE OVERFLOW 221
GIVE RAN 223
GIVE RINGBACK 225
GIVE SILENCE 227
QUEUE TO AGENT 229
QUEUE TO SKILLSET 232
REMOVE FROM AGENT 237
REMOVE FROM SKILLSET 239
ROUTE CALL 241

Scripting Guide for Communication Server 1000/Meridian 1 PBX 209


Basic script commands Standard 8.05

CHANGE PRIORITY IN AGENT

Use the CHANGE PRIORITY IN AGENT command to change the priority of a


call that is queued to a specified agent.

You can use the CHANGE PRIORITY IN AGENT command to change the
priority of a call in an agent’s queue only when the call was queued by the
QUEUE TO AGENT command. You cannot use it to change the priority of a
call that was queued using the QUEUE TO SKILLSET command.

The CHANGE PRIORITY IN AGENT command applies only to local agents.

Script syntax
CHANGE PRIORITY IN AGENT [<agent_ID> | <agent_ID_list>] TO
PRIORITY <priority>

Parameters
Enter information for the following parameters:
„ <agent_ID> or <agent_id_list> The ID of the agent to whom the call is
queued, or a list of IDs of agents to whom the call is queued.
„ <priority> The new priority with which you want the call queued to the
specified agent.

210 Contact Center Manager


December 2007 Basic script commands

Restriction
This command applies to all voice and multimedia contacts.

The CHANGE PRIORITY IN AGENT command cannot be the first command


in a script.

Voice example
In the following voice example, a call is queued to an agent variable named
agent_1 (representing an agent named Joe Smith) with a priority of 5 when it
first arrives. After 20 seconds, if the call is still unanswered, the priority changes
to 2, and after 60 seconds, the priority of the call increases to 1.

When you replace a specific agent with an agent variable, you do not need to
modify your scripts if the agent leaves the contact center and is replaced by
another agent.
ASSIGN 5 TO priority_cv
QUEUE TO AGENT agent_1 WITH PRIORITY priority_cv
WAIT 5
SECTION Check_Age
GIVE RAN agent_busy
WAIT 20
IF (AGE OF CALL > 120) THEN
EXECUTE Too_Long
ELSE
IF (AGE OF CALL > 60) THEN
IF (priority_cv <> 1) THEN
ASSIGN 1 TO priority_cv
CHANGE PRIORITY IN AGENT agent_1 TO
PRIORITY priority_cv
END IF
ELSE
IF (AGE OF CALL > 20) THEN
IF (priority_cv <> 2) THEN

Scripting Guide for Communication Server 1000/Meridian 1 PBX 211


Basic script commands Standard 8.05

ASSIGN 2 TO priority_cv
CHANGE PRIORITY IN AGENT agent_1
TO PRIORITY priority_cv
END IF
END IF
END IF
END IF
EXECUTE Check_Age

Multimedia example
In this example, a contact is queued to an agent variable named
contact_agent_cv (representing an agent named Joe Smith) with a priority of 5
when the contact first arrives into the contact center. After 120 seconds, if the
call is unanswered, the priority of the contact is increased to 2. After 300
seconds, if the call is unanswered, the priority of the contact is increased to 1.
ASSIGN CONTACT DATA "%AGENT%AGENT" TO contact_agent_cv
ASSIGN CONTACT DATA "%PRIORITY%PRIORITY" TO contact_priority_cv
QUEUE TO AGENT contact_agent_cv WITH PRIORITY contact_priority_cv
WAIT 10
SECTION Check_Age
WAIT 20
IF (AGE OF CALL > 600) THEN
EXECUTE Too_Long
ELSE
IF (AGE OF CALL > 300) THEN
IF (contact_priority_cv <> 1) THEN
ASSIGN 1 TO contact_priority_cv
CHANGE PRIORITY IN AGENT contact_agent_cv
TO PRIORITY contact_priority_cv
END IF
ELSE
IF (AGE OF CALL > 120) THEN

212 Contact Center Manager


December 2007 Basic script commands

IF (contact_priority_cv <> 2) THEN


ASSIGN 2 TO contact_priority_cv
CHANGE PRIORITY IN AGENT contact_agent_cv
TO PRIORITY contact_priority_cv
END IF
END IF
END IF
END IF
EXECUTE Check_Age

Scripting Guide for Communication Server 1000/Meridian 1 PBX 213


Basic script commands Standard 8.05

CHANGE PRIORITY IN SKILLSET

Use the CHANGE PRIORITY IN SKILLSET command to change the priority


of a call in a skillset to which it is queued. The priority of the call is changed in
all skillsets listed in the command. Changing skillset priorities applies only to
local skillsets.

Script syntax
CHANGE PRIORITY IN SKILLSET [<skillset> | <skillset_list>] TO
PRIORITY <priority>

Parameters
Enter information for the following parameters:
„ <skillset> or <skillset_list> The skillset, or list of skillsets, to which the
call is queued. You can also replace this parameter with a variable returning
a skillset or a skillset list.
„ <priority> The new priority with which you want the call queued to the
specified skillset.

Restrictions
This command applies to all voice and multimedia contacts.

The CHANGE PRIORITY IN SKILLSET command cannot be the first


command in a script.

214 Contact Center Manager


December 2007 Basic script commands

Example
In this example, the call is queued to the sales skillset. This section of the script
tests the current position of the call in the skillset queue. If it is more than 5, the
priority is raised to priority 1 (unless it is already priority 1).
QUEUE TO SKILLSET sales_sk
WAIT 2
IF (POSITION IN QUEUE sales_sk > 5)
AND (PRIORITY IN QUEUE sales_sk <> 1) THEN
CHANGE PRIORITY IN SKILLSET sales_sk TO PRIORITY 1
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 215


Basic script commands Standard 8.05

DISCONNECT

Use the DISCONNECT command to disconnect a contact. The contact can be


disconnected at any time that it is in the CDN or ROUTE POINT queue, except
when it is presented to, or answered by, an agent.

Script syntax
DISCONNECT

Restrictions
This command applies to all voice and multimedia contacts but, for script
efficiency, Nortel recommends that multimedia contacts be held in the script
even if a skillset goes out of service or if an agent logs off. If the DISCONNECT
command is used for multimedia contacts, it triggers the Contact Center
Multimedia to immediately resubmit the contact to the script.

Nortel recommends that you keep the contact in the script instead of
disconnecting the contact and repeating the task of presenting the multimedia
contact to the script several times.

Insert no commands after the DISCONNECT command.

Example
In this example, calls coming in to the contact center between August 10 and
August 23 (represented by a variable named august_holidays_gv) receive a
recorded announcement stating that the contact center is closed. Then the call is
disconnected.
IF (DATE = august_holidays_gv) THEN
GIVE RAN gone_fishing_ran_gv
DISCONNECT
END IF

216 Contact Center Manager


December 2007 Basic script commands

GIVE BUSY

Use the GIVE BUSY command to provide a busy tone to a call before it is
disconnected by the switch. A call can receive a busy tone any time that it is in
the CDN queue, except when it is presented to, or answered by, an agent.

First treatment
This treatment must be the first treatment that the call receives; otherwise, for
some trunk types, the switch does not disconnect the call automatically after
giving the busy tone, which can cause trunks to stay connected until the user
disconnects the call.

Because some statements give an automatic ringback tone, you must analyze the
script carefully to ensure that these commands do not execute before the GIVE
BUSY command. Issuing the ringback tone after GIVE BUSY command
ensures that the busy tone is always the first treatment given to the call. For
more information about commands that automatically generate a ringback
treatment, see “Default treatments” on page 84.

Script syntax
GIVE BUSY {CONTROLLED}

Optional
The CONTROLLED keyword is optional for this command.

CONTROLLED keyword
By default, after the GIVE BUSY command is executed, the call is no longer
under the control of Contact Center Manager. However, if you use the
CONTROLLED keyword, the call remains in the control of Contact Center
Manager, which means that if an error condition occurs on the switch (cannot
give the tone to the call, for example), the call is returned to the queue so that it
can be further treated by the system.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 217


Basic script commands Standard 8.05

Nortel highly recommends that you use the CONTROLLED keyword with this
command.

Restrictions
This command applies to voice contacts only.

Do not use this command in the network script (if you purchased the NSBR
feature).

Example
GIVE BUSY CONTROLLED
/* call reaches here only if above command fails */
GIVE RAN no_service_available_ran_gv
DISCONNECT

218 Contact Center Manager


December 2007 Basic script commands

GIVE MUSIC

Use the GIVE MUSIC command to play music from a specified music route to a
call that is waiting in a queue.

You can define different music routes and apply them to the GIVE MUSIC
command. You can specify these routes for different locations to further
personalize the application for the user.

EVENT HANDLER, an advanced command, can monitor the condition of a call


that an agent answers and places on hold. You can then give the call a specific
music route. For more information, see “EVENT HANDLER” on page 247.

For information about GIVE MUSIC in SIP-enabled contact centers, see “RAN
and MUSIC routes” on page 705.

Script syntax
GIVE MUSIC <music_route>

Parameter
Enter information for the following parameter:
„ <music_route> The music route that contains the music you want to play
to the call.
Replace this parameter with a variable of type music or a numeric constant.

Restrictions
This command applies to voice contacts only.

Do not insert the GIVE BUSY or GIVE OVERFLOW command immediately


after the GIVE MUSIC command.

For information about these commands in SIP-enabled contact centers, see “SIP
Contact Center” on page 675.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 219


Basic script commands Standard 8.05

WAIT command
Use a WAIT command immediately after the GIVE MUSIC command to
control the duration of the music. If a call is given music followed by a GIVE
RAN command, the music resumes after the RAN is finished.

For information about the GIVE RAN command in SIP-enabled contact centers,
see “SIP Contact Center” on page 675.

Music stops when another treatment or action with an unspecified duration is


given (such as GIVE RINGBACK or ROUTE CALL). Music is suspended
during presentation to an agent and resumes if the call returns to the queue (if the
agent does not answer).

For information about other commands in SIP-enabled contact centers, see “SIP
Contact Center” on page 675.

Examples

Example 1
In this example, a call is queued to the service skillset, and after a 2-second
delay, the caller hears music until an agent becomes available to take the call. In
this example, the music route is represented by a variable (pop_music).
QUEUE TO SKILLSET service_sk WITH PRIORITY 3
WAIT 2
GIVE MUSIC pop_music_gv
WAIT 30

Example 2
This example shows how the GIVE MUSIC command is used in the Event
Handler. EVENT HANDLER is an advanced command. For more information,
see “EVENT HANDLER” on page 247.
EVENT HANDLER
EVENT CALL ON HOLD: GIVE MUSIC classical_music_gv
END HANDLER

220 Contact Center Manager


December 2007 Basic script commands

GIVE OVERFLOW

Use the GIVE OVERFLOW command to provide an overflow tone to a call


before it is disconnected by the switch. The call can be given an overflow tone at
any time that it is in the CDN queue, except when it is presented to, or answered
by, an agent.

An overflow tone is a fast busy tone.

First treatment
This treatment must be the first treatment that the call receives; otherwise, for
some trunk types, the call is not disconnected automatically by the switch after
the busy tone. This can cause trunks to remain connected until the user
disconnects the call.

Because some statements give an automatic ringback tone, you must analyze the
script carefully to ensure that these commands are not executed before the GIVE
OVERFLOW command. Issuing the ringback tone after the GIVE OVERFLOW
command ensures that the overflow tone is always the first treatment given to the
call. For more information about commands that automatically generate a
ringback treatment, see “Default treatments” on page 84.

Script syntax
GIVE OVERFLOW {CONTROLLED}

Optional
The CONTROLLED keyword is optional in this command.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 221


Basic script commands Standard 8.05

CONTROLLED keyword
By default, after this command is executed, the call is no longer under the
control of Contact Center Manager. However, if you use the CONTROLLED
keyword, the call remains in the control of Contact Center Manager. Using the
CONTROLLED keyword means that if an error condition occurs on the switch
(cannot give the tone to the user, for example), the call is returned to the queue
so that it can be further treated by the system.

Restrictions
This command applies to voice contacts only.

Do not use this command in the network script (if you purchased the NSBR
feature).

Example
The following script provides an overflow tone to a call. If the CS1000/Meridian
1 fails the command, the call is returned to the script and is disconnected.
GIVE OVERFLOW CONTROLLED
DISCONNECT /* if CS1000/M1 fails the command */

222 Contact Center Manager


December 2007 Basic script commands

GIVE RAN

Use the GIVE RAN command to provide a recorded announcement (RAN) to a


call through the specified RAN trunk.

The RAN is interrupted if an agent becomes available to take the call.


Otherwise, the RAN is completed and the next command in the script is
executed.

For information about other voice processing commands, see “Overview” on


page 294.

For information about GIVE RAN in SIP-enabled contact centers, see “SIP
Contact Center” on page 675.

The Give Controlled Broadcast feature allows a maximum of 50 callers listen to


the same CallPilot port for an announcement. For CS 1000 and Meridian 1
switches, this feature requires no additional hardware if the inbound trunks are
directly connected to the switch.

The GIVE CONTROLLED BROADCAST feature is not supported on a


CS 1000E platform. For more information, see Nortel Product Bulletin
P-2006-0312_Global.

Script syntax
GIVE RAN <ran_route>

Parameter
Enter information for the following parameter:
„ <ran_route> The RAN route that contains the recorded announcement
(RAN) that you want to play to the call.
Replace this parameter with a variable of type “RAN,” or with the route
number.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 223


Basic script commands Standard 8.05

Restrictions
This command applies to voice contacts only.

Do not insert the GIVE BUSY or GIVE OVERFLOW command immediately


after the GIVE RAN command.

Automatic ringback
If the GIVE RAN command is the first treatment in the script, and there is a
delay before the RAN is available, then the call hears ringback until the
announcement plays.

Example
In this example, calls entering the contact center between 05:00 p.m. and 08:00
a.m. hear a recorded announcement telling them that the contact center is closed.
IF (TIME OF DAY = closed_hours_gv) THEN
GIVE RAN closed_ran_gv
DISCONNECT
END IF

224 Contact Center Manager


December 2007 Basic script commands

GIVE RINGBACK

Use the GIVE RINGBACK command to provide a ringback tone to a caller (that
is, to play a ringing sound to the caller).

You can use this command with the WAIT command if you want to control the
duration of the ringback tone. Use this command before a call is queued against
one or more destinations (that is, to skillsets or agents). If a call is queued by the
script without a specific treatment given first, then ringback is automatically
applied by Contact Center Manager (while the call is queued). For more
information about which commands give an automatic ringback tone, see
“Consider what the user experiences” on page 83.

When the call is presented to an agent, the ringback tone is automatically


provided by the switch.

For information about GIVE RINGBACK in SIP-enabled contact centers, see


“SIP Contact Center” on page 675.

Script syntax
GIVE RINGBACK

Restrictions
This command applies to voice contacts only.

Do not insert the GIVE BUSY or GIVE OVERFLOW command immediately


after the GIVE RINGBACK command.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 225


Basic script commands Standard 8.05

Example
In this example, the user hears a ringback tone if the call is transferred.
IF TRANSFERRED THEN
GIVE RINGBACK
WAIT 6
/* Allows time for the transferring party to complete
the transfer */
END IF

226 Contact Center Manager


December 2007 Basic script commands

GIVE SILENCE

Use the GIVE SILENCE command to provide silence to a call. GIVE SILENCE
is generally used to turn off either music or ringback. If a call is given music
followed by a RAN, the music automatically resumes after the RAN or
treatment is completed. Therefore, if you want silence after a RAN, use the
GIVE SILENCE command.

For information about GIVE SILENCE in SIP-enabled contact centers, see “SIP
Contact Center” on page 675.

This command cannot be the first treatment given to a call. Therefore, it cannot
be the first command in a script.

ATTENTION
The GIVE SILENCE command can potentially be the first
treatment for a call even if it is not the first command in the
script. This can happen, for example, if an IF-THEN-ELSE
or WHERE-EQUALS command leads to a GIVE SILENCE.
In that case, you receive an error, and the call is rejected and
routed to the default ACD-DN of the CDN as described in
“First command rule” on page 65.

Script syntax
GIVE SILENCE

Restriction
This command applies to voice contacts only.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 227


Basic script commands Standard 8.05

Example
In this example, calls are queued to the service skillset. The user hears music for
30 seconds and a recorded announcement states that the agents are busy. The
GIVE SILENCE command prevents the music from resuming after the recorded
announcement.
QUEUE TO SKILLSET service_sk
GIVE MUSIC pop_music_gv
WAIT 30
GIVE SILENCE
GIVE RAN agents_busy_ran_gv

228 Contact Center Manager


December 2007 Basic script commands

QUEUE TO AGENT

Use the QUEUE TO AGENT command to deliver a call to a local agent. This
command provides agent-based routing capability.

Queuing to specific agents at other sites in the network is not supported.

Script syntax: By agent ID


QUEUE TO AGENT [<agent_id> | <agent_id_list>]

Script syntax: Using LONGEST IDLE AGENT


QUEUE TO AGENT LONGEST IDLE AGENT [<skillset> | <skillset_list>]

Use LONGEST IDLE AGENT only if you are sure that an idle agent is
available. If no idle agents are available, Contact Center Manager does not run
the QUEUE TO AGENT command.

Parameters
Enter information for the following parameters:
„ <agent_id> or <agent_id_list> The ID of the agent, or the list of agent IDs,
to which you want the call queued.
„ <priority> The priority with which you want the call queued to the
specified agent.
„ <skillset> or <skillset_list> The skillset, or list of skillsets, from which the
longest idle agent is taken.

Restrictions
This command applies to all voice and multimedia contacts.

Do not insert the GIVE BUSY or GIVE OVERFLOW command immediately


after the QUEUE TO AGENT command.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 229


Basic script commands Standard 8.05

Use a WAIT command with at least 2 seconds after a QUEUE TO AGENT


command.

LONGEST IDLE AGENT intrinsic


If you include the LONGEST IDLE AGENT intrinsic, the call is presented to
the agent who is idle the longest from all of the skillsets listed. The criteria used
to determine which agent is idle the longest is defined for all skillsets. The
definition is one of the following:
„ the amount of idle time since the last call was taken by the agent
„ the total amount of idle time since the agent logged on
„ the idle time since the last status change

Examples

Example 1
In this example, a variable named french_callers_gv contains a list of CLIDs
that identify some of the BestAir French-speaking clients. When a call from a
French-speaking client enters the contact center, it is first queued to an agent
(represented by the agent variable agent_fr_5) with a priority of 5. If the call is
not answered, it is then queued to an agent (represented by the agent variable
agent_fr_8) with a priority of 1. If the call is not answered within 4 seconds, it is
queued to a skillset named backup_french_sk with a priority of 5.
IF (CLID = french_callers_gv) THEN
QUEUE TO AGENT agent_fr_5 WITH PRIORITY 5
WAIT 2
QUEUE TO AGENT agent_fr_8 WITH PRIORITY 1
WAIT 4
QUEUE TO SKILLSET backup_french_sk WITH PRIORITY 5
WAIT 2
END IF

230 Contact Center Manager


December 2007 Basic script commands

Example 2
In this example, if the number of idle agents in both the sales skillset and the
service skillset is greater than zero, the call is queued to the agent who is idle for
the longest time in either the sales skillset or the service skillset.
IF (IDLE AGENT COUNT sales_sk > 0)
AND (IDLE AGENT COUNT service_sk > 0) THEN
QUEUE TO AGENT LONGEST IDLE AGENT sales_sk, service_sk
WAIT 2
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 231


Basic script commands Standard 8.05

QUEUE TO SKILLSET

Use the QUEUE TO SKILLSET command to queue calls locally at the Contact
Center Manager site. Local calls can be queued against local and network
skillsets, provided that local agents are assigned to the network skillsets. Locally
queued calls can only be answered by local agents. The calls can be queued
according to how many agents are logged on to the skillsets or by the length of
time the agents are idle at the skillsets.

Script syntax
QUEUE TO SKILLSET [<skillset> | <list_of_skillsets>] {WITH PRIORITY
<priority>}

Script syntax: MOST LOGGED AGENTS


QUEUE TO SKILLSET MOST LOGGED AGENTS [<skillset> |
<list_of_skillsets>] {WITH PRIORITY <priority>}

Script syntax: BY LONGEST IDLE AGENT


QUEUE TO SKILLSET [<skillset> | <list_of_skillsets>] BY LONGEST
IDLE AGENT {WITH PRIORITY <priority>}

Optional
The WITH PRIORITY segment is optional.

Parameters
Enter information for the following parameters:
„ <skillset> or <list_of_skillsets> The skillset, or list of skillsets, to which
you want the call queued.
„ <priority> The priority with which you want the call queued to the
specified skillset.

232 Contact Center Manager


December 2007 Basic script commands

Restrictions
This command applies to all voice and multimedia contacts.

Do not insert the GIVE BUSY or GIVE OVERFLOW command immediately


after the QUEUE TO SKILLSET command.

Use a WAIT command with at least 2 seconds after a QUEUE TO SKILLSET


command. This allows time for the call to be queued before the next command.

Skillset lists
You can queue calls to up to 20 local skillsets simultaneously. You can queue to
more than one skillset either by specifying all of the skillsets to which you want
calls queued in a single QUEUE TO SKILLSET command or by using a
separate QUEUE TO SKILLSET command for each skillset.

The QUEUE TO SKILLSET command randomly evaluates each skillset. For


each skillset, if an agent is available, the call is presented to that agent. If no
agents are available, the call is queued to that skillset.

MOST LOGGED AGENTS intrinsic


If you use the MOST LOGGED AGENTS intrinsic, the skillset to which the call
is queued is selected based on the number of agents that are logged on to the
skillsets. The QUEUE TO SKILLSET command finds the skillset among all of
the skillsets listed that has the most agents logged on to it at the time. Therefore,
the call is queued only to that one skillset, not to all skillsets in the skillset list.

BY LONGEST IDLE AGENT option


If you use the BY LONGEST IDLE AGENT option, and two or more agents
(with the same priority for the skillset) are idle in the listed skillsets, the agent is
selected based on the selected Global Skillset setting for Agent Preference.

The following settings are available:


„ Longest total time in Idle state since login
The amount of idle time since the agent logged on. The system does not
reset this setting for the entire duration of the agent’s logon session.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 233


Basic script commands Standard 8.05

„ Longest time in Idle state since the last status change


The amount of idle time since the last status change for the particular agent.
The system resets the idle time for the following status changes:
„ Not Ready

„ Logging out

„ Answering, initiating, or restoring a DN call

„ Programming CFW or speed call lists

„ Reserve/Unreserve

„ Longest total time since last CDN/ACD call


The amount of idle time since the agent last cleared a CDN/ACD call. This
time includes the time spent idle, busy on DN calls, and Not Ready.

Queuing to multiple skillsets


When you use multiple skillsets, the BY LONGEST IDLE AGENT option
selects the most qualified agent from across all the listed skillsets, based on your
setting for Agent Preference.

When no idle agents are available, the BY LONGEST IDLE AGENT option has
no effect on queuing. The system queues the call to all skillsets listed in the
command, and the next available agent is presented with the call.

The priority of the idle agents for the skillsets takes precedence over the Agent
Preference setting, which means that the system always routes the call to the
highest priority agent, regardless of the Agent Preference setting.

If you do not choose the BY LONGEST IDLE AGENT option, then the call is
presented to the longest idle agent since the last status change. In addition, when
you choose multiple skillsets, the system randomly queries the skillset (the order
in which the skillsets are checked varies from call to call), and the call is
presented to the longest idle agent for that skillset.

A QUEUE TO SKILLSET command cannot include both the MOST LOGGED


AGENTS intrinsic and the BY LONGEST IDLE AGENT option.

234 Contact Center Manager


December 2007 Basic script commands

WITH PRIORITY option


You can specify the priority with which the call should be queued. Assign a
priority of 1 to 6, with 1 being the highest priority and 6 being the lowest. A call
is assigned a priority of 6 by default. Calls with higher priorities are presented to
the agents before the calls with lower priorities.

Examples

Example 1
In this example, the script checks whether the number of idle agents in the sales
skillset is greater than 0. If so, the call is queued to the sales skillset with the
default priority of 6 because no priority is specified.
IF (IDLE AGENT COUNT sales_sk > 0) THEN
QUEUE TO SKILLSET sales_sk
WAIT 2 /*Allow time for the call to be queued*/
END IF

Example 2
In this example, the skillset with the most logged-on agents (either the service
skillset or the support skillset) is assigned to the variable named skillset_cv. The
call is then queued to skillset_cv.
ASSIGN MOST LOGGED AGENTS service_sk, support_sk TO skillset_cv
QUEUE TO SKILLSET skillset_cv
WAIT 2

Example 3
In this example, the script checks whether the number of idle agents in the
service skillset is greater than the number of idle agents in the support skillset. If
so, the call is queued to the service skillset. Otherwise, it is queued to the
support skillset.
IF (IDLE AGENT COUNT service_sk > IDLE AGENT COUNT support_sk)
THEN
QUEUE TO SKILLSET service_sk
ELSE

Scripting Guide for Communication Server 1000/Meridian 1 PBX 235


Basic script commands Standard 8.05

QUEUE TO SKILLSET support_sk


END IF
WAIT 2 /*Allow time for the call to be queued*/

236 Contact Center Manager


December 2007 Basic script commands

REMOVE FROM AGENT

Use the REMOVE FROM AGENT command to remove a call from the
specified agent. This command applies to local agents only. Use this command
if a call must be answered within a specific duration. If the call is still queued
after this amount of time passes, the call can be retrieved and requeued.

You can use the REMOVE FROM AGENT command to remove a queued call
from an agent’s queue by using the QUEUE TO AGENT command. This
command cannot be used to remove a call that was queued to an agent by using a
QUEUE TO SKILLSET command.

Script syntax
REMOVE FROM AGENT [<agent_ID> | <agent_ID_list>]

Restriction
This command applies to all voice and multimedia contacts.

Parameter
Enter information for the following parameter:
„ <agent_ID> or <agent_ID_list> The ID of the agent from which you want
the call removed. This parameter can be replaced with a single agent ID or
a list of agent IDs.

Example
A call is queued to agent variable agent_2 with a priority of 2 when it first
arrives. If, after 60 seconds, the call is not answered, it is removed from the
agent and is queued to the sales skillset.
QUEUE TO agent_2 WITH PRIORITY 2
WAIT 2
SECTION Check_Age

Scripting Guide for Communication Server 1000/Meridian 1 PBX 237


Basic script commands Standard 8.05

WAIT 20
GIVE RAN agent_busy_ran_gv
IF (AGE OF CALL > 60) THEN
REMOVE FROM AGENT agent_2
WAIT 2 /* avoid race condition */
QUEUE TO SKILLSET sales_sk WITH PRIORITY 1
WAIT 2
EXECUTE WaitLoop
END IF
EXECUTE Check_Age

238 Contact Center Manager


December 2007 Basic script commands

REMOVE FROM SKILLSET

Use the REMOVE FROM SKILLSET command to remove a queued call from
the skillset or skillsets. This command applies only to local skillsets.

Script syntax
REMOVE FROM SKILLSET [<skillset> | <list_of_skillsets>]

Restriction
This command applies to all voice and multimedia contacts.

Parameter
Enter information for the following parameter:
„ <skillset> or <list_of_skillsets> The skillset, or list of skillsets, from
which you want the call removed.

Example
A call is queued to the sales skillset. If, after 60 seconds, the call is not
answered, the script determines which skillset has the most idle agents. If the
service skillset has more idle agents, the call is removed from the sales skillset
and is queued to the service skillset.
QUEUE TO SKILLSET sales_sk
WAIT 2
GIVE RAN agents_busy_ran_gv
SECTION Check_Age
WAIT 20
IF (AGE OF CALL > 60) THEN
IF (IDLE AGENT COUNT service_sk >= 1) THEN
REMOVE FROM SKILLSET sales_sk

Scripting Guide for Communication Server 1000/Meridian 1 PBX 239


Basic script commands Standard 8.05

QUEUE TO SKILLSET service_sk


WAIT 2
EXECUTE Continue_Requeued
END IF
END IF
GIVE RAN agents_busy_ran_gv
EXECUTE Check_Age
SECTION Continue_Requeued
...

240 Contact Center Manager


December 2007 Basic script commands

ROUTE CALL

Use the ROUTE CALL command to send a call to a destination specified by the
parameter.

Script syntax
ROUTE CALL [<dn> | DEFAULT DN] {CONTROLLED}

Optional
The CONTROLLED keyword is optional.

Parameter
Enter information for the following parameter:
„ <dn> The directory number (DN) to which you want the call routed.
You can replace this parameter with a dialable number, internal or external,
such as an ACD-DN or a personal DN. The only exception is you cannot
use Vacant Number Routing (VNR) with the ROUTE CALL command.

Restrictions
This command applies to voice contacts only.

Insert no commands after the ROUTE CALL command.

Default DN
If you specify the default DN, the call is sent to the default ACD-DN configured
on the switch for the CDN from which the call entered the system.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 241


Basic script commands Standard 8.05

CONTROLLED keyword
By default, after a call is routed, it is no longer under the control of Contact
Center Manager. However, if you use the CONTROLLED keyword, the call
remains in the control of Contact Center Manager. If an error occurs, such as an
invalid or busy destination, the call is returned to the queue so that it can be
further treated by the system.

The CONTROLLED keyword works only if the ultimate destination (directly,


or indirectly through switch features such as CALL FORWARD) is an internal
DN (that is, on the same switch). If the DN is an external number that cannot be
connected (for example, because it is busy), the CONTROLLED option is
ignored. If this situation occurs for a call, the user receives a busy tone, and the
script stops processing the call.

CONTROLLED mode applies only if the destination is an internal DN that is


busy or that does not exist.

CONTROLLED keyword is not currently supported for SIP.

Using ROUTE CALL in the network script


Use the ROUTE CALL command with caution in the network script. If the DN
specified is invalid, this command can cause phantom calls.

Examples

Example 1
In this example, if the day is a holiday or a Saturday or Sunday, or outside of
business hours, the call is routed to another site in the contact center.
IF (DATE = holiday_gv)
OR (DAY OF WEEK = weekend_gv)
OR (TIME OF DAY = after_hours_gv) THEN
ROUTE CALL other_site
END IF

Example 2
This example routes the call to the default DN.

242 Contact Center Manager


December 2007 Basic script commands

GIVE RINGBACK
ROUTE CALL DEFAULT DN

Example 3
This example uses the CONTROLLED option to play a message, and then
disconnect the call if the ROUTE CALL command is not successful.
ROUTE CALL other_site CONTROLLED
/*If the call is routed successfully, then this is the end of this
script. */
/* This section is reached only if the controlled route call
fails. */
GIVE RAN sorry_not_possible_ran_gv
DISCONNECT

Scripting Guide for Communication Server 1000/Meridian 1 PBX 243


Basic script commands Standard 8.05

244 Contact Center Manager


Chapter 7

Advanced script commands

In this chapter
Overview 246
EVENT HANDLER 247
LOG 253
READVAR and SAVEVAR 255
WHERE-EQUALS 261

Scripting Guide for Communication Server 1000/Meridian 1 PBX 245


Advanced script commands Standard 8.05

Overview

This chapter describes the advanced script commands that you can use if you
purchased the Nortel Contact Center Manager application software package.
This chapter shows how to write the commands in your scripts (script syntax)
and the parameters and optional segments that make up the commands.

246 Contact Center Manager


December 2007 Advanced script commands

EVENT HANDLER

Use the Event Handler to give the script instructions to manage certain
conditions that can occur during a call, such as abandonment of the call or RAN
response failure.

About the Event Handler


The Event Handler can manage two categories of events: unsolicited (or
unexpected) events, and failed responses that can interrupt a suspended state.

Call Abandon and RAN Response failure


If, during normal script execution, an unsolicited (unexpected) event or a failed
treatment response occurs, the Event Handler can run statements to handle that
event. These statements are placed in the Event Handler at the beginning of the
script, and are not executed unless the specific event occurs. If the event occurs,
and it is defined in the Event Handler of this script, execution of the script
moves to the Event Handler and executes the statement for that event.

In the case of unsolicited events, the script execution does not return to the body
of the script after it processes the events within the Event Handler. In the case of
failed treatment responses, the script execution normally returns to the next
statement in the main body of the script after the treatment command that failed,
unless you use the EXECUTE SCRIPT or EXECUTE command. The
EXECUTE SCRIPT command branches to another script, and the EXECUTE
command branches to a section within the same script.

The Event Handler is optional and applies only to the script in which it resides.
Also, if it is present, there is no need to list all events. Use only the events
required for your system.

The script continues to monitor the call after it is answered by an agent. If the
agent puts the call on hold, for example, the Event Handler can play music to the
caller.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 247


Advanced script commands Standard 8.05

First command
The Event Handler, if included in a script, must be the first command in the
script.

Script syntax
EVENT HANDLER

EVENT <event_a>: <statements>

EVENT <event_b>: <statements>

EVENT <event_c>: <statements>

...

END HANDLER

Restriction
This command applies to voice contacts only.

Parameters
Enter information for the following parameters:
„ <event_a>, <event_b>, <event_c> The events that you want the Event
Handler to address.
„ <statements> The action that you want the script to take if the event
occurs.

Unsolicited events
Use the following unsolicited events to replace the event parameters in the Event
Handler:
„ Call On Hold
„ Call Abandon

248 Contact Center Manager


December 2007 Advanced script commands

The script stops executing after the unsolicited event is addressed.

Tip: You can use the Event Handler to override the default music route. For
example, you may not want to play advertisements to callers who are waiting for
an agent to become available. However, you can use the Event Handler to play
advertisements to callers who are put on hold after an agent answers their call.

Failed responses
Use the following failed responses to replace the event parameters in the Event
Handler:
„ RAN Response Fail
„ IVR Response Fail
„ Broadcast Announcement Response Fail

After the failed response is addressed, the execution of the script leaves the
Event Handler and returns to its original place in the script. The script executes
the command that is immediately after the treatment command that failed.

Alternatively, you can run another script when a failed response occurs. For
example, if the Event Handler detects a RAN response failure, it can run a script
that uses IVR sessions instead of RANs. Also, you can run another section
within the same script rather than returning to the original place in the script.

Tip: If you use the Event Handler to play an announcement or message when a
response failure occurs, use as general a message as possible. The Event Handler
cannot distinguish which RAN, IVR session, or broadcast announcement failed,
so the message you play to users when a failure occurs should not replace a
specific message. If you must determine which commands failed, you can use a
call variable. Set the variable to a specific value before each treatment
command, and then test this value in the Event Handler to determine which
commands failed.

Failed responses on external IVR systems


The command EVENT IVR RESPONSE FAIL is used to detect or trap a
scenario in ths cript when an IVR is not responding.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 249


Advanced script commands Standard 8.05

If Meridian Mail or CallPilot are used for the IVR, the EVENT IVR
RESPONSE FAIL command can trap the failed scenarios.

If an external IVR system on an external server is used to play prompts or


messages, the EVENT IVR RESPONSE FAIL command does not work. For
example, if the external IVR system is shut down, the script cannot determine
the activitiy, and cannot trap the error. Other examples of failures that cannot be
detected by EVENT IVR RESPONSE FAIL include:
„ IPML is not running
„ Network link to MPS is down
„ Telephony Manager Service is off

Restrictions for unsolicited events


Use only the following commands under the Call On Hold event:
„ GIVE MUSIC
„ IF-THEN-END-IF
„ IF-THEN-ELSE-END-IF
„ QUIT
„ WAIT
„ LOG
„ SEND INFO

Use only the following commands with the Call Abandon event:
„ IF-THEN-END-IF
„ IF-THEN-ELSE-END-IF
„ QUIT
„ WAIT
„ LOG
„ SEND INFO

250 Contact Center Manager


December 2007 Advanced script commands

Restrictions for failed responses


You can use all commands with the Response Broadcast Fail, IVR Response
Fail, and RAN Response Fail events, except the SECTION command.

After the failed response is addressed, the execution of the script leaves the
Event Handler and returns to its original place in the script. The command that is
immediately after the failed treatment command is executed.

Event Handler and secondary scripts


The Event Handler applies only to the script in which it appears. If you want
Event Handler conditions to apply to the call after it is sent to a referenced
script, you must repeat the EVENT HANDLER command at the beginning of
each script. Alternatively, you can change the Event Handler conditions in each
script, or you can choose not to include it in referenced scripts.

Example
In this example, Call On Hold and RAN Response Fail are defined in the Event
Handler. When a call is put on hold, the user hears music. If the script receives a
RAN Response Fail, the event is logged in the Script Log file. The call then
leaves the Event Handler and returns to the script.
EVENT HANDLER
EVENT CALL ON HOLD: GIVE MUSIC pop_music_gv
EVENT RAN RESPONSE FAIL: LOG "first RAN failed"
END HANDLER
QUEUE TO SKILLSET skillset_sk
WAIT 3
GIVE RAN please_wait_ran_gv

How Event Handler avoids infinite loops


To avoid infinite loops in scripts, the Event Handler does not repeat treatments
that prompt the Event Handler response. Consider this example:
EVENT HANDLER

Scripting Guide for Communication Server 1000/Meridian 1 PBX 251


Advanced script commands Standard 8.05

EVENT RAN RESPONSE FAIL: GIVE RAN error_ran_gv


END HANDLER
GIVE RAN error_ran_gv
QUEUE TO SKILLSET customer_service_sk

If error_ran_gv is an invalid RAN route, the first command in the script, GIVE
RAN error_ran_gv, starts the Event Handler. However, the same invalid route is
called in the Event Handler. To avoid an infinite loop, Contact Center Manager
does not repeat the treatment. Instead, Contact Center Manager continues to
process the script. In this example, the call is queued to the skillset
customer_service_sk.

To avoid an infinite loop between two response failures, all response failures are
ignored if they occur when the Event Handler processes a response fail event.
However, the unsolicited events ON HOLD and Call Abandon are accepted and
processed if they occur when the Event Handler processes a response fail event.

252 Contact Center Manager


December 2007 Advanced script commands

LOG

Use the LOG command to log a message to the Event Browser. This command
is typically used for script testing only, because it can slow response time if
executed for every call in a high-traffic contact center.

For more information about the Event Browser, see the Nortel Contact Center
Manager Administrator’s Guide.

By default, messages are logged to the Event Browser with the severity level of
information. When searching for messages, search for event code 48467 in the
Event Browser.

ATTENTION
Do not use the LOG command for normal call processing.
New events overwrite old events in the log file. Events
logged by this command can reduce the amount of historical
data in the log file.

Nortel recommends that you use the LOG command only in the following
situations:
„ in test scripts to which only a few calls are made
„ to identify errors. For example, you can define a boolean expression in your
script that, by default, is set to False. To troubleshoot, set the Boolean
expression to True. The following is an example of the LOG command:
IF debug THEN
LOG "message"
END IF

Script syntax
LOG <“msg_character_string”>

Scripting Guide for Communication Server 1000/Meridian 1 PBX 253


Advanced script commands Standard 8.05

Parameter
Enter information for the following parameter:
„ <“msg_character_string”> The text of the message entry as you want it to
appear in the script log file.

You must use quotation marks around the text of the message entry, or use a
variable of type string without quotation marks.

Limitations
The LOG command is shown as an event in the Event Browser up to 10 times.
After this, the event is not visible because the throttling feature prevents
reoccurring events from filling up the Event Browser log. The default setting for
the throttling threshold is 3. The throttling feature is reset every hour, after
which the event is visible again. For more information about the event throttling
utility, see the Installation and Maintenance Guide.

Restriction
Do not insert the GIVE BUSY or GIVE OVERFLOW command immediately
after the LOG command.

Example
In this example, if the script receives a RAN response failure, the event is logged
in the Event Browser log.
EVENT HANDLER
EVENT CALL ON HOLD: GIVE MUSIC pop_music_gv
EVENT RAN RESPONSE FAIL: LOG "RAN failed in Master"
END HANDLER

254 Contact Center Manager


December 2007 Advanced script commands

READVAR and SAVEVAR

Use the READVAR and SAVEVAR commands to enable a call to change the
value of a variable and pass the updated value to other calls.

READVAR
READVAR uses an existing integer call variable as a parameter, and then reads
the current value of the call variable from the Wild Variable table. If the value
does not exist in the Wild Variable table, READVAR reads the value from the
Call Variable table.

You must terminate a READVAR block by using a SAVEVAR command with


limited commands allowed within the block.

SAVEVAR
SAVEVAR saves the current value of the call variable to the Wild Variables
table.

You can use only the following commands between a READVAR and
SAVEVAR block:
„ ASSIGN
„ LOG
„ IF-THEN-ELSE-END IF

Script syntax - example 1


READVAR <integer_call_variable>
<optional statements>
SAVEVAR

Scripting Guide for Communication Server 1000/Meridian 1 PBX 255


Advanced script commands Standard 8.05

Script syntax - example 2


READVAR < integer_call_variable>
IF < conditionaltest> THEN
ASSIGN xxxx TO < integer_call_variable>
ELSE
ASSIGN xxxx TO < integer_call_variable>
END IF
SAVEVAR

Operational rules
The script compiler enforces the following operational rules:
„ The parameter sent to the READVAR command is valid.
„ Commands within the block are permissible.

Examples

Example 1
In this example, the global call variable sends every tenth call to a survey or
routes the call.
READVAR wv_survey_cv
IF wv_survey_cv < 10 THEN
ASSIGN wv_survey_cv +1 TO wv_survey_cv
ELSE
ASSIGN 0 TO wv_survey_cv
END IF
SAVEVAR

IF wv_survey_cv = 0 THEN
ROUTE CALL survey_dn
ELSE
QUEUE TO SKILLSET Sales
WAIT 2

256 Contact Center Manager


December 2007 Advanced script commands

END IF

Example 2
This example illustrates simple load sharing across a network by routing
alternate calls to a network skillset. The first call queues locally. The next call
queues to the network, the third call queues locally, and so on.
READVAR wv_alternate_cv
IF wv_alternate_cv = 1 THEN
ASSIGN 0 TO wv_alternate_cv
ELSE
IF wv_alternate_cv = 0 THEN
ASSIGN 1 TO wv_alternate_cv
END IF
END IF
SAVEVAR

IF wv_alternate_cv = 1 THEN
QUEUE TO SKILLSET Sales
WAIT 2
ELSE
QUEUE TO NETWORK SKILLSET Sales
WAIT 4
END IF

Calls that enter a script where there is a READVAR/SAVEVAR block use the
value set in the wild variable table only when the call itself enters the
READVAR/SAVEVAR block. If you write the script so the call does not enter
the block, the call then assumes the default value from the script variable as
assigned in OAM, or the value assigned to it through the script commands.

Example 3
The following example shows how one call changes the value stored in the wild
variable table, and the other call reads that value and acts on it.
IF DNIS = emergency_act_number THEN
/* Call who sets the emergency state */

Scripting Guide for Communication Server 1000/Meridian 1 PBX 257


Advanced script commands Standard 8.05

READVAR wild2_wv
IF wild2_cv = 0 THEN
ASSIGN 1 TO wild2_wv /* emergency is activated */
ELSE
ASSIGN 0 TO wild2_wv /* emergency is deactivated */
END IF
SAVEVAR
END IF
/* All incoming calls hit this portion of the script to check the
variable state */
READVAR wild2_wv
SAVEVAR
IF wild2_wv = 1 THEN /* If emergency state is enabled */
GIVE RAN emerg_ran
DISCONNECT
END IF
QUEUE TO SKILLSET sales_sk
WAIT 2
QUIT

As you can see in the preceding example, every call checks the value of the wild
variable to validate the emergency state. If the state is true, then the script plays
the emergency RAN message and disconnects the call.

Example 4
If the call enters the READVAR portion of the script, you cannot use the variable
in any other form (for example, as a call variable) unless the script has an
ASSIGN TO statement, as shown in this example.
IF DNIS = emergency_act_num THEN
/* Calls who sets the emergency state */
READVAR wild2_wv
IF wild2_wv = 0 THEN
ASSIGN 1 TO wild2_wv /* emergency is activated */
ELSE

258 Contact Center Manager


December 2007 Advanced script commands

ASSIGN 0 TO wild2_wv /* emergency is deactivated */


END IF
SAVEVAR
END IF
/* All incoming calls hit this portion of the script to check the
variable state */
READVAR wild2_wv
SAVEVAR
IF wild2_wv = 1 THEN /* If emergency state is enabled */
GIVE RAN emerg_ran
DISCONNECT
END IF
/* Tests the assign statement which overwrites the value of the
variable */
ASSIGN 8 TO wildvar2_wv
/*random number selected outside the wild variable table range for
this variable */
WHERE wild2_wv EQUALS
VALUE 0:
ROUTE CALL 6900
/* check that the assign statement worked and the call
does not route here even when not in EMR state */
VALUE 1:
ROUTE CALL 6910
/* check that the assign statement worked and the call
does not route here even when in EMR state */
VALUE 8:
ROUTE CALL 6911
/* Call should be routed here based on assign statement
above */
END WHERE

Scripting Guide for Communication Server 1000/Meridian 1 PBX 259


Advanced script commands Standard 8.05

As expected, when the emergency state is off, the call encounters the IF
statement. The variable assignment overwrites the wild variable table value for
this call, and the call is routed to DN 6911. When the call with DNIS
emergency_act_num dials in, the state is switched and the subsequent call then
hears the emergency announcement before being disconnected.

Example 5
The following example shows a script section where the value of the variable is
assigned within the script. Only this call sees the assigned value and cannot
change the value for any other call entering this script.
ASSIGN 0 TO wild2_wv
SECTION WaitLoop
WAIT 10
/* call are only be given ran every third time around
the loop */
IF wild2_wv < 3 THEN
ASSIGN wild2_cv + 1 TO wild2_wv
ELSE
GIVE RAN second_ran
ASSIGN 0 TO wild2_wv
END IF
EXECUTE WaitLoop

260 Contact Center Manager


December 2007 Advanced script commands

WHERE-EQUALS

Use the WHERE-EQUALS command to test for a condition that can have more
than one result. You can use this command, for example, to replace several IF-
THEN-ELSE commands that check for the same condition. The parameter
value_expr (the condition for which you are testing) is evaluated first, and then
different statements are executed, depending on the value of the parameter.
Possible results include advancing to another command, running another script,
or terminating the execution of the script. Use the DEFAULT clause, which is
optional, to specify a command to use when none of the results are possible.

After finishing the statements in the applicable VALUE clause, the script leaves
the WHERE-EQUALS command and continues executing the next command
after the END WHERE command (unless the statements transfer the call to
another script).

Script syntax
WHERE <value_expr> EQUALS

VALUE <value_1>: <statements>

VALUE <value_2>: < statements>

VALUE <value_3>: <statements>

DEFAULT: <statements>

END WHERE

Parameters
Enter information for the following parameters:
„ <value_expr> The expression that you want the script to evaluate. You can
replace this parameter with an item, an intrinsic (such as CDN, DNIS, or
CLID), or a formula. If you use a variable in this parameter, it must be of
type Item.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 261


Advanced script commands Standard 8.05

„ <value_1>, <value_2>, <value_3> The values for the expression that you
want the script to address. Replace these parameters with an item, a list, or
a range.
„ <statements> The action that you want the script to take if the expression
is equal to the specified value.

Limitations
The number of value clauses is unlimited; however, for effective script
execution, Nortel recommends that you do not use more than 50 value clauses,
and that you break value clauses into groups where possible.

Example
This example demonstrates how to break value clauses into groups.
IF (NPA = west_coast_gv) THEN
WHERE CLID EQUALS
VALUE wc_dist1: EXECUTE SCRIPT WCoast1_Sales
VALUE wc_dist2: EXECUTE SCRIPT WCoast2_Sales
VALUE wc_dist3: EXECUTE SCRIPT WCoast3_Sales
...
END WHERE
ELSE
IF (NPA = east_coast_gv) THEN
WHERE CLID EQUALS
VALUE ec_dist1: EXECUTE SCRIPT ECoast1_Sales
VALUE ec_dist2: EXECUTE SCRIPT ECoast2_Sales
VALUE ec_dist3: EXECUTE SCRIPT ECoast3_Sales
...
END WHERE
ELSE
ROUTE CALL DEFAULT DN
END IF
END IF

262 Contact Center Manager


December 2007 Advanced script commands

Using variables
If you use a variable name for the <value_expr> parameter in a WHERE-
EQUALS command, the class of the variable must be Item. However, if you use
a variable name for the <value _1/2/3> parameter in value statements, the
variable class can be either Item or Set.

Nortel recommends that you replace constant ranges of values (or comma-
separated lists) with Set class variables because they are easy to modify. For
example, to represent winter months, you can use the following value statement:
WHERE MONTH OF YEAR EQUALS
VALUE Jan .. Mar: GIVE RAN winter_months_gv
...

However, Nortel recommends that you use a Set class variable instead:
WHERE MONTH OF YEAR EQUALS
VALUE winter_gv: GIVE RAN winter_months_gv
...

where winter_gv is a variable of MONTH OF YEAR type and Set class that
contains the value of January .. March.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 263


Advanced script commands Standard 8.05

Each VALUE statement can have multiple variables and constants in a


comma-separated list. For example:
WHERE CDN EQUALS
VALUE 2001, sales_cdn_gv, 5375700: GIVE RAN vip_ran_gv
...

where sales_cdn_gv is a variable of CDN type and Set class that contains
multiple CDN values (ranges and lists).

Examples

Example 1
In this example, callers hear different recorded announcements depending on the
month in which they call the contact center.
WHERE MONTH OF YEAR EQUALS
VALUE JANUARY: GIVE RAN winter_specials_ran_gv
VALUE APRIL: GIVE RAN spring_specials_ran_gv
VALUE JULY: GIVE RAN summer_specials_ran_gv
VALUE SEPTEMBER: GIVE RAN fall_specials_ran_gv
DEFAULT: GIVE RAN default_ran_gv
END WHERE

Example 2
In this example, the script uses the WHERE-EQUALS statement to direct calls
to the appropriate script, depending on the CDN of the call.
WHERE CDN EQUALS
VALUE 5553500: EXECUTE SCRIPT Automotive
VALUE 5553600: EXECUTE SCRIPT Electronics
VALUE 5553700: EXECUTE SCRIPT Sporting_Goods
VALUE 5553800: EXECUTE SCRIPT Kitchen_Ware
DEFAULT: GIVE RAN lost_ran_gv
END WHERE

264 Contact Center Manager


December 2007 Advanced script commands

Example 3
In this example, the script uses a nested WHERE-EQUALS statement to direct
calls to the appropriate scripts, depending on the month and the CDN of the call.
WHERE MONTH OF YEAR EQUALS
VALUE DECEMBER:
WHERE CDN EQUALS
VALUE 5553500:
GIVE RAN winter_special_automotive_ran_gv
VALUE 5553600:
GIVE RAN winter_special_electronics_ran_gv
VALUE 5553700:
GIVE RAN winter_special_sporting_ran_gv
VALUE 5553800:
GIVE RAN winter_special_kitchen_ran_gv
DEFAULT:
GIVE RAN winter_special_general_ran_gv
END WHERE
VALUE APRIL:
GIVE RAN spring_specials_general_ran_gv
VALUE JULY:
GIVE RAN summer_specials_general_ran_gv
VALUE SEPTEMBER:
GIVE RAN fall_specials_general_ran_gv
DEFAULT:
GIVE RAN default_general_ran_gv
END WHERE

Scripting Guide for Communication Server 1000/Meridian 1 PBX 265


Advanced script commands Standard 8.05

266 Contact Center Manager


Chapter 8

Networking commands

In this chapter
Overview 268
Section A: Network ACD routing 277
Section B: Network Skill-Based Routing 285

Scripting Guide for Communication Server 1000/Meridian 1 PBX 267


Networking commands Standard 8.05

Overview

If your Contact Center Manager system has the Network Skill-Based Routing
(NSBR) option, calls can be sent from one contact center to another. When a call
is sent between sites through the network, the call is processed by the network
script at the target site only if the call returns to the queue.

Using network skillsets


A network skillset is common to all Contact Center Manager servers in a
network. An administrator at the Network Control Center (NCC) must create a
network skillset, and the NCC automatically propagates the network skillset to
all sites. When a script queues a call to a network skillset, the call can be routed
to any server on the network.

If a site has a local skillset with the same name as a network skillset, the server
converts the local skillset to a network skillset. Any agents assigned to the local
skillset remain assigned to the network skillset. The existing scripts continue to
function as before (that is, the QUEUE TO SKILLSET command continues to
queue calls locally), and other sites can queue calls to the skillset. However,
unless you modify your scripts to include the network skillset, calls for that
skillset that arrive at your site cannot be queued to any other site.

To use NSBR, you must modify your existing scripts when a network skillset is
propagated to your site. You can write your scripts to route calls to both the local
skillset (QUEUE TO SKILLSET) and the network skillset (QUEUE TO
NETWORK SKILLSET).

If Local Node Inclusion (LNI) is defined for the network skillset, then only the
QUEUE TO NETWORK SKILLSET command is required. Calls are
automatically queued to both the local and target sites.

Consider the order in which calls are queued to local and network skillsets.
Often, it is more efficient to first queue a call locally, and then wait a specific
amount of time before queuing to a network skillset. If a local agent is available
and qualified to handle the call, the call is immediately presented to the agent.

268 Contact Center Manager


December 2007 Networking commands

Beginning with Symposium Contact Center Server 5.0, you can select the Local
Node Inclusion (LNI) option for the QUEUE TO NETWORK SKILLSET
command. Using this option with the network skillset, you can queue both local
and network agents. Therefore, if you use this option, you do not need to queue
to the local skillset first, and then to the network skillset. You need to queue only
to the network skillset.

The Local Node Inclusion (LNI) option is available for the Agent Reservation
methods when defining the network skillset as shown in the following table.

Agent Reservation method Description

AVERAGE SPEED ANSWER The server waits a configurable amount


of time. During this time, it examines
the agent reservation notifications
received from the other sites to identify
the reserved agents with the highest
priority for the skillset, and determine
which of these agents is at the site with
the fastest average speed of answer for
the skillset. It then routes the call to the
site with the fastest average speed of
answer.
This method distributes calls for a given
skillset to the most efficient sites in the
network.
If you choose this method, only servers
running Symposium Contact Center
Server 5.0 or later can be added to the
routing table for the network skillset.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 269


Networking commands Standard 8.05

Agent Reservation method Description

LONGEST IDLE AGENT The server waits a configurable amount


of time. During this time, it examines
the agent reservation notifications
received from the other sites to identify
the reserved agents with the highest
priority for the skillset, and to determine
which of these high-priority agents is
idle for the longest time. It then routes
the call to the site with the longest idle
agent.
This method helps distribute call load
across the network.
If you choose this method, only servers
running Symposium Contact Center
Server 5.0 or later can be added to the
routing table for the network skillset.
FIRST BACK The server routes the call to the first site
from which it receives an agent
reservation notification. Because the
server does not wait to hear from slower
sites, but queues calls to the site that
responds most quickly, calls are
answered more quickly with this
method.

Agent priority takes precedence over agent idle time in any network routing
decision.

You can configure idle time in the nodal client Global Settings by using any of
the following definitions:
„ Idle time since login
„ Last state change
„ Last call

270 Contact Center Manager


December 2007 Networking commands

Example 1
This example shows a call queued to a network skillset with the include local
node option selected. The call is queued to local and network agents at the same
time.
QUEUE TO NETWORK SKILLSET NetworkSales
WAIT 6 /* depends on configuration of nodal request wait timer */

If the administrator at the NCC deletes the network skillset, the network skillset
at your site is converted to a local skillset and agents remain assigned to the local
skillset. If you write your scripts to queue to both the local and network skillsets,
calls queue to the local skillset. However, if agents for the local skillset are not
available and the call is queued to the network skillset, the QUEUE TO
NETWORK SKILLSET command fails.

Example 2
This example shows a call queued to a network skillset with the include local
node option not selected.
QUEUE TO SKILLSET Sales_sk
WAIT 2
QUEUE TO NETWORK SKILLSET Sales_sk
WAIT 6

Example 3
This example shows how to queue to multiple skillsets. All skillsets listed in the
queue request must have the same routing configuration.
QUEUE TO NETWORK SKILLSET NetworkSales, NetworkSupport
WAIT 6

LONGEST IDLE AGENT and AVERAGE SPEED ANSWER are not


supported if skillsets do not have the same routing configuration.

If you combine skillsets from any of LONGEST IDLE AGENT, AVERAGE


SPEED ANSWER, or FIRST BACK is applied.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 271


Networking commands Standard 8.05

Limitations

A Release 6.0 network supports nodes from Releases 5.0 and 6.0 if the NCC is
Release 6.0 or later.
For more information about limitations on multiple skillsets, see the Network
Control Center Administrator's Guide.

Sending calls to a remote site


Three commands are available to send calls to a remote site:
„ ROUTE CALL
„ QUEUE TO NACD
„ QUEUE TO NETWORK SKILLSET

For more information about these commands, see “ROUTE CALL” on page
241, “QUEUE TO NACD” on page 281, and “QUEUE TO NETWORK
SKILLSET” on page 288.

Routing calls after an NSBR command failure


If a network routing command fails, you can ensure the call is routed to the
appropriate site by using NACD routing, which must be configured at the
switch. For information about how to configure NACD routing, see the Contact
Center - Manager, Communication Server 1000 and Voice Processing Guide.

A network routing command can fail for the following reasons:


„ The NCC server cannot communicate with the server in Contact Center
Manager at the source site.
„ The WAN link between the Contact Center Manager server at the source
site and the destination site is not transmitting data.

To determine if NACD routing is needed, use the QUEUED, PRIORITY IN


QUEUE, or PRIORITY IN NETWORK QUEUE intrinsic after a QUEUE TO
SKILLSET or QUEUE TO NETWORK SKILLSET command. If either of these
commands successfully queues the call, the intrinsic (QUEUED, PRIORITY IN
QUEUE, or PRIORITY IN NETWORK QUEUE) returns a value of True.

272 Contact Center Manager


December 2007 Networking commands

The following examples show how to use the QUEUED and PRIORITY IN
QUEUE intrinsics in your scripts.

Example 1
This example uses the QUEUED intrinsic.
QUEUE TO NETWORK SKILLSET sales_sk, service_sk
WAIT 4
/* If the call is not queued to either of these skillsets, NACD
routes the call */
IF NOT QUEUED THEN
QUEUE TO NACD nacd_queue
END IF

Example 2
This example uses the PRIORITY IN NETWORK QUEUE intrinsic.
QUEUE TO NETWORK SKILLSET sales_sk
WAIT 4
/* If the call is not queued to this skillset, NACD routes the
call */
IF (PRIORITY IN NETWORK QUEUE sales_sk = 0) THEN
QUEUE TO NACD nacd_queue
END IF

Limitations of the network script


The network script handles error conditions and can perform only a limited
number of treatments on the call. This restriction is in effect in case the call
returns to the queue because the reserved agent becomes unreserved after the
call is presented.

Because calls are not networked to a contact center until an agent is reserved, the
calls do not need to be queued. The target script must treat a network call with
commands that handle the call only if the call returns to queue and if default call
handling is not desired.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 273


Networking commands Standard 8.05

Subscripts for the network script do not generate call statistics. Therefore, the
network script is the only script from which incoming call statistics are
collected.

Restrict local calls entering the network CDN


The network CDNs process only network calls, so you must ensure that local
calls do not enter the network CDN. Local calls that enter the contact center
though a network CDN are not handled properly.

Network script restrictions


Do not use the following commands or intrinsics in the network script:
„ GIVE BUSY
„ GIVE BUSY CONTROLLED
„ GIVE OVERFLOW
„ GIVE OVERFLOW CONTROLLED
„ QUEUE TO NACD
„ QUEUE TO NETWORK SKILLSET
„ CHANGE PRIORITY IN NACD
„ CHANGE PRIORITY IN NETWORK SKILLSET
„ REMOVE FROM NACD
„ REMOVE FROM NETWORK SKILLSET
„ PRIORITY IN NETWORK QUEUE

ATTENTION
If any command in this section is used in either the network
script or any of the subscripts it can call, your server can
stop responding or call execution can stop. You must ensure
that none of the scripts called by the network script (either
primary or secondary) include any of the commands listed
in this section.

274 Contact Center Manager


December 2007 Networking commands

These commands are rejected during script validation. When a call enters the
network and the agent becomes unavailable, the network script is executed. If
the network script executes a subscript that contains any of these commands and
the commands run, further script execution stops, the call remains in a queue,
and the call continues to experience previous treatments.

However, because a call is networked, it already has ringback. You do not need
to use GIVE BUSY or OVERFLOW to treat to these calls.

For information about these commands in SIP-enabled contact centers, see “SIP
Contact Center” on page 675.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 275


Networking commands Standard 8.05

276 Contact Center Manager


December 2007 Networking commands

Section A: Network ACD routing

In this section
CHANGE PRIORITY IN NACD 278
QUEUE TO NACD 281
REMOVE FROM NACD 283

Scripting Guide for Communication Server 1000/Meridian 1 PBX 277


Networking commands Standard 8.05

CHANGE PRIORITY IN NACD

Use the CHANGE PRIORITY IN NACD command to change the priority of a


call in an NACD ACD-DN and in the queues at the target NACD sites.

Script syntax
CHANGE PRIORITY IN NACD <acd_dn> TO PRIORITY <priority>

Parameters
Enter information for the following parameters:
„ <acd_dn> The number of the ACD-DN to which the call is queued. This
parameter must be a single ACD-DN or, if you use a variable, an ACD type
variable.
„ <priority> The new priority with which you want the call queued to the
specified ACD-DN.

Restrictions
The following restrictions apply to this command:
„ The CHANGE PRIORITY IN NACD command cannot be the first
command in a voice script.
„ Do not use this command in the network script (if you purchased the NSBR
feature) or any of its subscripts.

Example
In this example, if the age of the call queued to the NACD queue is greater than
60 seconds, the priority of the call increases from 3 to 1.
IF (AGE OF CALL > 60) THEN
CHANGE PRIORITY IN NACD nacd_queue TO PRIORITY 1
END IF

278 Contact Center Manager


December 2007 Networking commands

Limitations of this command


To use a network ACD, you configure a local ACD-DN on the switch with up to
20 target switches. Each target has an associated timer. For example, your local
ACD-DN can be configured as follows:

Local ACD-DN Target switch Timer (seconds)

4500 63434500 0
63444500 16

63454500 20

In this example, when you use the QUEUE TO NACD command, the call is
queued to 63434500 immediately, to 63444500 after 16 seconds, and to
63454500 after 20 seconds.

When you issue the CHANGE PRIORITY IN NACD command, the priority
changes only for those target sites to which the call is not yet queued.

Example
QUEUE TO NACD nacd_queue WITH PRIORITY 4
WAIT 10
CHANGE PRIORITY IN NACD nacd_queue TO PRIORITY 2
WAIT 2

In this example, the call is queued to the local ACD-DN, which has three target
sites. After 10 seconds, the command to change the priority of the call in the
NACD queues executes. Because of the timer, the call is already queued to the
first target site. Therefore, the priority of the call at this site does not change.
The call is not yet queued to the second and third sites, however, so the priority
for these target sites does change.

Local ACD-DN Target switch Timer Result

4500 63434500 0 Priority 4

63444500 16 Priority 2

Scripting Guide for Communication Server 1000/Meridian 1 PBX 279


Networking commands Standard 8.05

Local ACD-DN Target switch Timer Result

4500 63454500 20 Priority 2

280 Contact Center Manager


December 2007 Networking commands

QUEUE TO NACD

If the network routing command fails, you can use the QUEUE TO NACD
command to ensure the call is routed to the appropriate site.

Use the QUEUE TO NACD command to queue a call to one or more remote
target ACD-DNs that are defined in the NACD routing table for the specified
ACD-DN in the command.

With this command, calls are queued on the remote switch rather than on
Contact Center Manager. You can use Contact Center Manager to:
„ remove calls from the queue
„ add calls to the queue
„ change the priority of the NACD call
„ provide treatments such as music, RAN, IVR, and broadcast
announcements for calls

Script syntax
QUEUE TO NACD <acd_dn> {WITH PRIORITY <priority>}

Optional
The WITH PRIORITY segment is optional.

Parameters
Enter information for the following parameters:
„ <acd_dn> The number of the ACD-DN to which you want the call queued.
This parameter must be a single ACD-DN or, if you use a variable, an ACD
type variable.
„ <priority> The priority with which you want the call queued to the
specified ACD-DN.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 281


Networking commands Standard 8.05

WITH PRIORITY option


You can assign the call a priority from 1 to 4, with 1 being the highest priority
and 4 being the lowest. Although a priority of 5 or 6 can be specified, the actual
priority within the NACD queues defaults to 4 (the lowest possible for NACD).

Restrictions
The following restrictions apply to this command:
„ The WITH PRIORITY option applies to voice contacts only.
„ Do not insert the GIVE BUSY or GIVE OVERFLOW command
immediately after the QUEUE TO NACD command.
„ Use a WAIT command with at least 2 seconds after a QUEUE TO NACD
command.
„ Do not use this command in the network script (if you purchased the
Network Skill-Based Routing feature) or any of its subscripts.

Example
In this example, a call is queued locally to the sales skillset and to an NACD.
QUEUE TO SKILLSET sales_sk
WAIT 6
QUEUE TO NACD nacd_queue

Add a brief pause between the QUEUE TO SKILLSET and QUEUE TO NACD
commands. This pause can prevent an error if an agent from the local skillset
becomes unavailable before the call is answered. If this happens, the QUEUE
TO NACD command fails because Contact Center Manager cannot queue to
NACD while presenting a call to a local agent.

282 Contact Center Manager


December 2007 Networking commands

REMOVE FROM NACD

Use the REMOVE FROM NACD command to remove a call from the ACD-DN
to which the call is queued. The call is then removed from all targets in the
NACD table for that ACD-DN.

Script syntax
REMOVE FROM NACD <acd_dn>

Parameter
Enter information for the following parameter:
„ <acd_dn> The number of the ACD-DN from which you want the call
removed. This parameter must be a single ACD-DN or, if you use a
variable, it must be an ACD type variable.

Restrictions
The following restrictions apply to this command:
„ The REMOVE FROM NACD command cannot be the first command in a
voice script.
„ Do not use this command in the network script (if you purchased the NSBR
feature) or any of its subscripts.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 283


Networking commands Standard 8.05

Example
A call is queued to an NACD queue when it first arrives. If, after 60 seconds, the
call is not answered, it is removed from the NACD and queued to local sales and
service skillsets.
QUEUE TO NACD nacd_queue
WAIT 2
GIVE MUSIC pop_music_gv
SECTION Check_Age
WAIT 20
IF (AGE OF CALL > 60) THEN
EXECUTE Get_Out
END IF
EXECUTE Check_Age
SECTION Get_Out
REMOVE FROM NACD nacd_queue
QUEUE TO SKILLSET sales_sk, service_sk
WAIT 2

284 Contact Center Manager


December 2007 Networking commands

Section B: Network Skill-Based Routing

In this section
CHANGE PRIORITY IN NETWORK SKILLSET 286
QUEUE TO NETWORK SKILLSET 288
REMOVE FROM NETWORK SKILLSET 290

Scripting Guide for Communication Server 1000/Meridian 1 PBX 285


Networking commands Standard 8.05

CHANGE PRIORITY IN NETWORK SKILLSET

Use the CHANGE PRIORITY IN NETWORK SKILLSET command to change


the priority of a call in a network skillset. The priority of the call is changed
within the network skillsets that are listed in the command. This command
applies only to network skillsets.

Script syntax
CHANGE PRIORITY IN NETWORK SKILLSET [<network_skillset> |
<network_skillset_list>] TO PRIORITY <priority>

Parameters
Enter information for the following parameters:
„ <network_skillset> or <network_skillset_list> The network skillset, or
list of network skillsets, to which the call is queued.
„ <priority> The new priority with which you want the call queued to the
specified network skillset.

Restrictions
The following restrictions apply to this command:
„ The CHANGE PRIORITY IN NETWORK SKILLSET command cannot
be the first command in a script.
„ Do not use this command in the network script (if you purchased the
Network Skill-Based Routing feature) or any of its subscripts.
„ Do not insert the GIVE BUSY or GIVE OVERFLOW command
immediately after the QUEUE TO NETWORK SKILLSET command.
Currently, this applies only to voice contacts.
„ Use a WAIT command with at least 4 seconds after a QUEUE TO
NETWORK SKILLSET command.

286 Contact Center Manager


December 2007 Networking commands

The amount of time given with the WAIT command depends on your system
response time. For example, if you are using Virtual Network Services, you may
require a longer wait time.

Example
In this example, if the age of the call queued to the network skillset
(skillset_N1_sk) is greater than 60 seconds, the priority of the call is increased
from 3 to 1.
IF (AGE OF CALL > 60) THEN
CHANGE PRIORITY IN NETWORK SKILLSET skillset_N1_sk TO
PRIORITY 1
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 287


Networking commands Standard 8.05

QUEUE TO NETWORK SKILLSET

Use the QUEUE TO NETWORK SKILLSET command to queue a call on a


network-wide basis to specified skillsets. You can simultaneously queue calls to
multiple skillsets. However, to queue a call to local and network skillsets, you
must use the QUEUE TO SKILLSET command for the local skillsets, unless
you use Contact Center Manager with Network Control Center Release 5.0 or
greater, and enable the include source node option for the network skillset.

Script syntax
QUEUE TO NETWORK SKILLSET [<network_skillset> |
<network_skillset_list>] {WITH PRIORITY <priority>}

Optional
The WITH PRIORITY segment is optional.

Parameters
Enter information for the following parameters:
„ <network_skillset> or <network_skillset_list> The network skillset, or
list of network skillsets, to which you want the call queued.
„ <priority> The priority with which you want the call queued to the
specified network skillset.

WITH PRIORITY option


You can specify the priority with which the call is queued. You can assign a
priority of 1 to 6, with 1 being the highest priority and 6 being the lowest. If you
do not specify a priority, the call is queued with the default priority of 6. Calls
with high priorities are presented to the agents before calls with lower priorities.

288 Contact Center Manager


December 2007 Networking commands

Restrictions
The following restrictions apply to this command:
„ Do not insert the GIVE BUSY or GIVE OVERFLOW command
immediately after the QUEUE TO NETWORK SKILLSET command.
This restriction applies only to voice contacts.
„ Use a WAIT command with at least 4 seconds after a QUEUE TO
NETWORK SKILLSET command.
The amount of time given with the WAIT command depends on your
system response time. For example, if you are using Virtual Network
Services, you may require a longer wait time.
„ Do not use this command in the network script (if you purchased the NSBR
feature) or any of its subscripts.

Queuing to a list of network skillsets


If you specify a list of skillsets with the QUEUE TO NETWORK SKILLSET
command, calls are always randomly queued to the skillsets. You can configure
the number of target nodes, from 3 to 20.

Example
In this example, if the local skillset (local_skill_main_sk) is out of service, the
call is queued to the network skillset (skillset_N1_sk) and to a local backup
skillset.
IF OUT OF SERVICE local_skill_main_sk THEN
QUEUE TO NETWORK SKILLSET skillset_N1_sk
WAIT 4
QUEUE TO SKILLSET backup_sk
WAIT 4
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 289


Networking commands Standard 8.05

REMOVE FROM NETWORK SKILLSET

Use the REMOVE FROM NETWORK SKILLSET command to remove a


queued call from a network skillset or skillsets. This command applies only to
network skillsets.

Script syntax
REMOVE FROM NETWORK SKILLSET [<network_skillset> |
<network_skillset_list>]

Parameter
Enter information for the following parameter:
„ <network_skillset> or <network_skillset_list> The network skillset, or
list of network skillsets, from which you want the call removed. You can
also replace this parameter with an intrinsic returning a skillset.

Restrictions
The following restrictions apply to this command:
„ The REMOVE FROM NETWORK SKILLSET command cannot be the
first command in a script.
„ Do not use this command in the network script (if you purchased the
Network Skill-Based Routing feature) or any of its subscripts.

Examples

Example one
In this example, the call is queued to the network skillset (skillset_N1_sk). If the
call is not answered within 60 seconds, the call is queued to a local backup
skillset.
QUEUE TO NETWORK SKILLSET skillset_N1_sk
WAIT 4

290 Contact Center Manager


December 2007 Networking commands

GIVE RAN agents_busy_ran_gv


GIVE MUSIC pop_music_gv
SECTION Check_Age
WAIT 20
IF (AGE OF CALL > 60) THEN
EXECUTE Get_Out
END IF
EXECUTE Check_Age
SECTION Get_Out
REMOVE FROM NETWORK SKILLSET skillset_N1_sk
QUEUE TO SKILLSET backup_sk
WAIT 2
SECTION WaitLoop

Example 2
This example shows a network script when the Local Node Inclusion (LNI)
option is selected.
/* Local Node Inclusion option enabled for network skillset at the
source site. Call is queued to the local and remote sites. After 6
seconds we check if the call is queued anywhere and if not we send
the call to an emergency number. If the call is queued somewhere,
the caller hears the assigned music source. Every 30 seconds we
check the condition of the call, to see if it is still queued, if
not then we perform the same check as was performed when the call
entered the script.
If the call is queued somewhere, we then check the priority of the
call in the local skillset. If it has no priority in the local
skillset, then we check the condition of the skillset, if it is
staffed. If the local skillset is staffed then we requeue the call
locally. If the call has a priority in a local skillset, we ignore
the local priority check and verify the call priority in the
network. If the call is not queued to the network, the call is
requeued. If the call is queued to the network the network
priority check is ignored and we repeat the wait check every 30
seconds, until the call is answered or the caller abandons.
*/
QUEUE TO NETWORK SKILLSET skillset_cv WITH PRIORITY prio_cv
WAIT 6

Scripting Guide for Communication Server 1000/Meridian 1 PBX 291


Networking commands Standard 8.05

IF NOT QUEUED THEN


ROUTE CALL emerg_dn
END IF

GIVE MUSIC music_cv

SECTION WaitLoop

WAIT wait_timer30/* 30 sec */

IF NOT QUEUED THEN


QUEUE TO NETWORK SKILLSET skillset_cv WITH PRIORITY
prio_cv
WAIT 6 /* Allow time to determine if local or remote queue
is staffed */
IF NOT QUEUED THEN
ROUTE CALL emerg_dn
END IF
END IF

IF (PRIORITY IN QUEUE skillset_cv = 0)THEN


IF NOT OUT OF SERVICE skillset_cv THEN
QUEUE TO SKILLSET skillset_cv WITH PRIORITY prio_cv
WAIT 2
END IF

IF (PRIORITY IN NETWORK QUEUE skillset_cv = 0) THEN


QUEUE TO NETWORK SKILLSET skillset_cv WITH PRIORITY
prio_cv
WAIT 2
END IF

EXECUTE WaitLoop

292 Contact Center Manager


Chapter 9

Voice processing commands

In this chapter
Overview 294
Choosing the most efficient commands 295
Section A: Basic IVR 301
Section B: Voice session commands 305
Section C: Broadcast announcements 319

Scripting Guide for Communication Server 1000/Meridian 1 PBX 293


Voice processing commands Standard 8.05

Overview

Use voice processing commands to communicate with calls using recorded


announcements (RAN), interactive voice response (IVR) systems, broadcast
announcements, and voice prompts.

You can play messages to calls or, if your contact center has an IVR system, you
can collect information from the call so agents can service the call more
efficiently.

Voice commands apply only to voice contacts.

Voice processing script execution dynamics


All voice processing commands, including GIVE RAN, suspend the script until
one of the following events occur:
„ The command is complete.
„ The script is interrupted by an agent becoming available.
„ The call ends.

Within the OPEN/END VOICE SESSION clause, it is the PLAY PROMPT and
COLLECT DIGITS script commands that suspend the call, not the OPEN and
END VOICE SESSION commands.

For information about the GIVE RAN command and other commands in SIP-
enabled contact centers, see “SIP Contact Center” on page 675.

294 Contact Center Manager


December 2007 Voice processing commands

Choosing the most efficient commands

This section contains information to help you decide which voice processing
commands are the most efficient for your contact center.

Typical uses of voice processing commands


The following sections describe the typical uses of different types of voice
processing commands.

GIVE RAN
Use the GIVE RAN command in the following situations:
„ when you want to play a message to calls
„ when your contact center has RAN equipment from a previous contact
center installation
„ if RAN equipment is less expensive than a voice processing system and
other voice processing functions are not required

For information about GIVE RAN in SIP-enabled contact centers, see “SIP
Contact Center” on page 675.

GIVE IVR
Use the GIVE IVR command in the following situations:
„ when you use a third-party voice processing system for announcements or
voice menus (call interaction)
„ when you use Nortel Self Service or any third-party application with
Meridian Mail, or CallPilot for voice menus (call interaction)

For information about the GIVE IVR command in SIP-enabled contact centers,
see “GIVE IVR” on page 679.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 295


Voice processing commands Standard 8.05

GIVE CONTROLLED BROADCAST ANNOUNCEMENT


Use the GIVE CONTROLLED BROADCAST ANNOUNCEMENT command
in the following situations:
„ when you use Contact Center Voice Services on CallPilot or Meridian Mail
and ACCESS to simultaneously play the same message to multiple calls
„ because controlled broadcast announcements use ports more efficiently
than RANs, and because it is easier to control the message that is played

The GIVE CONTROLLED BROADCAST feature is not supported on a


CS 1000E platform. For more information, see Nortel Product Bulletin
P-2006-0312_Global.

The GIVE CONTROLLED BROADCAST command is not supported in


SIP-enabled contact centers.

Voice Sessions
Use the OPEN VOICE SESSION and END VOICE SESSION commands when
you use Contact Center Voice Services on CallPilot or Meridian Mail to
provide:
„ customized messages (for example, to play a call expected wait time)
„ call interaction (for example, digit collection)

Contact center configuration


Your contact center configuration and resources determine which commands
you can use.

If you have You can use

Contact Center Voice GIVE IVR


Services on CallPilot or GIVE CONTROLLED BROADCAST
Meridian Mail ANNOUNCEMENT
OPEN/END VOICE SESSION

a third-party voice processing GIVE IVR


system

296 Contact Center Manager


December 2007 Voice processing commands

Playing messages
If callers only listen to the message, as opposed to making selections, you can
use the following commands:
„ GIVE RAN
„ GIVE IVR
„ GIVE CONTROLLED BROADCAST ANNOUNCEMENT
„ OPEN/END VOICE SESSION with PLAY PROMPT

For information about the GIVE RAN command, see page “GIVE RAN” on
page 223.

For information about the GIVE RAN command and other commands in SIP-
enabled contact centers, see “SIP Contact Center” on page 675.

Interactive voice sessions


If callers enter information during the voice session, you can use the following
commands:
„ OPEN/END VOICE SESSION with COLLECT DIGITS
„ GIVE IVR with Host Data Exchange commands

For information about Host Data Exchange commands, see Chapter 10, “Host
Data Exchange commands.”

Single connection or broadcast


If all calls, or many calls, must hear the same announcement, use any of the
listen only commands. However, port use is more efficient if you use the
BROADCAST command rather than the one-call-to-one-port commands. With
BROADCAST, you can sustain higher call rates with fewer ports.

Use the one-call-per-port commands to play custom messages to calls (for


example, EXPECTED WAIT TIME) if call input is collected, or if you have a
third-party voice processing system.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 297


Voice processing commands Standard 8.05

The GIVE CONTROLLED BROADCAST ANNOUNCEMENT command


connects multiple calls for each port.

The following commands connect one call for each port:


„ GIVE IVR
„ OPEN/END VOICE SESSION

Start/stop and CONTINUOUS modes


Start/stop operation means the caller is guaranteed to hear the message from the
beginning to the end because callers are connected to the system at the
beginning of the message.

Continuous operation means the message plays repeatedly. When a call enters
the system, the caller hears the message from the point it is playing at the time.
That is, the caller can hear the message from middle to end and then hear the
beginning of the message when it starts over.

These commands can operate in Start/stop mode:


„ GIVE RAN
„ GIVE IVR
„ GIVE CONTROLLED BROADCAST ANNOUNCEMENT
„ OPEN/END VOICE SESSION

The GIVE CONTROLLED BROADCAST ANNOUNCEMENT command also


supports the continuous mode.

The CONTROLLED BROADCAST CONTINUOUS command connects the


call immediately upon arrival and continues the script only after one full cycle of
the message is heard.

For information about these commands in SIP-enabled contact centers, see “SIP
Contact Center” on page 675.

298 Contact Center Manager


December 2007 Voice processing commands

Impact of commands
Some commands use more contact center system resources than others. One
parameter that determines the impact of the different voice processing
commands on the system is the amount of messaging necessary to run the
statements. Commands that interact with Call Pilot and Meridian Mail use more
system CPU resources than those that do not:
„ Lower-usage commands are GIVE RAN and GIVE IVR.
„ Higher-usage commands are GIVE CONTROLLED BROADCAST
ANNOUNCEMENT and OPEN/END VOICE SESSION.

Cluster the voice segments in as few PLAY PROMPT statements as possible


(within the maximum allowed). Clustering voice segments uses fewer resources
than using multiple PLAY PROMPT statements, and achieves the same effect.

Examples
The following examples demonstrate how to properly use the PLAY PROMPT
command.

Best practice
PLAY PROMPT NUMBERBYDIGIT 1234

Not recommended
PLAY PROMPT number 1 number 2 number 3 number 4

Do not use
PLAY PROMPT number 1
PLAY PROMPT number 2
PLAY PROMPT number 3
PLAY PROMPT number 4

Scripting Guide for Communication Server 1000/Meridian 1 PBX 299


Voice processing commands Standard 8.05

300 Contact Center Manager


December 2007 Voice processing commands

Section A: Basic IVR

In this section
GIVE IVR 302

Scripting Guide for Communication Server 1000/Meridian 1 PBX 301


Voice processing commands Standard 8.05

GIVE IVR

Use the GIVE IVR (interactive voice response) command to deliver a call to a
voice messaging system, such as CallPilot, Meridian Mail, or Nortel IVR. This
command is used only when Contact Center Manager is not controlling the
voice session. No statistics are pegged against activities that take place while the
call is in the voice messaging system.

After the IVR session is complete, the call is returned to the script.

For information about other voice processing commands, see “Overview” on


page 294.

For information about the GIVE IVR command in SIP-enabled contact centers,
see “GIVE IVR” on page 679.

Script syntax
GIVE IVR {INTERRUPTIBLE} <ivr_dn> {WITH PRIORITY <priority>}
{WITH TREATMENT <vsdn>}

Optional
The INTERRUPTIBLE keyword, the WITH PRIORITY option, and the WITH
TREATMENT segments are optional.

Parameters
Enter information for the following parameters:
„ <ivr_dn> The switch ACD-DN in which you want the call placed.
„ <priority> The priority with which you want the call queued to the voice
services queue.
„ <vsdn>(Meridian Mail)/<sdn>(CallPilot) The voice service DN for the
treatment that you want to give the call.

302 Contact Center Manager


December 2007 Voice processing commands

The voice messaging system voice ports must be configured as agents for the
queue that is specified through the parameter ivr_dn.

Execution of the script is suspended until the IVR session is complete.

The IVR session is not interrupted by an agent becoming idle unless the
INTERRUPTIBLE keyword is used.

INTERRUPTIBLE keyword
When you write your script, you can queue a call first and then use the GIVE
IVR command to deliver the call to a voice messaging system. If you use the
INTERRUPTIBLE keyword, the IVR session is interrupted when an agent
becomes available to take the call. If you do not use the INTERRUPTIBLE
keyword, the voice session continues until it is complete, even if an agent
becomes available.

The call holds its position in all of the queues that it was in prior to the GIVE
IVR command.

Do not use the INTERRUPTIBLE keyword for IVR sessions that include
menus. If you do this, an agent becoming available can interrupt the contact
while the caller is listening to the menu options.

For information about the GIVE IVR command in SIP-enabled contact centers,
see “GIVE IVR” on page 679.

Longest waiting calls and INTERRUPTIBLE IVR sessions


Use the INTERRUPTIBLE keyword to ensure that calls waiting for the longest
amount of time are presented to the first available agent. If you do not use the
INTERRUPTIBLE keyword, the longest waiting call may be held in an IVR
session, while calls that enter the system later are presented to available agents.

WITH PRIORITY option


You can specify the priority with which the call is queued. You can assign a
priority of 1 to 4, with 1 being the highest priority and 4 being the lowest. A call
is assigned a priority of 4 by default.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 303


Voice processing commands Standard 8.05

WITH TREATMENT option


You can specify the treatment that a call receives. You can apply different voice
services, such as menus and announcements, to the call depending on the
treatment specified. To configure voice service treatments, use CallPilot or
Meridian Mail. If you do not specify a treatment, the system applies the default
treatment DN defined for the IVR ACD DN.

Restrictions
The following restrictions apply to this command:
„ Do not insert the GIVE BUSY or GIVE OVERFLOW command
immediately after the GIVE IVR command.
„ For the Meridian 1 PBX switch, do not use the WITH TREATMENT
option with the GIVE CONTROLLED BROADCAST
ANNOUNCEMENT and OPEN VOICE SESSION commands. Use of this
option with these commands can cause the switch to lose voice ports.

For information about these commands in SIP-enabled contact centers, see “SIP
Contact Center” on page 675.

Example
In this example, the call is queued to the sales skillset and is then given IVR
treatment. The IVR session is interrupted if an agent becomes available to
answer the call before the IVR session is complete. Otherwise, the caller hears
music while waiting in a queue.
QUEUE TO SKILLSET sales_sk
WAIT 2
GIVE IVR INTERRUPTIBLE ivr_dn WITH TREATMENT agents_busy
GIVE MUSIC pop_music_gv

304 Contact Center Manager


December 2007 Voice processing commands

Section B: Voice session commands

In this section
COLLECT DIGITS 306
OPEN VOICE SESSION and END VOICE SESSION 309
PLAY PROMPT 313

Scripting Guide for Communication Server 1000/Meridian 1 PBX 305


Voice processing commands Standard 8.05

COLLECT DIGITS

Use the COLLECT DIGITS command to collect digits from the caller through
voice ports. Script execution is suspended until the digit collection is complete.
If the call is queued before the COLLECT DIGITS command is executed, digit
collection is interrupted when an agent becomes available.

An enhanced GIVE IVR command replaces the COLLECT DIGITS command


in SIP-enabled contact centers. For information about the GIVE IVR command
in SIP-enabled contact centers, see “GIVE IVR” on page 679.

The maximum number of digits that can be collected is 16. You must also define
a DN type call variable in which to store the digits.

ATTENTION
This command can be used only within an OPEN VOICE
SESSION and END VOICE SESSION section.

Script syntax
COLLECT <max_num_of_digits> DIGITS INTO <call_digit_var>

{NO TYPE AHEAD}

{INTER DIGIT TIMER <timer>}

{WITH TERMINATING CHARACTER <terminating_char>}

Optional
The NO TYPE AHEAD keyword and the INTER DIGIT TIMER and WITH
TERMINATING CHARACTER segments are optional.

306 Contact Center Manager


December 2007 Voice processing commands

Parameters
Enter information for the following parameters:
„ <max_num_of_digits> The maximum number of digits, up to 16, that you
want to collect. The script continues automatically when the specified
number of digits is collected.
The terminating character, if you use it, counts as a digit. For example, if
you are collecting 8 digits from the call, you must specify the maximum
number of digits as 9.
„ <call_digit_var> The call variable in which you want to store the collected
digits. This variable must be a DN type call variable.
„ <timer> The maximum time, in seconds, that you want the script to wait
between each digit collected.
„ <terminating_char> The number (from 0–9) or symbol (* or #) that, when
collected, terminates the digit collection before the maximum number of
digits is reached.

You must create the call variable before you can use the COLLECT DIGITS
command. For more information, see “Creating script variables” on page 109.

When you create the call variable, you must assign a numerical value to it. This
value changes when the caller enters digits.

The symbols * and # are terminating characters only. They cannot be used for
any other purpose.

NO TYPE AHEAD keyword


Use the NO TYPE AHEAD keyword to tell the system to discard any digits
pressed by the caller before this command is executed. Use this option, for
example, if the caller entered digits during a preceding PLAY PROMPT
command and you want to discard them.

INTER DIGIT TIMER command


By default, the voice port waits until the maximum number of digits is collected
or until the INTER DIGIT TIMER command times out. If no timer is given in
the command, a default value of 10 seconds is used.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 307


Voice processing commands Standard 8.05

WITH TERMINATING CHARACTER option


You can specify a terminating character to end the digit collection even if the
maximum number of digits is collected. The terminating character is not
included in the variable with the digits.

Ending digit collection


Digit collection ends under the following conditions:
„ The INTER DIGIT TIMER expires.
„ The terminating character is received.
„ The maximum number of possible digits is reached.
„ An agent becomes available to take the call (if the call is already queued
before digit collection began).

Example
Use the COLLECT DIGITS command only within the OPEN VOICE SESSION
and END VOICE SESSION command. To see an example, see “Example” on
page 316.

308 Contact Center Manager


December 2007 Voice processing commands

OPEN VOICE SESSION and END VOICE


SESSION

Use the OPEN VOICE SESSION and END VOICE SESSION commands to
obtain control over a voice port on the voice processing system. After a voice
port is secure, the call is connected to the port automatically and the actions
specified between the OPEN VOICE SESSION and END VOICE SESSION
commands are performed.

You need Contact Center Voice Services on CallPilot or Meridian Mail to use
the OPEN VOICE SESSION and END VOICE SESSION commands.

An enhanced GIVE IVR command replaces OPEN/END VOICE SESSION


commands in SIP-enabled contact centers. For more information about the
GIVE IVR command in SIP-enabled contact centers, see “GIVE IVR” on page
679.

Script syntax
OPEN VOICE SESSION {<access_ivrdn>}
<statement1>

<statement2>

...

END VOICE SESSION

Optional
The access_ivrdn parameter is optional. If this parameter is not specified, the
system uses a default parameter.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 309


Voice processing commands Standard 8.05

Parameters
Enter information for the following parameters:
„ <access_ivrdn> The ACCESS IVR DN configured on the CallPilot or
Meridian Mail system.
Note: Nortel recommends that you use the default ACCESS IVR DN
configured in the Global Settings property page for the server, rather than
specifying an ACCESS IVR DN in the script. From the Contact Center
Manager Administration Launchpad, choose Configuration > (server
name) > Global Settings.
„ <statement1>, <statement2>, . . . The action that you want performed on
the call.

Restriction
This command applies to voice contacts only.

Possible actions
You can use any of the following commands inside the OPEN VOICE SESSION
and END VOICE SESSION commands:
„ ASSIGN TO
„ ROUTE CALL
„ IF-THEN-END-IF
„ IF-THEN-ELSE-END-IF
„ DISCONNECT
„ LOG
„ PLAY PROMPT
„ COLLECT DIGITS
„ SEND INFO
„ SEND REQUEST
„ GET RESPONSE
„ WHERE-EQUALS

310 Contact Center Manager


December 2007 Voice processing commands

Examples

Example 1
In this example, a voice session begins in which the caller receives a welcome
message and is informed that no agents are currently available to answer the call.
The caller is then asked to respond to a menu option by entering a digit from the
phoneset. The digit is collected into a variable named menu_choice_cv.
OPEN VOICE SESSION
PLAY PROMPT VOICE SEGMENT welcome_vs
VOICE SEGMENT all_agents_busy_vs
VOICE SEGMENT leave_message_vs
COLLECT 1 DIGITS INTO menu_choice_cv
END VOICE SESSION

Example 2
In this example, a voice session begins in which the caller receives a menu
option in the language of their choice. If they do not select options 1 or 2, they
are prompted to enter their choice one more time. The voice session ends and,
based on the collected data, the appropriate language and skillset is assigned to
the call.
OPEN VOICE SESSION
PLAY PROMPT WITH LANGUAGE lang_cv VOICE SEGMENT
gen_info_main_menu_vs
COLLECT 1 DIGITS INTO menu_choice_cv INTER DIGIT TIMER 2
IF menu_choice_cv <> 1 OR menu_choice_cv <> 2 THEN
ASSIGN 11 TO menu_choice_cv
PLAY PROMPT WITH LANGUAGE lang_cv VOICE SEGMENT
gen_info_main_menu_vs
COLLECT 1 DIGITS INTO menu_choice_cv INTER DIGIT TIMER 2
END IF
END VOICE SESSION
WHERE menu_choice_cv EQUALS
VALUE 1: ASSIGN French TO lang_cv
ASSIGN Gen_Info_Fr TO skillset_cv

Scripting Guide for Communication Server 1000/Meridian 1 PBX 311


Voice processing commands Standard 8.05

VALUE 2: ASSIGN English TO lang_cv


ASSIGN Gen_Info_En TO skillset_cv
DEFAULT: ASSIGN French TO lang_cv
ASSIGN Gen_Info_Fr TO skillset_cv
END WHERE
QUEUE TO SKILLSET skillset_cv

Syntax when using the GIVE CONTROLLED BROADCAST


ANNOUNCEMENT and OPEN VOICE SESSION commands
The following examples demonstrate the differences between using the GIVE
CONTROLLED BROADCAST ANNOUNCEMENT and OPEN VOICE
SESSION commands.

The GIVE CONTROLLED BROADCAST ANNOUNCEMENT is not


supported in SIP-enabled contact centers.

An enhanced GIVE IVR command replaces the OPEN VOICE SESSION


command in SIP-enabled contact centers. For more information about the GIVE
IVR command in SIP-enabled contact centers, see “GIVE IVR” on page 679.

The syntax for GIVE CONTROLLED BROADCAST ANNOUNCEMENT is:


GIVE CONTROLLED BROADCAST ANNOUNCEMENT {access acddn}
PLAY PROMPT VOICE SEGMENT x
VOICE SEGMENT y

The syntax for OPEN VOICE SESSION is:


OPEN VOICE SESSION {access acddn}
PLAY PROMPT VOICE SEGMENT x
END VOICE SESSION

The GIVE CONTROLLED BROADCAST feature is not supported on a


CS 1000E platform. For more information, see Nortel Product Bulletin
P-2006-0312_Global.

312 Contact Center Manager


December 2007 Voice processing commands

PLAY PROMPT

Use the PLAY PROMPT command to play a voice prompt or to speak a number
to the caller through a voice port. Voice prompts can be any of the following:
„ a list of voice segments identified by voice segment variables
„ a list of numbers
„ numbers interspersed with voice segments

If the call is queued, the voice prompt is interrupted when an agent is available
to take the call.

An enhanced GIVE IVR command replaces the PLAY PROMPT command in


SIP-enabled contact centers. For more information about the GIVE IVR
command in SIP-enabled contact centers, see “GIVE IVR” on page 679.

You need Contact Center Voice Services on CallPilot or Meridian Mail to use
the PLAY PROMPT command.

ATTENTION
Use this command only within an OPEN VOICE SESSION
and END VOICE SESSION command. The PLAY
PROMPT command is similar to the PLAY PROMPT
command used as part of the GIVE CONTROLLED
BROADCAST ANNOUNCEMENT command, but it
includes different optional parameters.

Script syntax
PLAY PROMPT

{WITH LANGUAGE <language>}

{NO TYPE AHEAD}

{[NUMBER | NUMBERBYDIGIT] <number>}

{VOICE SEGMENT <voice_seg>}

Scripting Guide for Communication Server 1000/Meridian 1 PBX 313


Voice processing commands Standard 8.05

You must include at least one (to a maximum of 50) NUMBER,


NUMBERBYDIGIT, or VOICE SEGMENT clause with this command. You can
place these commands in any order.

Optional
The WITH LANGUAGE segment is optional. The NO TYPE AHEAD,
NUMBER, and NUMBERBYDIGITS keywords are also optional.

Parameters
Enter information for the following parameters:
„ <language> The language in which you want the prompt played.
„ <number> The number that you want played.
„ <voice_seg> The voice segment that you want played. The maximum
length of a voice segment is 2 minutes (120 seconds) for Meridian Mail and
CallPilot.

WITH LANGUAGE option


You can record voice segments in various languages and then use the WITH
LANGUAGE option to specify in which language you want the voice segment
played. For example, if your contact center provides service in several
languages, you can record three versions of your main voice menu: English,
Spanish, and French. If you do not use the WITH LANGUAGE option, the
system uses the default language.

ATTENTION
If no other language is specified in the script, the default
language is played. The default language is system
dependent based on regional settings of the operating
system on the server. If the system default language is other
than English and you want to play any of the system-
defined voice segments, such as c_zero_gv which has a
predefined value English:file:1:1, you must specify in the
script PLAY PROMPT WITH LANGUAGE English.

314 Contact Center Manager


December 2007 Voice processing commands

NO TYPE AHEAD keyword


By default, the voice prompt is interrupted if the caller presses a digit on the
phone keypad. To set up the prompt so that it is not interrupted by the caller
entering digits, include the NO TYPE AHEAD option.

Numbers
You can record numbers as voice segments and then play them to calls. Contact
Center Manager comes with number variables predefined, but you must record
the voice segments. For Contact Center Voice Services on CallPilot, you use
Application Builder to record voice segments. For Contact Center Voice
Services on Meridian Mail, you use the Voice Prompt Editor.

For more information about Application Builder, see the CallPilot Application
Builder Guide. For more information about Voice Prompt Editor, see the Nortel
Contact Center Manager Administrator’s Guide.

A number can be an integer constant or a script variable of Integer or DN type.

You can play numbers to calls as a full number or as individual digits. For
example, the number 1234 can be spoken as either one thousand two hundred
thirty-four or one two three four.

To indicate how you want the number spoken, use either the NUMBER keyword
or the NUMBERBYDIGIT keyword.

NUMBER keyword
If you want a number to be spoken as full words, it must be preceded by the
NUMBER keyword. In this case, the number 1234 is spoken as one thousand
two hundred thirty-four.

NUMBERBYDIGIT keyword
If you want numbers to be spoken as digits, they must be preceded by the
NUMBERBYDIGIT keyword. In this case, the number 1234 is spoken as one
two three four.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 315


Voice processing commands Standard 8.05

Voice segments
Voice segments contain recorded voice data that you can play to calls. To do so,
you must record the voice segment, and then create a voice segment variable.
You can then use that variable in your script to identify the voice segment that
you want the caller to hear.

For Contact Center Voice Services on CallPilot, you use Application Builder to
create, record, and manage voice segments. For Contact Center Voice Services
on Meridian Mail, you use the Voice Prompt Editor.

For more information about Application Builder, see the CallPilot Application
Builder Guide. For more information about Voice Prompt Editor, see the Nortel
Contact Center Manager Administrator’s Guide.

In CallPilot and Meridian Mail, the maximum length of a voice segment is 2


minutes (120 seconds). Also, ensure you do not delete a voice segment in
Meridian Mail as all voice prompts shuffle up, and their file numbers change.
CallPilot does not have this issue.

Example
This example demonstrates a bank balance lookup using the PLAY PROMPT
command. Full IVR system are better equipped for this type of application
(rather than a voice session) because IVR systems are specially designed for this
type of work.

Use voice sessions in the contact center to make routing and queuing decisions,
rather than to replace IVR.
OPEN VOICE SESSION
PLAY PROMPT VOICE SEGMENT enter_account_number_vs
COLLECT 10 DIGITS INTO account_num_cv INTER DIGIT TIMER 5
WITH TERMINATING CHARACTER #
SEND REQUEST appl_id account_num
GET RESPONSE appl_id balance_cv
PLAY PROMPT VOICE SEGMENT acct_balance1_vs
NUMBERBYDIGIT account_num_cv
VOICE SEGMENT is_vs

316 Contact Center Manager


December 2007 Voice processing commands

NUMBER balance_cv
VOICE SEGMENT dollars_please_hold_vs
END VOICE SESSION

Scripting Guide for Communication Server 1000/Meridian 1 PBX 317


Voice processing commands Standard 8.05

318 Contact Center Manager


December 2007 Voice processing commands

Section C: Broadcast announcements

In this section
GIVE CONTROLLED BROADCAST ANNOUNCEMENT 320

Scripting Guide for Communication Server 1000/Meridian 1 PBX 319


Voice processing commands Standard 8.05

GIVE CONTROLLED BROADCAST


ANNOUNCEMENT

Use the GIVE CONTROLLED BROADCAST ANNOUNCEMENT command


to broadcast an announcement to multiple callers at the same time using a single
voice port (up to 50 callers). If an agent becomes available to take the call while
the broadcast message is playing, the message is interrupted.

The GIVE CONTROLLED BROADCAST ANNOUNCEMENT command is


not supported in SIP-enabled contact centers.

You need Contact Center Voice Services on CallPilot or Meridian Mail to use
the GIVE CONTROLLED BROADCAST ANNOUNCEMENT command.

The GIVE CONTROLLED BROADCAST feature is not supported on a


CS 1000E platform. You can use Open Voices sessions with one caller
per access channel for small contact centers on CS 1000E instead of
GIVE CONTROLLED BROADCAST. For more information, see Nortel
Product Bulletin P-2006-0312_Global.

ATTENTION
Ensure that you correctly set the value of the Maximum
Ports With Queuing For Broadcast option in the Global
Settings window on the client. If you set this value to be
greater than the actual number of ports in the IVR ACD-
DN, call processing suspends at this statement even if no
ports are free for the call. The calls queue until a
connection to the port becomes free. However, if you set
this value equal to or less than the number of ports in the
IVR ACD-DN, the caller only hears the broadcast if a port
with free capacity is available to connect the call (if all
ports are used, the call skips this statement and goes to the
next statement in the script).

320 Contact Center Manager


December 2007 Voice processing commands

Script syntax
GIVE CONTROLLED BROADCAST ANNOUNCEMENT {<access_ivrdn>}

{WITH PRIORITY <priority>}

PLAY PROMPT

{WITH LANGUAGE <language>}

{CONTINUOUS}

{[NUMBER | NUMBERBYDIGIT] <number>}

{VOICE SEGMENT <voice_seg>}

You must include at least one NUMBER, NUMBERBYDIGIT, or VOICE


SEGMENT clause with this command. You can include up to 50 NUMBER,
NUMBERBYDIGIT, or VOICE SEGMENT clauses with this command, in any
order.

Optional
The access_ivrdn parameter, WITH PRIORITY, and WITH LANGUAGE
segments are optional. The CONTINUOUS keyword is also optional.

Parameters
Enter information for the following parameters:
„ <access_ivrdn> The ACCESS IVR DN configured on the CallPilot or
Meridian Mail system.
Note: Nortel recommends that you use the default ACCESS IVR DN
configured in the Global Settings property page for the server, rather than
specifying an ACCESS IVR DN in the script. From the Contact Center
Manager Administration Launchpad, choose Configuration > (server
name) > Global Settings.
„ <priority> The priority with which you want the call queued.
„ <language> The language in which you want the broadcast announcement
presented.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 321


Voice processing commands Standard 8.05

„ <number> The number that you want broadcast.


„ <voice_seg> The voice segment that you want played to the call. The
maximum length of a voice segment is 2 minutes (120 seconds) for
Meridian Mail and CallPilot.

The GIVE CONTROLLED BROADCAST ANNOUNCEMENT command


must always contain the PLAY PROMPT command (with voice segments and
numbers). The other parameters are optional.

<access_ivrdn> parameter
You can specify the ACCESS IVR DN in which the call is placed. If no IVR DN
is specified, the default, which is configured using Contact Center Manager
Administration, is used.

WITH PRIORITY option


You can specify the priority with which the call is queued. You can assign a
priority of 1 to 4, with 1 being the highest priority and 4 being the lowest. A call
is assigned a priority of 4 by default.

PLAY PROMPT option


For the PLAY PROMPT option parameters, specify a list of voice segments
identified by voice segment variables, a list of numbers, or numbers interspersed
with voice segments.

CONTINUOUS option
By default, broadcast announcements always start from the beginning (that is, in
Start/stop mode). As an option, announcements can be given in continuous
mode, meaning the announcement is played continuously. Calls are connected to
voice ports as they enter the contact center; therefore, depending on the arrival
time, the calls may or may not start at the beginning of the announcement. Every
call hears one complete play of the announcement.

322 Contact Center Manager


December 2007 Voice processing commands

WITH LANGUAGE option


You can record voice segments in various languages and then use the WITH
LANGUAGE option to specify in which language you want the voice segment
played. For example, if your contact center provides service in several
languages, you can record three versions of your main voice menu: English,
Spanish, and French. If you do not use the WITH LANGUAGE option, the
system uses the default language.

ATTENTION
If no other language is specified in the script, the default
language is played. The default language is system
dependent based on regional settings of the operating
system on the server. If the system default language is other
than English and you want to play any of the system-
defined voice segments, such as c_zero_gv which has a
predefined value English:file:1:1, you must specify in the
script PLAY PROMPT WITH LANGUAGE English.

Restrictions
Do not insert the GIVE BUSY or GIVE OVERFLOW command immediately
after the GIVE CONTROLLED BROADCAST ANNOUNCEMENT
command.

Numbers
You can record numbers as voice segments and then play them to calls. Contact
Center Manager provides several predefined variables, but you must record the
voice segments. For Contact Center Voice Services on CallPilot, you use
Application Builder to record voice segments. For Contact Center Voice
Services on Meridian Mail, you use the Voice Prompt Editor.

For more information about Application Builder, see the CallPilot Application
Builder Guide. For more information about Voice Prompt Editor, see the Nortel
Contact Center Manager Administrator’s Guide.

A number can be an integer constant or a script variable of Integer or DN type.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 323


Voice processing commands Standard 8.05

You can play numbers to calls as a full number or as individual digits. For
example, the number 1234 can be spoken as either one thousand two hundred
thirty-four or one two three four.

To indicate how you want the number spoken, use either the NUMBER keyword
or the NUMBERBYDIGIT keyword.

NUMBER keyword
If you want a number to be spoken as full words, it must be preceded by the
NUMBER keyword. In this case, the number 1234 is spoken as one thousand
two hundred thirty-four or one two three four.

NUMBERBYDIGIT keyword
If you want numbers to be spoken as digits, they must be preceded by the
NUMBERBYDIGIT keyword. In this case, the number 1234 is spoken as one
two three four.

Voice segments
Voice segments contain recorded voice data that you can play to calls. To do so,
you must record the voice segment and then create a voice segment variable.
You can then use that variable in your script to identify the voice segment that
you want the caller to hear.

For Contact Center Voice Services on CallPilot, you use Application Builder to
create, record, and manage voice segments. For Contact Center Voice Services
on Meridian Mail, you use the Voice Prompt Editor.

For more information about Application Builder, see the CallPilot Application
Builder Guide. For more information about Voice Prompt Editor, see the Nortel
Contact Center Manager Administrator’s Guide.

The maximum length of a voice segment is 2 minutes (120 seconds) for


Meridian Mail and CallPilot.

324 Contact Center Manager


December 2007 Voice processing commands

Example
In this example, the script checks whether the call CLID is included in the
VIP_list_gv variable. If it is, the caller hears a special broadcast announcement.
Otherwise, the caller hears a general announcement.
IF (CLID = VIP_list_gv) THEN
GIVE CONTROLLED BROADCAST ANNOUNCEMENT
PLAY PROMPT VOICE SEGMENT gold_card_welcome_vs
ELSE
GIVE CONTROLLED BROADCAST ANNOUNCEMENT
PLAY PROMPT VOICE SEGMENT general_welcome_vs
END IF

WITH LANGUAGE example


This script segment determines the language and skillset based on the DNIS
information received from the call and assigns the appropriate value to call
variables.
WHERE DNIS EQUALS
VALUE 1215:ASSIGN English TO lang_pref_cv
ASSIGN Sales_English TO pref_skillset_cv
VALUE 1216:ASSIGN Japanese TO lang_pref_cv
ASSIGN Sales_Japanese TO pref_skillset_cv
VALUE 1217:ASSIGN German TO lang_pref_cv
ASSIGN Sales_German TO pref_skillset_cv
END WHERE
QUEUE TO SKILLSET pref_skillset_cv
WAIT 2
GIVE CONTROLLED BROADCAST ANNOUNCEMENT
PLAY PROMPT WITH LANGUAGE lang_pref_cv
VOICE SEGMENT welcome
GIVE MUSIC general_music
...

Scripting Guide for Communication Server 1000/Meridian 1 PBX 325


Voice processing commands Standard 8.05

326 Contact Center Manager


Chapter 10

Host Data Exchange commands

In this chapter
Overview 328
SEND INFO 332
SEND REQUEST 334
GET RESPONSE 336
Database Integration Wizard 339

Scripting Guide for Communication Server 1000/Meridian 1 PBX 327


Host Data Exchange commands Standard 8.05

Overview

Contact Center Manager provides a data exchange interface for third-party


applications (or hosts) to send data to and receive data from an active script. The
third-party application programming interface is referred to as the Host Data
Exchange (HDX) API.

The commands used to interact with the third-party application are referred to as
HDX commands. HDX commands process voice calls and multimedia contacts.
Typically, a host application queries data in a third-party database based on data
available in the script—such as CallID or DNIS— and returns data to the script
to enable more intelligent call routing.

The HDX commands operate in one of two modes:


„ In the first mode, data is sent from the script to the host without waiting for
a response. This is the simplest mode.
„ In the second mode, data is sent to the host and the script expects a response
from the host. The script waits for the response. In this mode there is a
potential for degradation of contact center operation due to the performance
of the host application.

When using HDX commands, you must take traffic engineering into
consideration. Every call accessing a script containing HDX commands is
affected by:
„ application response time—A slow third-party application response time
can slow down all contact processing in Contact Center Manager.
„ application design—Databases may need special indexing and
optimization to handle a high number of requests at the same time. For
example, if the application can only handle one request at a time, and each
request takes 4 seconds to process, the script can handle a maximum of 900
calls per hour.
„ LAN interference—This can include backup and restore procedures and
large file transfers.

328 Contact Center Manager


December 2007 Host Data Exchange commands

Contact Center Manager Release 6.0 also supports the following new call
variable types for HDX:
„ Agent ID
„ Skillset Name

Using the skillset call variable, a valid Skillset Name can be passed only by the
HDX application. Therefore, no flexibility or ambiguity exists about what can
be passed to the HDX application in the SEND REQUEST/SEND INFO
commands.

The command GET RESPONSE with a parameter of type skillset expects a


Skillset Name to be returned in that parameter. However, it is not enforced in
any way and, in particular, no translation is performed between a skillset name
and the associated Skillset Name. Translation between the Skillset Name and
skillset name can be performed using the CORBA control interface to Real-time
Statistics Multicast (RSM).

Only the Skillset Name numbers is passed back and forth to HDX, and the
responsibility is with the application developer to operate within this constraint.

Provider ID
Each HDX application must have a unique ID that identifies it to Contact Center
Manager. No two applications at the same site can have the same provider ID.
This unique ID is the ID that the HDX application passes to the server in
attempts to register with the server software. The developer of the HDX
application chooses the provider ID for the application.

You must specify the provider ID when you configure the HDX application in
your system. The script writers must also know the ID, so that they can include it
in the scripts.

The default provider ID for IVR CTI applications is 1.

HDX supports a maximum of 10 provider applications.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 329


Host Data Exchange commands Standard 8.05

Call ID
Every call that enters Contact Center Manager has a call ID associated with it.
The call ID is sent automatically with every SEND INFO or SEND REQUEST
command. You, or your company application developer, can use the call ID to
show information about the call (such as skillset or call entered data) in a screen
pop on the agents’ desktops. For more information, see the Host Data Exchange
API Programmer’s Guide.

Using intrinsics and variables in HDX commands


HDX commands pass data from the script to the host and receive data from the
host to the script. Data passed from the script to the host can be an intrinsic or a
variable, or both. Both call and global variables can be sent to the host; however,
not all intrinsics and data types are supported as HDX command parameters.
Data received by the script from the host is received only into call variables.
Using invalid data types results in script compilation failure. The Provider ID
can be a call or global variable of type Integer.

The following variable types are supported as parameters in HDX commands:


„ Integer
„ String
„ CDN
„ DN
„ CLID
„ DNIS
„ ACD
„ LOC
„ NPA
„ NPANXX
„ NXX
„ Agent ID
„ Skillset

330 Contact Center Manager


December 2007 Host Data Exchange commands

Internally, all data types in the HDX are strings. When passed from the script to
the HDX, non-string types are converted to their string representation. For
example, when a skillset call variable assigned in the script with the skillset
SALES is passed to the HDX, it is represented in the HDX as the string SALES
rather than its Skillset Name. When the script receives a skillset from a host
application, the host must pass it as a valid string representation of the skillset.
The string representation of the skillset is converted back to the skillset for use
with the script for queuing.

Example
The following section of script sends a call DNIS number to a third-party
application and then receives the preferred skillset for that customer. The first
line of the script assigns a skillset-type variable named skillset_cv a default
value of sales_sk. Then the script sends the customer’s DNIS number to the
third-party application. The third-party application uses this information to
retrieve the preferred skillset for the customer. The script receives the preferred
skillset information, which is represented by a skillset.
ASSIGN sales_sk TO skillset_cv
SEND REQUEST app_ID DNIS
GET RESPONSE app_ID skillset_cv
IF NOT OUT OF SERVICE skillset_cv THEN
QUEUE TO SKILLSET skillset_cv
WAIT 2
ELSE
GIVE RAN nite_ran
DISCONNECT
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 331


Host Data Exchange commands Standard 8.05

SEND INFO

Use the SEND INFO command to send data to and start a third-party
application, such as a screen-pop application. You must use the SEND
REQUEST and GET RESPONSE commands to request and receive
information.

Script syntax
SEND INFO <provider_ID> [<variable> | <list_of_variables>]

A comma is not used between the application ID and the first variable, but
commas are mandatory between the variables (additional spaces are optional).

Parameters
Enter information for the following parameters:
„ <provider_ID> The identifier that the HDX application uses to register
with Contact Center Manager. Replace this parameter with an integer type
variable.
„ <variable> or <list_of_variables> The variable, or list of variables (up to
10), that contains the data you want to send to the third-party application.
Lists of variables are single variable values separated by commas. For a list
of variable types that you can use with this command, see “Using intrinsics
and variables in HDX commands” on page 330.

Restrictions
Do not insert the GIVE BUSY or GIVE OVERFLOW command immediately
after the SEND INFO command.

332 Contact Center Manager


December 2007 Host Data Exchange commands

Example
In this example, calls entering CDN number 5553750 initiate a request to a
third-party application (such as a database) for the call priority. After the priority
is returned, the call is queued to the skillset customer_service_sk with that
priority.

If a call enters any other CDN, the CDN number is sent to the third-party
application and the call is queued to skillset general_information_sk.
WHERE CDN EQUALS
VALUE 5553750:
SEND REQUEST app_ID CDN, CLID
GET RESPONSE app_ID priority_cv
QUEUE TO SKILLSET customer_service_sk WITH PRIORITY
priority_cv
WAIT 2
DEFAULT:
SEND INFO app_ID CDN
QUEUE TO SKILLSET general_information_sk
WAIT 2
END WHERE
GIVE RAN agents_busy_ran_gv
GIVE MUSIC soft_music_gv

Scripting Guide for Communication Server 1000/Meridian 1 PBX 333


Host Data Exchange commands Standard 8.05

SEND REQUEST

Use the SEND REQUEST command to request specific data from a third-party
application. Call and global variables are used in this command to identify the
data that you are requesting from the host. These variables are read-only; that is,
the host application cannot change their value.

The SEND REQUEST command must always be followed by a GET


RESPONSE command. Only comments can separate these commands in the
script.

Script syntax
SEND REQUEST <provider_ID> [<variable> | <list_of_variables>]

A comma is not used between the application ID and the first variable, but
commas are mandatory between the variables (additional spaces are optional).

Parameters
Enter information for the following parameters:
„ <provider_ID> The identifier that the HDX application uses to register
with Contact Center Manager. Replace this parameter with an Integer type
variable.
„ <variable> or <list_of_variables> The variable, or list of variables (up to
10), that contains the data that you are requesting from the third-party
application. For a list of variable types that you can use with this command,
see “Using intrinsics and variables in HDX commands” on page 330.

334 Contact Center Manager


December 2007 Host Data Exchange commands

Restrictions
Do not insert the GIVE BUSY or GIVE OVERFLOW command immediately
after the SEND REQUEST command.

Example
The following section of script sends a call CLID to a third-party application,
and then receives the preferred banker for that customer. The first line of the
script assigns a default value of 12345 to the variable named
personal_banker_cv. Then the SEND REQUEST command sends the
customer’s CLID to the third-party application.

The GET RESPONSE command retrieves the preferred banker for the customer
from the third-party application. The default value of the variable
personal_banker_cv is replaced with the value retrieved from the third-party
application.

If the value retrieved from the third-party application is returned within


2 seconds, the call is presented to the appropriate agent. Otherwise, the call is
queued to the sales skillset.

When you replace a specific agent with an agent variable, you do not need to
modify any scripts if the agent leaves the contact center and is replaced by
another agent.
ASSIGN 12345 TO personal_banker_cv
SEND REQUEST app_ID CLID
GET RESPONSE app_ID TIMER 2 personal_banker_cv
IF NOT LOGGED OUT AGENT personal_banker_cv THEN
QUEUE TO AGENT personal_banker_cv
WAIT 2
ELSE
QUEUE TO SKILLSET sales_sk
WAIT 2
END IF
GIVE RAN agent_busy_ran_gv
GIVE MUSIC soft_music_gv

Scripting Guide for Communication Server 1000/Meridian 1 PBX 335


Host Data Exchange commands Standard 8.05

GET RESPONSE

Use the GET RESPONSE command to obtain the response from the SEND
REQUEST command previously sent to a third-party application. SEND
REQUEST must be the previous command in the script. Script validation fails if
the command is not preceded by a SEND REQUEST command.

You can specify one or more call variables in which to store the data in the
response message.

All variables to be returned from a third-party application using the GET


RESPONSE command must have their initial value set to a default value. The
value returned replaces the default value.

Script syntax
GET RESPONSE <provider_ID> {TIMER <timer>} [<variable> |
<list_of_variables>]

A comma is not used between the application ID and the first variable, but
commas are mandatory between the variables (additional spaces are optional).

Optional
The TIMER segment is optional. The default value is 10 seconds.

Parameters
Enter information for the following parameters:
„ <provider_ID> The identifier that the HDX application uses to register
with Contact Center Manager. Replace this parameter with an Integer type
variable.
„ <timer> The maximum amount of time, in seconds, to wait for a response.
Specify an amount of time between 0 and 65535 seconds.

336 Contact Center Manager


December 2007 Host Data Exchange commands

„ <variable> or <list_of_variables> The call variable, or list of variables (up


to 10), in which you want to store the data received from the third-party
application. For a list of variable types that you can use with this command,
see “Using intrinsics and variables in HDX commands” on page 330.

Do not use global variables in the variable list—only call variables are allowed.
However, you can use either global or call variables for the application_ID and
the timer.

TIMER option
You can specify the duration to wait for a response from the host, to a maximum
of 65535 seconds. If the server does not receive a response in the specified time,
the command fails and is stopped.

If you do not specify a timer, the default of 10 seconds is used.

The only way to detect that the timer expired in the script is to initialize the call
variables with specific values (using the ASSIGN TO command), and test them
after the GET RESPONSE command to see if they changed.

Example
The following section of script sends a call CLID to a third-party application,
and then receives the preferred skillset for that customer. The first line of the
script initializes the variable named pref_skillset_cv. Then the SEND
REQUEST command sends the customer’s CLID to the third-party application.

The GET RESPONSE command retrieves the preferred skillset for the customer
from the third-party application and replaces the value initially assigned to the
variable pref_skillset_cv with the value retrieved from the third-party
application.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 337


Host Data Exchange commands Standard 8.05

If the value retrieved from the third-party application is returned within


10 seconds, the call is queued to the appropriate skillset.
ASSIGN Sales_sk TO pref_skillset_cv
/* initialize the call variable in case of failed response */
SEND REQUEST ivr_hdxID pref_skillset_gv
GET RESPONSE ivr_hdxID pref_skillset_cv
QUEUE TO SKILLSET pref_skillset_cv
WAIT 2
GIVE RAN agents_bsy_ran
GIVE MUSIC soft_music
QUIT

338 Contact Center Manager


December 2007 Host Data Exchange commands

Database Integration Wizard

Contact Center Manager includes a feature called Database Integration Wizard


(DIW). The wizard provides generic database lookup and call-data attachment
without programming.

The Database Integration Wizard:


„ is used to modify the database access and call data attachment without a
software change
„ is delivered as a Windows service and is fully integrated using Contact
Center Manager 6.0 design and architecture principles
„ provides a simple and intuitive graphical user interface for configuration
with validated data entry and test tools

See the Contact Center - Manager Database Integration User Guide for detailed
information about the Database Integration Wizard.

Host Data Exchange


Use Host Data Exchange to exchange data between the script and the database.
Host Data Exchange commands in the call processing script pass information to
the Host Application Integration (HAI) service using a provider ID specified
using the Configuration Wizard:
„ use SEND REQUEST/GET RESPONSE for database access
„ use SEND INFO for TAPI call data attachment and other third-party
applications

SEND REQUEST
The first parameter of the SEND REQUEST command functions as an index for
a list of SQL scripts that you write using the Configuration Wizard. The
remaining parameters of the SEND REQUEST command populate the unknown
parameters of the SQL statement (up to nine parameters can be passed).

Scripting Guide for Communication Server 1000/Meridian 1 PBX 339


Host Data Exchange commands Standard 8.05

Syntax example:
ASSIGN 4 TO HAI_SQLNO_cv /* sql index integer value */
ASSIGN "FAILURE" TO HAI_SQLRESP_cv /* status value string*/
SEND REQUEST HAI_AppId HAI_SQLNO_cv, CLID
GET RESPONSE HAI_AppId HAI_SQLRESP_cv, HAI_AGENTID_cv
The status of the execution of the SQL statement is passed back to the Contact
Center Manager script in the first parameter of the GET RESPONSE command.
The statuses are
„ SUCCESS—The SQL statement was executed without error.
„ FAILURE—The SQL statement execution failed. Consult trace files
(especially ODBC) for further information.
„ NODATA—The SQL statement is SELECT; however, no data was returned
from the statement execution.

The first parameter (string type) is reserved for status reporting of SQL
execution. Where the SQL statement generates data (SELECT), the data is
passed into the remaining parameters (up to nine).

Example: DIW script


/* The script example sends the CLID of the call to the database
which then performs a lookup and if successful sends the preferred
agent id back to the script. If there is a failure or no data then
a message is logged to the event log and the call is queued to the
skillset instead */
GIVE RINGBACK
WAIT 2
ASSIGN 4 TO HAI_SQLNO_cv /* sql index integer value */
ASSIGN "FAILURE" TO HAI_SQLRESP_cv /* status value string*/
SEND REQUEST HAI_AppId HAI_SQLNO_cv, CLID
GET RESPONSE HAI_AppId HAI_SQLRESP_cv, HAI_AGENTID_cv
WHERE HAI_SQLRESP_cv EQUALS
VALUE "FAILURE":
LOG "Unable to access Host"
QUEUE TO SKILLSET sales_sk

340 Contact Center Manager


December 2007 Host Data Exchange commands

WAIT 2
VALUE "NODATA":
LOG "No data available from Host"
QUEUE TO SKILLSET sales_sk
WAIT 2
VALUE "SUCCESS":
QUEUE TO AGENT HAI_AGENTID_cv
WAIT 2
END WHERE

TAPI Call Data attachment


Use TAPI Call Data attachment to attach script and call data to a call, and pass
that information to a TAPI server. The first data parameter of the SEND INFO
command is interrogated. If the text in the parameter is %TAPI%, then the data
in the remaining parameters is sent to TAPI. The parameters of the SEND INFO
command are attached to a call using the published TAPI IVR/CallData
interface.

Example of script syntax


ASSIGN "%TAPI%" TO HAI_STRING_cv
SEND INFO HAI_AppId HAI_STRING_cv, CLID, HAI_AGENTID_cv

The preceding example sends the CLID and the agent ID to the TAPI
application.

SEND INFO command and database access


The SEND INFO command can update a database while attaching data to a call.

The first data parameter of the SEND INFO command is interrogated. If the text
in the parameter is %TAPI%, the data in the remaining parameters is sent to
TAPI. Otherwise, the SEND INFO command is assumed to be for database
access and the information in the first parameter is used to identify the SQL
statement number.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 341


Host Data Exchange commands Standard 8.05

Example for database access


EVENT HANDLER
EVENT CALL ABANDON: ASSIGN "abandon" TO string_cv
SEND INFO HAI_AppId, HAI_SQLNO_cv, CLID, abandon_cv
END HANDLER

SEND INFO can also be used to attach TAPI data to a call based upon the
assumption that SEND INFO otherwise operates like SEND REQUEST.

The first data parameter of the SEND INFO command is interrogated. If the text
in the parameter is %TAPI%, then the data in the remaining parameters is sent to
TAPI. The parameters of the SEND INFO command are attached to a call using
the published TAPI IVR/CallData interface.

Example of script syntax


ASSIGN 5005 TO HAI_AppId
ASSIGN "%TAPI%" TO HAI_STRING_cv
SEND INFO HAI_AppId HAI_STRING_cv, CLID

Skillset call variables


With the skillset call variable, you can have a valid Skillset Name only for a call
variable of type skillset. Therefore, no flexibility or ambiguity exists about what
can be passed to the HDX application in the SEND REQUEST and SEND INFO
commands.

The GET RESPONSE command with a parameter of type SKILLSET expects a


Skillset Name to be returned in that parameter. However, the command is not
enforced and no translation is performed between a skillset name and the
associated Skillset Name. Translation between the Skillset Name and skillset
names can be performed using the CORBA control interface to RSM.

Only the raw Skillset Name numbers are sent between the switch and the HDX
and the responsibility is with the application developer to operate within this
constraint. The Skillset Name can be retrieved from the Skillset Configuration
Database view, accessible through programs such as Crystal Reports, Microsoft
Access or Report Creation Wizard, to see the link between the Skillset Name
and the Skillset Name that was assigned by the system.

342 Contact Center Manager


Chapter 11

Intrinsics

In this chapter
Overview 344
Examples of intrinsics use 347
Section A: Skillset intrinsics 349
Section B: Time intrinsics 393
Section C: Traffic intrinsics 405
Section D: Call intrinsics 411
Section E: Open Queue Intrinsics 441

Scripting Guide for Communication Server 1000/Meridian 1 PBX 343


Intrinsics Standard 8.05

Overview

Intrinsics contain system-wide information about skillsets, agents, time, traffic,


and call type. You can use intrinsics in your scripts to access system information.
The script then uses this information in formulas and decision-making
statements.

Contact Center Manager creates and maintains intrinsics automatically.


Intrinsics are available only to query data about the system within scripts, not to
modify data. Any script can use information from intrinsics throughout the
system.

Types of intrinsics
There are four types of intrinsics described in this chapter:
„ Section A: “Skillset intrinsics,” on page 349 describes the intrinsics that are
based on information about skillsets or agents.
„ Section B: “Time intrinsics,” on page 393 describes the intrinsics that are
based on system time information, including the time of day, day of week,
and day of year.
„ Section C: “Traffic intrinsics,” on page 405 describes the intrinsics that are
based on the system traffic level information.
„ Section D: “Call intrinsics,” on page 411 describes the intrinsics that are
specific to each call (for example, the CLID).
„ Section E: “Open Queue Intrinsics,” on page 441 describes the intrinsics
that are specific to multimedia processing.

344 Contact Center Manager


December 2007 Intrinsics

Return value
The data that an intrinsic gathers from the system and inserts into the script is
referred to as the return value of the intrinsic. For example, the following section
of a script instructs the system to queue calls to the support skillset if the number
of agents in the service skillset (LOGGED AGENT COUNT) is less than five:
IF (LOGGED AGENT COUNT service_sk < 5) THEN
QUEUE TO SKILLSET support_sk
END IF

If, at 2:00 p.m., three agents from the service skillset are logged on, then the
return value for the intrinsic is 3. Therefore, incoming calls are queued to the
support skillset. Suppose later, at 3:30 p.m., nine agents from the service skillset
are logged on. Now, the return value for the intrinsic is 9, and calls are not
queued to the support skillset.

Intrinsic returns no value


If an intrinsic cannot return a valid value, it may return no value at all. For
example, in the following statement:
QUEUE TO AGENT LONGEST IDLE AGENT service_sk, general_sales_sk

If all agents in the service_sk and general_sales_sk skillsets are busy on active
calls or are in Not Ready mode, then the intrinsic LONGEST IDLE AGENT
does not return a value. As a result, Contact Center Manager cannot queue the
call to an agent.

To prevent the call from being queued to the default skillset, ensure that the call
is queued before the end of the script.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 345


Intrinsics Standard 8.05

Example
In this example, the script attempts to queue the call to the agent who is idle the
longest in either the service_sk or the general_sales_sk skillset. If, after 2
seconds, the call is not queued, it is queued to a third skillset named
backup_skillset_sk.
QUEUE TO AGENT LONGEST IDLE AGENT service_sk, general_sales_sk
WAIT 2
IF NOT QUEUED THEN
QUEUE TO SKILLSET backup_skillset_sk
WAIT 2
END IF

346 Contact Center Manager


December 2007 Intrinsics

Examples of intrinsics use

This section provides examples of how you can use intrinsics in your scripts for
voice and multimedia contacts.

Decision making within a script based on skillset intrinsics


This script checks whether the number of idle agents in the service skillset is
greater than the number of idle agents in the support skillset. If the service
skillset has more idle agents, the contact is queued to the service skillset.
Otherwise, the contact is queued to the support skillset.
IF (IDLE AGENT COUNT service_sk > IDLE AGENT COUNT support_sk)
THEN
QUEUE TO SKILLSET service_sk
WAIT 2
ELSE
QUEUE TO SKILLSET support_sk
WAIT 2
END IF

Decision making within a script based on time intrinsics


This script first checks whether the time of day is between 05:00 p.m. and
08:00 a.m. and that the day of the week is not Saturday or Sunday. If all of these
conditions are true, then the Night_Section statement is executed.
IF (TIME OF DAY = dinner_hour_gv)
AND (DAY OF WEEK < > SATURDAY, SUNDAY)THEN
EXECUTE Night_Section
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 347


Intrinsics Standard 8.05

Decision making within a script based on traffic intrinsics


This script checks to see if the number of voice contacts in the system is greater
than 50. If it is greater, the caller hears a busy tone.
IF (TOTAL ACTIVE CALLS > 50) THEN
GIVE BUSY
END IF

If Open Queue is enabled then the TOTAL ACTIVE CALLS is the total number
of calls and Open Queue contacts in the system. In this scenario there is
potential for a large number of contacts to be waiting in the system relative to
what normally would be expected for telephony. Therefore, use TOTAL
ACTIVE CALLS with caution in an Open Queue enabled system.

Decision making within a script based on call intrinsics


This script checks to see if the CLID of the voice contact is 416-555-1212. If it
is, then the contact is queued to the skillset gold_skills_sk. Otherwise, the
contact is queued to the skillset general_skills_sk.
IF (CLID = 4165551212) THEN
QUEUE TO SKILLSET gold_skills_sk
WAIT 2
ELSE
QUEUE TO SKILLSET general_skills_sk
WAIT 2
END IF

348 Contact Center Manager


December 2007 Intrinsics

Section A: Skillset intrinsics

In this section
Overview of skillset intrinsics 350
ANSWERED COUNT 355
AVERAGE SPEED ANSWER 357
EXPECTED WAIT TIME 360
IDLE AGENT 365
IDLE AGENT COUNT 367
LOGGED AGENT COUNT 369
LOGGED OUT AGENT 371
LONGEST IDLE AGENT 373
MOST LOGGED AGENTS 375
OLDEST 378
OUT OF SERVICE 380
POSITION IN QUEUE 383
PRIORITY IN QUEUE 385
PRIORITY IN NETWORK QUEUE 388
QUEUED COUNT 390

Scripting Guide for Communication Server 1000/Meridian 1 PBX 349


Intrinsics Standard 8.05

Overview of skillset intrinsics

Skillset intrinsic elements are based on information about skillsets. The returned
value from the intrinsic can then be used in queuing commands, conditional
commands, and so on. Skillset intrinsics return skillsets, integer values, and
agent IDs.

Using lists of skillsets and agents


You can enter a single skillset or agent ID, or a list of skillsets or agent IDs, for
many intrinsics. If you use lists, be sure to follow these rules:
„ List entries must be separated with commas.
„ Lists of skillsets cannot contain more than 20 skillsets.
„ Lists of agent IDs cannot contain more than 20 agent IDs.
„ A contact can be queued to a total of 20 agents and skillsets. That is, you
cannot queue a contact to both 20 skillsets and 20 agents.

Default values for errors


If the intrinsic value cannot be calculated due to an error condition (for example,
the skillset does not exist), a default value is returned so that script execution can
continue. The following table shows the default value for skillset return types.

Return type Default value

Integer 0

Boolean (True or False) False


Skillset Skillset ID = 0

350 Contact Center Manager


December 2007 Intrinsics

Skillset intrinsics and networking


For any intrinsic that accepts skillsets as a parameter, the skillset can be either
network or local.

For most skillset intrinsics, a network skillset call uses the values of the local
skillset intrinsics. The return value indicates information about the local skillset
queue and incoming network contacts from another network site, as well as
locally queued contacts (through QUEUE TO SKILLSET).

If you select the include source option for the network skillset, the skillset
intrinsic still contains the same value as if you issued the QUEUE TO
SKILLSET command. Thus, if the network skillset is staffed locally, then the
value includes contacts queued locally through the QUEUE TO NETWORK
SKILLSET command and any network contacts arriving at this node from
another network site.

If you do not select the include source option for the network skillset, the value
includes only contacts queued locally through the QUEUE TO SKILLSET
command and any network contacts arriving at this node from another network
site. It does not include outgoing network contacts that are queued through the
QUEUE TO NETWORK SKILLSET command.

The following skillset intrinsic values are based on the total contacts that are
answered in the local skillset queue in the last 10 minutes:
„ ANSWERED COUNT
„ AVERAGE SPEED ANSWER
„ EXPECTED WAIT TIME

The preceding skillset intrinsic values include contacts queued locally through
the QUEUE TO SKILLSET command and through the “include local node”
option set for the skillset, as well as network contacts arriving at this node from
another network site.

The preceding skillset intrinsic values do not include outgoing network contacts
that are queued through the QUEUE TO NETWORK SKILLSET command or
when the include local node option is not selected for the skillset (that is, when
you exclude the local node).

Scripting Guide for Communication Server 1000/Meridian 1 PBX 351


Intrinsics Standard 8.05

The following intrinsics do not include the agents at other nodes:


„ IDLE AGENT COUNT
„ MOST LOGGED AGENTS
„ LOGGED AGENT COUNT
„ LONGEST IDLE AGENT
„ LOGGED OUT AGENT
„ OUT OF SERVICE

The following intrinsic values include local contacts and incoming network
contacts queued in the given skillsets at this node; they do not consider contacts
at other network nodes:
„ OLDEST
„ POSITION IN QUEUE
„ QUEUED COUNT

The network contact data that is passed when a contact is queued across the
network (QUEUE TO NETWORK SKILLSET) consists of the contact
application ID on the source node, CLID information, DNIS information, age of
the contact, network skillset ID, and priority. Call variables associated with the
contact are not passed to the destination node.

352 Contact Center Manager


December 2007 Intrinsics

Skillset intrinsics and the impact of Include Local Node


If the Include Local Node option is selected for the skillset and the QUEUE TO
NETWORK SKILLSET command is used, then all previous supported checks
remain valid to ensure total control and consistency.

The following table shows what skillset the intrinsic checks—local or remote—
when the Include Local Node option is selected:

Intrinsic Local node Remote node

QUEUED X X
OUT OF SERVICE X

PRIORITY IN QUEUE X

PRIORITY IN NETWORK X
QUEUE
REMOVE FROM SKILLSET X

REMOVE FROM X
NETWORK SKILLSET
CHANGE PRIORITY IN X
SKILLSET

CHANGE PRIORITY IN X
NETWORK SKILLSET

Skillset intrinsics and multimedia contacts


Contact data from Contact Center Multimedia, such as preferred skillset, agent,
and priority, is passed into the Contact Center Manager Server Call Routing
Script. Use the data sent in the contact because the administrator assigns specific
skillsets to outbound campaigns, or e-mail. Use great care in making routing
modifications because they may impact the business objectives of the contact
center.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 353


Intrinsics Standard 8.05

Use the DISCONNECT command with care because the multimedia contact is
resent by Contact Center Multimedia to Contact Center Manager Server to be
requeued. Resending the contact forces Contact Center Manager Server to peg
the contact twice and resets the age of the contact.

354 Contact Center Manager


December 2007 Intrinsics

ANSWERED COUNT

The ANSWERED COUNT intrinsic is the total number of incoming contacts


answered during the preceding 10 minutes (see “How data is collected,” on page
355). This intrinsic applies to both voice and multimedia contacts.

If you specify a list of skillsets, then the sum of answered contact counts for the
skillsets is returned.

ANSWERED CALL COUNT is still supported.

Script syntax
ANSWERED COUNT [<skillset> | <skillset_list>]

Parameter
Enter information for the following parameter:
„ <skillset> or <skillset_list> The skillset, or list of skillsets, that you want
to include in the return value.

Return type
This intrinsic returns an integer to the script.

How data is collected


Data is collected from the system at 10-minute intervals for this intrinsic to
ensure that burst-rate call traffic is reflected in the result. This process also
ensures that steady call traffic is reflected because steady traffic is the same for
longer time periods as it is for the given 10-minute interval.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 355


Intrinsics Standard 8.05

Examples

Example 1
In this example, if the number of answered calls for the service skillset is less
than that of the support skillset, then incoming calls are queued to the service
skillset. Otherwise, calls are queued to the support skillset. If the call is not
answered immediately, the caller hears a message indicating that all agents are
busy, followed by music.
IF (ANSWERED COUNT service_sk < ANSWERED CALL COUNT support_sk)
THEN
QUEUE TO SKILLSET service_sk
ELSE
QUEUE TO SKILLSET support_sk
END IF
WAIT 2
GIVE RAN agents_busy_ran_gv
GIVE MUSIC pop_music_gv
SECTION WaitLoop

Example 2
In this multimedia example, if the number of answered contacts for the e-mail
skillset sent in the contact data is greater than that of the Promo2 e-mail skillset,
then incoming contacts are queued to the Promo2 e-mail skillset. Otherwise,
contacts are queued to the e-mail skillset sent in the contact data.
ASSIGN CONTACT DATA "%SKILLSET%SKILLSET" TO skillset_cv
IF (ANSWERED COUNT skillset_cv > ANSWERED COUNT EM_Promo2_sk THEN
ASSIGN EM_Promo2_sk TO skillset_cv
END IF
QUEUE TO SKILLSET skillset_cv
WAIT 2
SECTION WaitLoop

356 Contact Center Manager


December 2007 Intrinsics

AVERAGE SPEED ANSWER

The AVERAGE SPEED ANSWER is the calculated average speed of contact


answering in the given priority coming into the system. This data is based on the
same calculations as the real-time supervisor data displays using the real-time
moving window time frame of 10 minutes. This intrinsic applies to both voice
and multimedia contacts.

If you specify a list of skillsets, then the minimum AVERAGE SPEED


ANSWER for the list of skillsets is returned. If you omit the WITH PRIORITY
segment, then the return value includes calls of all priorities.

Script syntax
AVERAGE SPEED ANSWER [<skillset> | <skillset_list>] {WITH CALL
PRIORITY <priority>}

Optional
The WITH CALL PRIORITY segment is optional.

Parameters
Enter information for the following parameters:
„ <skillset> or <skillset_list> The skillset, or list of skillsets, that you want
to include in the return value.
„ <priority> The priority of the calls that you want to track.

Return type
This intrinsic returns a value, in seconds, to the script.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 357


Intrinsics Standard 8.05

How data is collected


Data is collected from the system at 10-minute intervals for this intrinsic to
ensure that burst-rate call traffic is reflected in the results. This process also
ensures that steady call traffic is reflected because steady traffic is the same for
longer time periods as it is for the given 10-minute interval.

Examples

Example 1
In this example, if calls are answered more quickly, on average, by the service
skillset than by the support skillset, then incoming calls are queued to the service
skillset. Otherwise, calls are queued to the support skillset. If the call is not
answered immediately, the caller hears a message indicating that all agents are
busy, followed by music.
IF (AVERAGE SPEED ANSWER service_sk < AVERAGE SPEED ANSWER
support_sk) THEN
QUEUE TO SKILLSET service_sk
ELSE
QUEUE TO SKILLSET support_sk
END IF
WAIT 2
GIVE RAN agents_busy_ran_gv
GIVE MUSIC pop_music_gv
SECTION WaitLoop

Example 2
In this multimedia example, if contacts are answered less quickly, on average,
for the e-mail skillset sent in the contact data than for the Promo2 e-mail skillset,
then incoming contacts are queued to the Promo2 e-mail skillset. Otherwise,
contacts are queued to the e-mail skillset sent in the contact data.
ASSIGN CONTACT DATA "%SKILLSET%SKILLSET" TO skillset_cv
IF (AVERAGE SPEED ANSWER skillset_cv > AVERAGE SPEED ANSWER
EM_Promo2_sk THEN
ASSIGN EM_Promo2_sk TO skillset_cv

358 Contact Center Manager


December 2007 Intrinsics

END IF
QUEUE TO SKILLSET skillset_cv
WAIT 2
SECTION WaitLoop

Scripting Guide for Communication Server 1000/Meridian 1 PBX 359


Intrinsics Standard 8.05

EXPECTED WAIT TIME

The EXPECTED WAIT TIME is the predicted wait time of the current contact
in the given skillset at the moment the intrinsic is executed. This value can
change over time, depending on contact traffic. This intrinsic is calculated by the
contact processing executor using real-time data. If the contact is not yet in the
skillset indicated, an average expected wait time for the skillset is returned.

If you specify a skillset list, then the returned value is the minimum EXPECTED
WAIT TIME of all the skillsets.

The purpose of the EXPECTED WAIT TIME intrinsic is to estimate, based on


historical information, how long it can take for the current contact to be
answered by a particular skillset. This information can then be used to announce
to the contact how long the wait can be before being answered, or it can provide
a different treatment to the contact. This intrinsic applies to both voice and
multimedia contacts.

Tip: Use this intrinsic to play the expected wait time to voice contacts only if the
wait is unusually long for your contact center. For example, if the normal wait
time for your contact center is 2 minutes, but a burst of traffic increased the wait
time to 5 minutes, use this intrinsic to warn voice contacts of the long wait. Give
the caller options at this point (for example, the choice of leaving a message or
continuing to wait).

Script syntax
EXPECTED WAIT TIME [<skillset> | <skillset_list>]

Parameter
Enter information for the following parameter:
„ <skillset> or <skillset_list> The skillset, or list of skillsets, that you want
to include in the return value.

360 Contact Center Manager


December 2007 Intrinsics

Return type
This intrinsic returns a value, in seconds, to the script.

Conditions that increase the wait time


The EXPECTED WAIT TIME can become longer as a contact waits, which
means that there is no guarantee that the contact waits no longer than the
announced wait time. Extending the expected wait time can occur due to any of
the following conditions:
„ Voice contacts with different priorities are queued to any given skillset.
Thus, new incoming contacts of higher priority are inserted in a queue in
front of contacts of lower priority. A new, lower-priority contact may
initially hear that the wait time is 40 seconds and, a minute later, can be
advised that the wait time is now 5 minutes.
„ A burst of traffic can come into the system (including a contact that is of
higher priority) after the first wait time is given, which increases the
contact’s wait time.
„ Agents servicing the queue can log off (to have lunch, for example) and
substantially change the expected wait time for the contacts that came into
the queue before they logged off. If the number of agents in the skillset
queue is not used in the algorithm, this situation takes several sample
periods to filter through to an adjusted expected wait time.

Nortel recommends that you use only the EXPECTED WAIT TIME intrinsic in
single-priority systems to avoid these conditions.

ATTENTION
Because the expected wait time can increase while a caller
waits, play the expected wait time to callers once.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 361


Intrinsics Standard 8.05

Formulas

Default EXPECTED WAIT TIME when not queued


Contact Center Manager provides a default system calculation for the
EXPECTED WAIT TIME (EWT) intrinsic. The EXPECTED WAIT TIME is
based on the AVERAGE SPEED ANSWER (ASA) of calls in the skillset and
the current call load for the skillset. The call load factor is included because the
ASA is calculated at a given answered count and increases or decreases in
proportion to the current queued count.

EWT (skillset) = ASA * Call Load

where

Call Load = QUEUED COUNT (skillset)/ANSWERED COUNT (skillset)

Default EXPECTED WAIT TIME when queued


If the call is queued, the calculation is further refined to take into account the
current position of the call in the queue. Refining the calculation better estimates
the time remaining in a queue for the call. For this calculation, only queued call
statistics are used.

EWT (call, skillset) = ASA Waiting Calls * Queued Call Load * POSITION IN
QUEUE Factor

where

ASA Waiting Calls = Total Call Time Delay (skillset)/Queued ANSWERED


COUNT (skillset)

Queued Call Load = QUEUED COUNT (skillset)/Queued ANSWERED


COUNT (skillset)

POSITION IN QUEUE Factor = POSITION IN QUEUE (call, skillset)/


QUEUED COUNT (skillset)

Customized formulas
If you do not want to use the default formula to estimate EXPECTED WAIT
TIME, you can use intrinsics to build a custom formula. For example, create the
following custom formula:

362 Contact Center Manager


December 2007 Intrinsics

EWT = (QUEUED COUNT* Talk Time)/LOGGED AGENT COUNT

with Talk Time being an estimated constant for the contact center.

Whether you use the default formula or a custom formula, the value can be
stored as a variable and played to the voice contact through an interactive voice
session (available with integrated voice processing engines only).

Examples

Example 1
In the following voice example, the contact is first queued to the sales skillset. If
the EXPECTED WAIT TIME for the contact is greater than 4 minutes, the caller
hears a recorded announcement stating that a long wait is expected. If the
EXPECTED WAIT TIME is greater than 1 minute but less than 4 minutes, the
recorded announcement indicates an average wait time. An EXPECTED WAIT
TIME less than 1 minute uses a short wait announcement.
QUEUE TO SKILLSET sales_sk
WAIT 4
ASSIGN EXPECTED WAIT TIME sales_sk TO exp_wait_cv
IF (exp_wait_cv > 240) THEN
GIVE RAN long_wait_ran_gv
ELSE
IF (exp_wait_cv > 60) THEN
GIVE RAN average_wait_ran_gv
ELSE
GIVE RAN short_wait_ran_gv
END IF
END IF

Example 2
In this multimedia example, if the expected wait time for the e-mail skillset sent
in the contact data is greater than 3600 seconds, then incoming contacts are
queued to the Promo2 e-mail skillset. Otherwise, contacts are queued to the e-
mail skillset sent in the contact data.
ASSIGN CONTACT DATA "%SKILLSET%SKILLSET" TO skillset_cv

Scripting Guide for Communication Server 1000/Meridian 1 PBX 363


Intrinsics Standard 8.05

ASSIGN Promo2 e-mail TO backup_skillset_cv


ASSIGN EXPECTED WAIT TIME skillset_cv TO exp_wait_cv
IF (exp_wait_cv < 3600) THEN
QUEUE TO SKILLSET skillset_cv
WAIT 2
ELSE
QUEUE TO SKILLSET backup_skillset_cv
WAIT 2
END IF
SECTION WaitLoop

364 Contact Center Manager


December 2007 Intrinsics

IDLE AGENT

Use this intrinsic to check whether the specified agent is currently idle. If the
agent is idle, the value returned is True. Otherwise, the value returned is False.

This intrinsic applies to both voice and multimedia contacts.

Script syntax
IDLE AGENT <agent_ID>

Parameter
Enter information for the following parameter:
„ <agent_ID> The logon ID of the agent that you want to track.

Return type
This intrinsic returns a True or False value to the script.

Examples

Example 1
In this example, if the agent represented by the agent variable agent_4 is idle and
available, the call goes to that agent. Otherwise, the call is queued to the sales
skillset.
IF IDLE AGENT agent_4 THEN
QUEUE TO AGENT agent_4
WAIT 2
ELSE
QUEUE TO SKILLSET sales_sk
WAIT 2
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 365


Intrinsics Standard 8.05

Example 2
In this multimedia example, if the preferred agent sent in the contact data is idle
and available, the contact goes to that agent. Otherwise, the contact is queued to
the skillset sent in the contact data.
ASSIGN CONTACT DATA "%SKILLSET%SKILLSET" TO skillset_cv
ASSIGN CONTACT DATA "%AGENT%AGENT" TO agent_cv
IF IDLE AGENT agent_cv THEN
QUEUE TO AGENT agent_cv
WAIT 2
ELSE
QUEUE TO SKILLSET skillset_cv
WAIT 2
END IF

An agent ID is sent in the contact data under the following conditions:


„ An agent saves an e-mail as pending with a scheduled presentation time.
„ An agent chooses a disposition code for an outbound contact that
reschedules the contact to be presented at a later time.
„ An agent transfers a contact to another agent.
„ An agent creates a scheduled callback contact from the Agent Desktop.
„ If a reply e-mail arrives from a customer, the preferred agent for that
customer is available as the agent ID in the scripts.
„ If a new e-mail arrives from an existing customer, the preferred agent for
that customer is available as the agent ID in the scripts.
„ If an agent pulls a CLOSED contact (pull mode) using the Agent Desktop,
the agent ID is available in the contact data.

366 Contact Center Manager


December 2007 Intrinsics

IDLE AGENT COUNT

The IDLE AGENT COUNT is the current number of idle agents in the given
skillset list.

If you specify a list of skillsets, then the return value is the maximum IDLE
AGENT COUNT of all the skillsets in the list.

This intrinsic applies to both voice and multimedia contacts.

Script syntax
IDLE AGENT COUNT [<skillset> | <skillset_list>]

Parameter
Enter information for the following parameter:
„ <skillset> or <skillset_list> The skillset, or list of skillsets, that you want
to include in the return value.

Return type
This intrinsic returns a numerical value to the script.

Examples

Example 1
This sample script first queues the call to the sales skillset. If the call is not
answered immediately, the script checks if more than two idle agents are in the
service skillset. If so, the call is queued to the service skillset. If the call is not
answered immediately, the caller hears a message indicating that all agents are
busy, followed by music.
QUEUE TO SKILLSET sales_sk
WAIT 2
IF (IDLE AGENT COUNT service_sk > 2) THEN

Scripting Guide for Communication Server 1000/Meridian 1 PBX 367


Intrinsics Standard 8.05

QUEUE TO SKILLSET service_sk


WAIT 2
END IF
GIVE RAN agents_busy_ran_gv
GIVE MUSIC soft_music_gv
SECTION WaitLoop

Example 2
The following sample script first queues the multimedia contact to the skillset
sent in the contact data. If the contact is not answered after 600 seconds, the
script checks if there are more than two idle agents in the EM_Promo2_sk
skillset. If so, the contact is also queued to the EM_Promo2_sk skillset.
ASSIGN CONTACT DATA "%SKILLSET%SKILLSET" TO skillset_cv
QUEUE TO SKILLSET skillset_cv
WAIT 600
IF (IDLE AGENT COUNT EM_Promo2_sk > 2) THEN
QUEUE TO SKILLSET EM_Promo2_sk
WAIT 2
END IF

368 Contact Center Manager


December 2007 Intrinsics

LOGGED AGENT COUNT

The LOGGED AGENT COUNT is the number of currently logged-on agents in


the skillset list.

If you specify a list of skillsets, then the return value is the maximum of the
LOGGED AGENT COUNT for the skillsets. This value is not the actual number
of logged-on agents in all skillsets.

Use this intrinsic in loops to ensure that agents are logged on to a skillset while
the contact is waiting to be answered.

This intrinsic applies to both voice and multimedia contacts.

Do not use the LOGGED AGENT COUNT intrinsic to test whether a skillset is
in service. Although agents are logged on to a skillset, it does not mean that the
skillset is in service. (You can put a skillset into out-of-service or transition
mode from the Skillset configuration screen under Configuration in Contact
Center Manager Administration.) Instead, use the OUT OF SERVICE intrinsic
to test whether a skillset is in service.

Script syntax
LOGGED AGENT COUNT [<skillset> | <skillset_list>]

Parameter
Enter information for the following parameter:
„ <skillset> or <skillset_list> The skillset, or list of skillsets, that you want
to include in the return value.

Return type
This intrinsic returns a numerical value to the script.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 369


Intrinsics Standard 8.05

Examples

Example 1
This example shows how to test if enough agents are within a skillset to handle
the current call volume. If not enough agents are available, the caller receives a
busy tone.
IF (QUEUED COUNT sales_sk) > (2 * LOGGED AGENT COUNT sales_sk)
THEN
GIVE BUSY
END IF
QUEUE TO SKILLSET sales_sk
WAIT 2

Example 2
This example shows how to test if there are enough agents within a skillset to
handle the current multimedia contact volume. If there are not enough agents,
the contact is disconnected. The contact is sent back to Contact Center Manager
Server.
ASSIGN CONTACT DATA "%SKILLSET%SKILLSET" TO skillset_cv
IF (QUEUED COUNT skillset_cv) > (2 * LOGGED AGENT COUNT
skillset_cv) THEN
DISCONNECT
END IF
QUEUE TO SKILLSET skillset_cv
WAIT 2

370 Contact Center Manager


December 2007 Intrinsics

LOGGED OUT AGENT

The LOGGED OUT AGENT intrinsic tests whether agents are logged off.

This intrinsic applies to both voice and multimedia contacts. This intrinsic only
tests for agents at the local site. You cannot use this intrinsic to test for agents
logged off network sites.

Script syntax
LOGGED OUT AGENT <agent ID | agent ID list>

Parameter
Enter information for the following parameter:
„ <agent ID | agent ID list> The ID, or list of IDs, of the agents you want to
include in the return value.

Return type
This intrinsic returns a True or False value to the script. The value is True if all
agents you are querying are logged off. If you use a list of agents for the
parameter and one of the agents is logged on, then the return value is False.

Examples

Example 1
In this example, the LOGGED OUT AGENT intrinsic is used to test if the
preferred agent is available. If not, the contact is queued to a backup skillset
instead.
IF LOGGED OUT AGENT agent_4 THEN
QUEUE TO SKILLSET backup_sk
WAIT 2
ELSE

Scripting Guide for Communication Server 1000/Meridian 1 PBX 371


Intrinsics Standard 8.05

QUEUE TO AGENT agent_4


WAIT 2
END IF

Example 2
In this multimedia example, the LOGGED OUT AGENT intrinsic is used to test
if the preferred agent is logged on. If not, the multimedia contact is queued to the
skillset sent in the contact data.
ASSIGN CONTACT DATA "%SKILLSET%SKILLSET" TO skillset_cv
ASSIGN CONTACT DATA "%AGENT%AGENT" TO agent_cv
IF LOGGED OUT AGENT agent_cv THEN
QUEUE TO SKILLSET skillset_cv
WAIT 2
ELSE
QUEUE TO AGENT agent_cv
WAIT 2
END IF

An agent ID is sent in the CONTACT DATA under the following conditions:


„ An agent saves an e-mail as pending with a scheduled presentation time.
„ An agent chooses a disposition code for an outbound contact that re-
schedules the contact to be presented at a later time.
„ An agent transfers a contact to another agent.
„ An agent creates a scheduled callback contact from the Agent Desktop.
„ If a reply e-mail arrives from a customer, the preferred agent for that
customer is available as the agent ID in the scripts.
„ If a new e-mail arrives from an existing customer, the preferred agent for
that customer is available as the agent ID in the scripts.
„ If an agent pulls a CLOSED contact (pull mode) using the Agent Desktop,
the agent ID is available in the contact data.

372 Contact Center Manager


December 2007 Intrinsics

LONGEST IDLE AGENT

The LONGEST IDLE AGENT intrinsic is the ID of the agent in the skillset list
who is idle the longest.

The LONGEST IDLE AGENT is determined by either the idle time of the agent
since the last contact was disconnected or the total idle time of the agent since
logging on. The algorithm that is used is a system parameter set by the
administrator in the Global configuration screen under Configuration in Contact
Center Manager Administration.

If you specify a list of skillsets, then the return value is the LONGEST IDLE
AGENT for all the skillsets.

This intrinsic applies to both voice and multimedia contacts.

If you queue the contact to only one skillset, you do not need to use this intrinsic.
The server automatically queues the contact to the agent who is idle the longest.

Script syntax
LONGEST IDLE AGENT [<skillset> | <skillset_list>]

Parameter
Enter information for the following parameter:
„ <skillset> or <skillset_list> The skillset, or list of skillsets, that you want
to include in the return value.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 373


Intrinsics Standard 8.05

BY LONGEST IDLE AGENT option


If you use the BY LONGEST IDLE AGENT option, and one or more agents are
idle in the listed skillsets, the agent is selected based on the length of time the
agent is idle.

The agent priorities in each skillset are still considered, so only the front of each
idle agent queue (for all the listed skillsets) is inspected for the longest idle
agent. This option does not override the agent priorities within each skillset.

Return type
This intrinsic returns an agent ID to the script.

Examples

Example 1
In this example, the call is queued to the skillset with the longest idle agent. If
the call is not answered immediately, the caller hears a message indicating that
all agents are busy, followed by music.
QUEUE TO SKILLSET sales_sk, service_sk BY LONGEST IDLE AGENT
WAIT 2
GIVE RAN agents_busy_ran_gv
GIVE MUSIC pop_music_gv
SECTION WaitLoop

Example 2
In this multimedia example, the contact is queued to the skillset with the longest
idle agent.
ASSIGN CONTACT DATA "%SKILLSET%SKILLSET" TO skillset_cv
ASSIGN EM_Promo2_sk TO backup_skillset_cv
QUEUE TO SKILLSET skillset_cv, backup_skillset_cv BY LONGEST IDLE
AGENT
WAIT 2
SECTION WaitLoop

374 Contact Center Manager


December 2007 Intrinsics

MOST LOGGED AGENTS

The MOST LOGGED AGENTS intrinsic identifies the skillset with the most
logged-on agents at the time the intrinsic is executed.

This intrinsic applies to both voice and multimedia contacts.

Script syntax
MOST LOGGED AGENTS <skillset_list>

Parameter
Enter information for the following parameter:
„ <skillset_list> The list of skillsets that you want to include in the return
value.

Return type
This intrinsic returns a skillset to the script.

Examples

Example 1
In this example, the value of the skillset with the most logged-on agents is
assigned to a call variable named skillset_cv. The voice contact is then queued
to the skillset represented by this variable. If the voice contact is not answered
immediately, the caller hears a message indicating that all agents are busy,
followed by music. After this, the section named WaitLoop is executed. Every
30 seconds, this section checks whether the voice contact was answered and
whether agents are available in the required skillset to answer the voice contact.
/* Always assign the skillset to a skillset call variable
(skillset_cv) so that you can check where the call was queued to
*/
ASSIGN MOST LOGGED AGENTS service_sk, support_sk TO skillset_cv

Scripting Guide for Communication Server 1000/Meridian 1 PBX 375


Intrinsics Standard 8.05

QUEUE TO SKILLSET skillset_cv


WAIT 2
GIVE RAN agents_busy_ran_gv
GIVE MUSIC classical_music_gv
SECTION WaitLoop
WAIT 30
IF NOT QUEUED THEN
IF OUT OF SERVICE skillset_cv THEN
GIVE RAN sorry_closed_ran_gv
DISCONNECT
ELSE
QUEUE TO SKILLSET skillset_cv
WAIT 2
END IF
END IF
GIVE RAN agents_still_busy_ran_gv
EXECUTE WaitLoop

Example 2
In this multimedia example, the value of the skillset with the most logged-on
agents is assigned to a call variable named skillset_cv. The contact is then
queued to the skillset represented by this variable. Every n seconds, this section
checks whether the contact is answered and if there are agents available in the
required skillset to handle the multimedia contact.
/* Always assign the skillset to a skillset call variable
(skillset_cv) so that you can check where the contact was queued
to */
ASSIGN CONTACT DATA "%SKILLSET%SKILLSET" TO skillset_cv
ASSIGN EM_Promo2_sk TO backup_skillset_cv
ASSIGN MOST LOGGED AGENTS skillset_cv, backup_skillset_cv TO
skillset_cv
QUEUE TO SKILLSET skillset_cv
WAIT 2
SECTION WaitLoop

376 Contact Center Manager


December 2007 Intrinsics

WAIT waittime_cv
IF NOT QUEUED THEN
IF OUT OF SERVICE skillset_cv THEN
ASSIGN 120 TO waittime_cv
ELSE
QUEUE TO SKILLSET skillset_cv
ASSIGN 60 TO waittime_cv
END IF
END IF
EXECUTE WaitLoop

Scripting Guide for Communication Server 1000/Meridian 1 PBX 377


Intrinsics Standard 8.05

OLDEST

The OLDEST intrinsic is the age of the contact (with the given priority, if you
choose to include it) that waited longest in the given skillset queue when the
intrinsic is executed.

If you specify a list of skillsets, then the return value is the maximum value of
the OLDEST values for all the skillsets.

This intrinsic applies to both voice and multimedia contacts.

See “AGE OF CALL” on page 412 to compare.

Script syntax
OLDEST [<skillset> | <skillset_list>] {WITH CALL PRIORITY <priority>}

The syntax OLDEST CALL is still supported.

Optional
The WITH CALL PRIORITY segment is optional.

Parameters
Enter information for the following parameters:
„ <skillset> or <skillset_list> The skillset, or list of skillsets, that you want
to include in the return value.
„ <priority> The priority of the contacts that you want to track.

Return type
This intrinsic returns a value, in seconds, to the script.

378 Contact Center Manager


December 2007 Intrinsics

Examples

Example 1
In this example, if the oldest voice contact queued to the sales skillset is more
than 5 minutes old, then the current call is queued to a backup skillset. Queuing
the call to a backup skillset prevents more calls from being queued to the sales
skillset. If the oldest call queued to the sales skillset is less than 5 minutes old,
the script continues to queue the current call to that skillset.
IF (OLDEST sales_sk > 300) THEN
QUEUE TO SKILLSET backup_sk
WAIT 2
ELSE
QUEUE TO SKILLSET sales_sk
WAIT 2
END IF

Example 2
In this multimedia example, if the oldest contact queued to the skillset sent in the
contact data is more than 5 minutes old, then the current contact is queued to a
backup skillset. This prevents further contacts from being queued to the skillset
sent in the contact data. If the oldest contact queued to the skillset sent in the
contact data is less than 5 minutes old, the script continues to queue the current
contact to that skillset.
ASSIGN CONTACT DATA "%SKILLSET%SKILLSET" TO skillset_cv
ASSIGN EM_Promo2_sk TO backup_skillset_cv
IF (OLDEST CALL skillset_cv > 300) THEN
QUEUE TO SKILLSET backup_skillset_cv
WAIT 2
ELSE
QUEUE TO SKILLSET skillset_cv
WAIT 2
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 379


Intrinsics Standard 8.05

OUT OF SERVICE

Use the OUT OF SERVICE intrinsic to test whether skillsets are out of service.
If you specify a list of skillsets, then the OUT OF SERVICE intrinsic returns a
True value if all skillsets are out of service. Otherwise, the intrinsic returns a
False value.

A skillset is out of service when:


„ it is placed into OUT OF SERVICE mode in the Skillset Properties
property sheet (in either night service or transition mode)
„ all agents are logged off the skillset
„ all agents are in Standby mode in this skillset

This intrinsic applies to both voice and multimedia contacts.

Script syntax
OUT OF SERVICE [<skillset> | <skillset_list>]

Parameter
Enter information for the following parameter:
„ <skillset> or <skillset_list> The skillset, or list of skillsets, that you want
to include in the return value.

Return type
This intrinsic returns a True or False value to the script.

380 Contact Center Manager


December 2007 Intrinsics

Examples

Example 1
In this example, if the sales skillset is out of service, then incoming calls receive
night service treatment. Otherwise, they are queued to the sales skillset. If the
call is not answered immediately, the caller hears a message indicating that all
agents are busy, followed by music.
IF OUT OF SERVICE sales_sk THEN
EXECUTE Night_Section
END IF
QUEUE TO SKILLSET sales_sk
WAIT 2
GIVE RAN agents_busy_ran_gv
GIVE MUSIC pop_music_gv
SECTION WaitLoop

Example 2
In this multimedia example, if the skillset sent in the contact data is out of
service, then incoming contacts run a section that checks the condition of the
skillset every 1800 seconds. Otherwise, the contact is queued to the skillset.
ASSIGN CONTACT DATA "%SKILLSET%SKILLSET" TO skillset_cv
IF OUT OF SERVICE skillset_cv THEN
EXECUTE Night_Section
END IF
QUEUE TO SKILLSET sales_sk
WAIT 2
QUIT
SECTION Night_Section
IF OUT OF SERVICE skillset_cv THEN
WAIT 1800
EXECUTE Night_Section
ELSE
QUEUE TO SKILLSET skillset_cv
WAIT 2

Scripting Guide for Communication Server 1000/Meridian 1 PBX 381


Intrinsics Standard 8.05

QUIT
END IF

Example 3
The Out of Service intrinsic only checks the condition of the local skillset, even
if the include local node option is selected.

If no agents are available for the skillset on this node, but there are agents with
that skillset on other nodes, the skillset is still considered to be out of service
when the command is executed.

Only the local node’s skillset is checked. If no agents are logged on, or the
skillset was placed into out-of-service mode using the client, callers immediately
receive a closed message.
IF OUT OF SERVICE Sales_SK THEN
GIVE RAN closed_ran
DISCONNECT
ELSE
QUEUE TO NETWORK SKILLSET Sales_SK
WAIT 4
END IF
„ Returns a value of type Boolean which indicates whether or not all of the
specified local skillset queues at this node are out of service.

382 Contact Center Manager


December 2007 Intrinsics

POSITION IN QUEUE

The POSITION IN QUEUE intrinsic is the position of the contact in the skillset
queue at the time the intrinsic is executed.

The contact must be queued to the skillset before this intrinsic is used.

If you specify a list of skillsets, then the return value is the minimum value of
the POSITION IN QUEUE values for all of the skillsets.

The position is calculated using the number of contacts queued in front of the
current contact. This number includes all contacts with priorities equal to or
higher than the priority of the current contact. For example, if the current contact
is priority 2, then the calculation includes all priority 2 and priority 1 contacts.

This intrinsic applies to both voice and multimedia contacts.

Nortel recommendations:
„ Nortel recommends that you use this intrinsic only for contact centers that
do not assign priority levels.
„ Nortel recommends that you do not use this intrinsic to play the queue
position to a voice contact. Even in single-priority systems, a voice
contact’s position in queue can become higher rather than lower.

Script syntax
POSITION IN QUEUE [<skillset> | <skillset_list>]

Parameter
Enter information for the following parameter:
„ <skillset> or <skillset_list> The skillset, or list of skillsets, that you want
to include in the return value.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 383


Intrinsics Standard 8.05

Return type
This intrinsic returns a numerical value to the script.

Examples

Example 1
In this example, the contact is already queued to the service skillset. This section
of the script tests the contact current position in the skillset queue. If it is more
than 5, the priority is raised to priority 1 (unless it is already priority 1).
IF (POSITION IN QUEUE service_sk > 5)
AND (PRIORITY IN QUEUE service_sk < > 1) THEN
CHANGE PRIORITY IN SKILLSET service_sk TO PRIORITY 1
END IF

Example 2
In this multimedia example, the contact is already queued to the skillset sent
with the contact data. This section of the script tests the contact's current
position in the skillset queue. If it is more than 5, the priority is raised to priority
2 (unless it is already priority 2).
ASSIGN CONTACT DATA "%SKILLSET%SKILLSET" TO skillset_cv
ASSIGN CONTACT DATA "%PRIORITY%PRIORITY TO priority_cv
QUEUE TO SKILLSET skillset_cv WITH PRIORITY priority_cv
WAIT 2
SECTION WaitLoop
WAIT looptimer_gv
IF (POSITION IN QUEUE skillset_cv > 5)
AND (PRIORITY IN QUEUE skillset_cv < > 2) THEN
CHANGE PRIORITY IN SKILLSET skillset_cv TO PRIORITY 2
END IF
EXECUTE WaitLoop

384 Contact Center Manager


December 2007 Intrinsics

PRIORITY IN QUEUE

The PRIORITY IN QUEUE intrinsic is the priority of the current contact in the
queue. This value can range from 0–6, with 1 being the highest priority and 6
being the lowest priority. A value of 0 indicates the contact is not currently in the
queue.

This intrinsic applies to both voice and multimedia contacts.

The contact must be queued to the skillset before this intrinsic is used. The
PRIORITY IN QUEUE intrinsic can still be used to check if the call is queued
locally, even if the include local node option is selected for the network skillset.

Script syntax
PRIORITY IN QUEUE <skillset>

Parameter
Enter information for the following parameter:
„ <skillset> The skillset that you want to include in the return value.

Return type
This intrinsic returns a priority to the script.

Description
You can use the priority value in two ways.

You can use <> and = to make a direct comparison of the priority value. For
example:
IF (PRIORITY IN QUEUE sales_sk = 0) THEN
IF PRIORITY IN QUEUE Customer_Service_Eng <> 1 THEN

Less than or greater than operations are not valid with a priority value.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 385


Intrinsics Standard 8.05

IF (PRIORITY IN QUEUE Local_Sales_Sk > 0) THEN

You can declare a call variable of type PRIORITY and assign a priority to it and
then perform the required comparison. For example:
ASSIGN 2 to cv_PriorityInQueue
IF (PRIORITY IN QUEUE Local_Sales_Sk > cv_PriorityInQueue) THEN
...
END IF

Examples

Example 1
In this example, the script first checks if the contact is queued in the sales
skillset. If this is true and agents are available to answer the contact in the
service skillset, the contact is queued to the service skillset. Otherwise, the
contact receives a message indicating that the contact center is closed.
IF (PRIORITY IN QUEUE sales_sk = 0) THEN
IF NOT OUT OF SERVICE service_sk THEN
QUEUE TO SKILLSET service_sk
WAIT 2
ELSE
GIVE RAN sorry_closed_ran_gv
DISCONNECT
END IF
END IF

Example 2
In this multimedia example, the script first checks if the contact is queued in the
skillset sent with the contact data. If this is true and there are agents available to
answer the contact in the skillset, the contact is requeued to the skillset.
Otherwise, the contact is disconnected and Contact Center Multimedia requests
the contact.
ASSIGN CONTACT DATA "%SKILLSET%SKILLSET" TO skillset_cv
IF (PRIORITY IN QUEUE skillset_cv = 0) THEN
IF NOT OUT OF SERVICE skillset_cv THEN

386 Contact Center Manager


December 2007 Intrinsics

QUEUE TO SKILLSET skillset_cv


WAIT 2
ELSE
DISCONNECT
END IF
END IF

Use DISCONNECT with caution as the multimedia contact is sent back to


Contact Center Manager Server as a new contact and the time in queue is reset.

Example 3
In this example, a secondary script is used to increase the priority of calls in the
script.

Primary Script:
QUEUE TO SKILLSET Customer_Service_Eng WITH PRIORITY 6
GIVE RAN ran_cv
EXECUTE SCRIPT Secondary_One

Secondary script Increase Priority


ASSIGN 3 TO prio_cv
IF PRIORITY IN QUEUE Customer_Service_Eng > prio_cv THEN
CHANGE PRIORITY IN SKILLSET Customer_Service_Eng TO
PRIORITY prio_cv
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 387


Intrinsics Standard 8.05

PRIORITY IN NETWORK QUEUE

The PRIORITY IN NETWORK QUEUE intrinsic is the priority of the current


call in the network skillset queue. This value can range from 0–6, with 1 being
the highest priority and 6 being the lowest priority. A value of 0 indicates the
contact is not currently in the queue.

The call must be queued to the network skillset and then you must give a wait
time of at least 1 second to ensure the target site can respond to the source site
before this intrinsic is used.

Script syntax
PRIORITY IN NETWORK QUEUE <skillset>

Parameter
Enter information for the following parameter:
„ <skillset> The network skillset that you want to include in the return value.

Restriction
Do not use this intrinsic in the Network script (if you purchased the NSBR
feature).

Return type
This intrinsic returns a priority to the script. If this intrinsic returns a value of 0,
then the call was not successfully queued to the network skillset.

Description
You can use the priority value in two ways.

You can use <> and = to make a direct comparison of the priority value. For
example:

388 Contact Center Manager


December 2007 Intrinsics

IF (PRIORITY IN QUEUE sales_sk = 0) THEN


IF PRIORITY IN QUEUE Customer_Service_Eng <> 1 THEN

Less than or greater than operations are not valid with a priority value.
IF (PRIORITY IN QUEUE Local_Sales_Sk > 0) THEN

You can declare a call variable of type PRIORITY and assign a priority to it and
then perform the required comparison. For example:
ASSIGN 2 to cv_PriorityInQueue
IF (PRIORITY IN QUEUE Local_Sales_Sk > cv_PriorityInQueue) THEN
...
END IF

Examples

Example 1
In the following example, if the priority of the call in the network skillset
service_sk is 0, then the call is queued to the network skillset support_sk.
IF (PRIORITY IN NETWORK QUEUE service_sk = 0) THEN
QUEUE TO NETWORK SKILLSET support_sk
WAIT 10
END IF

Example 2
In the following example, the include local node option is selected. The value
returned is the priority (1-6) of the call in the remote node’s network skillset
queue. This intrinsic returns a 0 (zero) if the call is not queued remotely. You can
use this command to determine if the call is queued to a remote node.
IF PRIORITY IN NETWORK QUEUE Sales_Sk = 0 THEN
QUEUE TO NETWORK SKILLSET Sales_Backup_Sk
WAIT 4
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 389


Intrinsics Standard 8.05

QUEUED COUNT

The QUEUED COUNT intrinsic is the number of contacts outstanding against


the skillsets in the given contact priority at the time the intrinsic is executed. If
you specify a list of skillsets, then the return value is the maximum value of the
QUEUED COUNT value for all skillsets.

This intrinsic applies to both voice and multimedia contacts.

This count includes only contacts not yet serviced and does not include contacts
currently being presented to an agent.

QUEUED CALL COUNT is still supported.

Script syntax
QUEUED COUNT [<skillset> | <skillset_list>] {WITH CALL PRIORITY
<priority>}

Optional
The WITH CALL PRIORITY segment is optional.

Parameters
Enter information for the following parameters:
„ <skillset> or <skillset_list> The skillset, or list of skillsets, that you want
to include in the return value.
„ <priority> The priority of the calls that you want to track.

Return type
This intrinsic returns a numerical value to the script.

390 Contact Center Manager


December 2007 Intrinsics

Examples

Example 1
In this example, if the number of calls queued to the sales skillset is greater than
twice the number of agents logged on to the sales skillset, then the caller is given
a busy tone. Otherwise, the call is queued to the sales skillset. If the call is not
answered immediately, the caller hears a message indicating that all agents are
busy, followed by music.
IF (QUEUED COUNT sales_sk) > (2 * LOGGED AGENT COUNT sales_sk)
THEN
GIVE BUSY
END IF
QUEUE TO SKILLSET sales_sk
WAIT 2
GIVE RAN agents_busy_ran_gv
GIVE MUSIC soft_music_gv
SECTION WaitLoop

Example 2
In this multimedia example, if the number of contacts queued to the skillset sent
with the contact data is greater than twice the number of agents logged on to the
skillset, the contact is disconnected and Contact Center Multimedia sends the
contact back to Contact Center Manager Server to be requeued. Otherwise, the
contact is queued to the skillset.
ASSIGN CONTACT DATA "%SKILLSET%SKILLSET" TO skillset_cv
IF (QUEUED COUNT skillset_cv) > (2 * LOGGED AGENT COUNT
skillset_cv) THEN
DISCONNECT
END IF
QUEUE TO SKILLSET skillset_cv
WAIT 2
SECTION WaitLoop

Use DISCONNECT with caution as the multimedia contact is sent back to


Contact Center Manager Server as a new contact and the time in queue is reset.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 391


Intrinsics Standard 8.05

392 Contact Center Manager


December 2007 Intrinsics

Section B: Time intrinsics

In this section
DAY OF WEEK 394
DATE 396
DAY OF MONTH 398
MONTH OF YEAR 400
TIME OF DAY 402

Scripting Guide for Communication Server 1000/Meridian 1 PBX 393


Intrinsics Standard 8.05

DAY OF WEEK

The value returned by this intrinsic is the current day of the week. You can use
this intrinsic to determine whether the current day is a specific day or is in a list
or range of days.

This intrinsic applies to both voice and multimedia contacts.

Script syntax
DAY OF WEEK

Return type
This intrinsic returns a day to the script.

Possible values
The possible values for this intrinsic are:
„ Monday
„ Tuesday
„ Wednesday
„ Thursday
„ Friday
„ Saturday
„ Sunday

You cannot use abbreviations for the days of the week.

The days are ordered from Monday to Sunday, with Monday as the first day of
the week and Sunday as the last. Therefore, the expression Monday < Sunday is
true, and Friday < Tuesday is false. Ranges also wrap around, so the expression
Friday .. Tuesday is valid, and is true on Friday, Saturday, Sunday, Monday, and
Tuesday.

394 Contact Center Manager


December 2007 Intrinsics

Example
In this example, voice contacts coming into the contact center between 05:00
p.m. and 08:00 a.m. on Saturday and Sunday receive closed call treatment.
Otherwise, voice contacts are queued to the general skillset. If the voice contact
is not answered immediately, the caller hears a message indicating that all agents
are busy, followed by music.

You can use a variable to represent a specific period of time. For example, the
variable named weekend_gv represents the days from Saturday to Sunday, and a
variable named closed_hours_gv represents the hours from 05:00 p.m. to
08:00 a.m.
IF (DAY OF WEEK = weekend_gv) AND (TIME OF DAY = closed_hours_gv)
THEN
EXECUTE Closed_Section
END IF
QUEUE TO SKILLSET general_sk
WAIT 2
GIVE RAN agents_busy_ran_gv
GIVE MUSIC pop_music_gv
SECTION WaitLoop

Scripting Guide for Communication Server 1000/Meridian 1 PBX 395


Intrinsics Standard 8.05

DATE

The value returned by this intrinsic is the current date. You can use this intrinsic
to determine whether the current date is a specific date or is in a range of dates.

This intrinsic applies to both voice and multimedia contacts.

Script syntax
DATE

Return type
This intrinsic returns a date to the script.

Valid range
The value can range from January 1 to December 31.

Format
You can specify the month by using either the first three characters of the month
(for example, Apr), or by spelling out the entire month (for example,
September). In addition, the month can appear before or after the day.

396 Contact Center Manager


December 2007 Intrinsics

Example
The following example uses both specific dates and a range of dates. Voice
contacts coming in to the contact center on May 31, July 4, and December 25 to
January 1 receive holiday call treatment.

You can use a variable to represent a specific period of time. For example, the
variable named christmas_holiday_gv represents the days from December 25 to
January 1.
IF (DATE = May 31, 4 July, christmas_holiday_gv) THEN
EXECUTE Holiday_Section
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 397


Intrinsics Standard 8.05

DAY OF MONTH

The value returned by this intrinsic is the current day of the month. You can use
this intrinsic to determine whether the current day is a specific day of the month
(the 15th, for example), or is in a range of days (the 2nd through the 10th, for
example).

This intrinsic applies to both voice and multimedia contacts.

Script syntax
DAY OF MONTH

Return type
This intrinsic returns a day (the day of the current month) to the script.

Valid range
The value can range from 1 to 31.

Format
Use a number or a list of numbers from 1 to 31.

Examples

Example 1: Range of days


BestAir Airlines has monthly specials on different flights. Voice contacts calling
BestAir between the 27th and the 31st of each month hear a recorded
announcement that gives information about the upcoming specials for the
month.

You can use a variable to represent a specific period of time. For example, the
variable named monthly_special_gv represents the days between the 27th and
the 31st of each month.

398 Contact Center Manager


December 2007 Intrinsics

IF (DAY OF MONTH = monthly_special_gv) THEN


GIVE RAN specials_ran_gv
END IF

Example 2: Specific days


In this example, on the 1st and 15th day of each month, a section of the script
called Pay_Day_Section is executed.
IF (DAY OF MONTH = 1,15) THEN
EXECUTE Pay_Day_Section
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 399


Intrinsics Standard 8.05

MONTH OF YEAR

The value returned by this intrinsic is the current month of the year. You can use
this intrinsic to determine whether the current month is a specific month or is in
a range of months.

This intrinsic applies to both voice and multimedia contacts.

Script syntax
MONTH OF YEAR

Return type
This intrinsic returns a month to the script.

Valid range
The value can range from January to December.

You can specify the month either by using the first three characters of the month
(for example, Apr), or by spelling out the entire month (for example,
September).

Examples

Example 1: Range of months


In this example, voice contacts entering the contact center between the months
of December and February hear a recorded announcement describing winter
sales.

You can use a variable to represent a specific period of time. For example, the
variable named winter_months_specials_gv represents the months of December
to February.
IF (MONTH OF YEAR = winter_months_specials_gv) THEN
GIVE RAN winter_specials_ran_gv

400 Contact Center Manager


December 2007 Intrinsics

END IF

Example 2: Specific month


In this example, callers hear a different recorded announcement depending on
the month in which they contact the contact center. For example, in January, they
hear a recorded announcement describing sales highlights for the month. If there
is no holiday in a particular month, callers hear a default recorded
announcement.
WHERE MONTH OF YEAR EQUALS
VALUE January: GIVE RAN jan_highlights_ran_gv
VALUE Oct: GIVE RAN oct_highlights_ran_gv
VALUE November: GIVE RAN nov_highlights_ran_gv
VALUE Dec: GIVE RAN dec_highlights_ran_gv
DEFAULT: GIVE RAN default_ran_gv
END WHERE

Scripting Guide for Communication Server 1000/Meridian 1 PBX 401


Intrinsics Standard 8.05

TIME OF DAY

The value returned by this intrinsic is the current time of day. You can use this
intrinsic to determine the exact time or whether the current time of day is in a
specified range of time.

This intrinsic applies to both voice and multimedia contacts.

Script syntax
TIME OF DAY

Return type
This intrinsic returns a time to the script.

Valid range
This value can range from 00:00 to 23:59.

Do not use >= or <= with ranges.

Format
hh:mm

Examples

Example 1: Time range


In this example, voice contacts coming in to the contact center between
05:00 p.m. and 08:00 a.m. receive night contact treatment. Otherwise, voice
contacts are queued to the general skillset. If the voice contact is not answered
immediately, the caller hears a message indicating that all agents are busy,
followed by music.

402 Contact Center Manager


December 2007 Intrinsics

You can use a variable to represent a specific period of time. For example, the
variable named closed_hours_gv represents the hours from 05:00 p.m. to 08:00
a.m.
IF (TIME OF DAY = closed_hours_gv) THEN
EXECUTE Night_Section
END IF
QUEUE TO SKILLSET general_sk
WAIT 2
GIVE RAN agents_busy_ran_gv
GIVE MUSIC soft_music_gv
SECTION WaitLoop

Example 2: Specific time


To be meaningful, time comparisons using an exact time should include a
greater than operator (>) or a less than operator (<). For example, given the
following statements:
IF (TIME OF DAY = 08:00)
IF (TIME OF DAY < 08:00)

the first expression is true for one minute; the second is true from midnight until
7:59 a.m.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 403


Intrinsics Standard 8.05

404 Contact Center Manager


December 2007 Intrinsics

Section C: Traffic intrinsics

In this section
CALL RATE 406
CONTACT RATE 407
TOTAL ACTIVE CALLS 408
TOTAL ACTIVE CONTACTS 409

Scripting Guide for Communication Server 1000/Meridian 1 PBX 405


Intrinsics Standard 8.05

CALL RATE

The value returned by this intrinsic is the number of voice and non-voice
contacts that entered the system during the previous 10-minute period.

This intrinsic applies to both voice and multimedia contacts.

This intrinsic does not differentiate between voice and non-voice contacts. The
intent, for a future release, is to have CALL RATE reflect voice contacts only.

Script syntax
CALL RATE

Return type
This intrinsic returns a numerical value to the script.

Example
In this example, when the call rate for the 10-minute period exceeds 50 voice
contacts, callers hear a recorded announcement that states that the contact center
is experiencing a high level of traffic.
IF (CALL RATE > 50) THEN
GIVE RAN busy_ran_gv
...
END IF

406 Contact Center Manager


December 2007 Intrinsics

CONTACT RATE

This intrinsic represents the number of voice and non-voice contacts that enter
the system during the previous 10-minute period.

This intrinsic applies to both voice and multimedia contacts.

This intrinsic does not differentiate between voice and non-voice contacts. The
intent, for a future release, is to have CONTACT RATE reflect non-voice
contacts only.

Script syntax
CONTACT RATE

Return type
This intrinsic returns a numerical value to the script.

Example
IF CONTACT TYPE = g_EMAIL_gv THEN
IF CONTACT RATE > 50 THEN
IF TOTAL ACTIVE CONTACTS > 2500 THEN
/* Special Handling */
END IF
END IF
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 407


Intrinsics Standard 8.05

TOTAL ACTIVE CALLS

The value returned by this intrinsic is the total number of voice contacts in the
system at the moment the intrinsic is executed.

Active calls include all voice contacts in the system that are currently queued,
are being presented to agents, or are being answered by agents. Active calls do
not include abandoned, rejected, defaulted, or completed calls.

This intrinsic, TOTAL ACTIVE CALLS, reflect voice contacts only.

Script syntax
TOTAL ACTIVE CALLS

Return type
This intrinsic returns a numerical value to the script.

Example
In this example, if the number of active voice contacts exceeds 200, then callers
receive overflow treatment. You can restrict the number of active voice contacts
to 200 to preserve shared phone lines used by other staff in your contact center.
IF (TOTAL ACTIVE CALLS >= 200) THEN
GIVE OVERFLOW
END IF

408 Contact Center Manager


December 2007 Intrinsics

TOTAL ACTIVE CONTACTS

The value returned by this intrinsic is the total number of non-voice or


multimedia contacts in the system at the time the intrinsic is executed.

Active contacts include all multimedia contacts in the system that are currently
queued, are being presented to agents, or are being answered by agents. Active
contacts do not include abandoned, rejected, defaulted, or completed contacts.

This intrinsic, TOTAL ACTIVE CONTACTS, reflect non-voice or multimedia


contacts only.

Script syntax
TOTAL ACTIVE CONTACTS

Return type
This intrinsic returns a numerical value to the script.

Example
IF CONTACT TYPE = g_EMAIL_gv THEN
IF CONTACT RATE > 50 THEN
IF TOTAL ACTIVE CONTACTS > 2500 THEN
/* Special Handling */
END IF
END IF
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 409


Intrinsics Standard 8.05

410 Contact Center Manager


December 2007 Intrinsics

Section D: Call intrinsics

In this section
AGE OF CALL 412
CALL FORWARD 413
CALL FORWARD BUSY 414
CALL FORWARD DO NOT DISTURB 415
CALL FORWARD NO ANSWER 416
CDN 417
CLID 418
CONFERENCED 421
DIALED DN 422
Transferring calls with the dialed DN 423
DIRECT CALL 425
DNIS 426
INTERNATIONAL CALL 428
LOC 430
NETWORK CALL 431
NPA 432
NXX 433
NPANXX 434
ON HOLD 435
QUEUED 436
ROUTE NUMBER 438
TRANSFERRED 439

Scripting Guide for Communication Server 1000/Meridian 1 PBX 411


Intrinsics Standard 8.05

AGE OF CALL

This intrinsic is the age of the contact at the time the intrinsic is executed.

This intrinsic applies to both voice and multimedia contacts.

Script syntax
AGE OF CALL

Return type
This intrinsic returns a value, in seconds, to the script.

Example
The following example is a section of script that queues the voice contact to the
sales skillset, and then plays music. The section Check_Age checks the age of
the voice contact every 20 seconds, until the voice contact is more than 2
minutes old. If the voice contact is greater than 2 minutes old, it is queued to a
backup skillset.
QUEUE TO SKILLSET sales_sk WITH PRIORITY 2
WAIT 2
GIVE MUSIC pop_music_gv
SECTION Check_Age
WAIT 20
IF (AGE OF CALL > 120) THEN
EXECUTE Requeue
END IF
EXECUTE Check_Age
SECTION Requeue
QUEUE TO SKILLSET backup_sk WITH PRIORITY 1
WAIT 2
/* additional call handling steps */

412 Contact Center Manager


December 2007 Intrinsics

CALL FORWARD

This intrinsic indicates if the call is forwarded (where the return value is True) or
not (where the return value is False).

This intrinsic is useful, for example, if a caller dials an agent DN directly, but the
agent is not available to take the call. If the call is forwarded to the contact
center, you can play an announcement stating that the call been forwarded.

This intrinsic applies to voice contacts only.

Script syntax
CALL FORWARD

Return type
This intrinsic returns a True or False value to the script.

Example
In this example, forwarded calls are given a recorded announcement that tells
the caller that their call is forwarded to the contact center.
IF CALL FORWARD THEN
GIVE RAN forward_to_call_center_ran_gv
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 413


Intrinsics Standard 8.05

CALL FORWARD BUSY

This intrinsic indicates whether the call is forwarded because the phoneset at the
original destination is busy (where the return value is True) or not (where the
return value is False).

This intrinsic applies to voice contacts only.

Script syntax
CALL FORWARD BUSY

Return type
This intrinsic returns a True or False value to the script.

Example
In this example, forwarded calls due to a busy condition are given a recorded
announcement stating that the call is forwarded.
IF CALL FORWARD BUSY THEN
GIVE RAN busy_forwarded_ran_gv
END IF

414 Contact Center Manager


December 2007 Intrinsics

CALL FORWARD DO NOT DISTURB

This intrinsic indicates whether the call is forwarded due to a do not disturb
condition at the destination (where the return value is True) or not (where the
return value is False).

This intrinsic applies to voice contacts only.

Script Syntax
CALL FORWARD DO NOT DISTURB

Return type
This intrinsic returns a True or False value to the script.

Example
In this example, calls forwarded due to a do not disturb condition at the
destination are given a recorded announcement stating that the call is forwarded.
IF CALL FORWARD DO NOT DISTURB THEN
GIVE RAN sleeping_ran_gv
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 415


Intrinsics Standard 8.05

CALL FORWARD NO ANSWER

This intrinsic indicates whether the call is forwarded because no one answered
the phoneset at the original destination (where the return value is True) or not
(where the return value is False).

This intrinsic applies to voice contacts only.

Script syntax
CALL FORWARD NO ANSWER

Return type
This intrinsic returns a True or False value to the script.

Example
In this example, calls forwarded due to no answer at the destination are given a
recorded announcement stating that the call is forwarded.
IF CALL FORWARD NO ANSWER THEN
GIVE RAN forward_no_answer_ran_gv
END IF

416 Contact Center Manager


December 2007 Intrinsics

CDN

The value of this intrinsic is the controlled directory number (CDN) of the
current call.

This intrinsic applies to voice contacts only.

Script syntax
CDN

Return type
This intrinsic returns a CDN.

Example
In this example, the script executes the GoldCard, Reg_Customers, or
Promotions script, depending on the CDN of the call.
WHERE CDN EQUALS
VALUE 5551230: EXECUTE SCRIPT Gold_Customers
VALUE 5551231: EXECUTE SCRIPT Reg_Customers
VALUE 5551232: EXECUTE SCRIPT Promotions
END WHERE

Scripting Guide for Communication Server 1000/Meridian 1 PBX 417


Intrinsics Standard 8.05

CLID

The value of this intrinsic is the calling line identification (CLID) of the current
call.

This intrinsic applies to voice contacts only.

Use the provider.exe tool to verify the CLID string sent by the switch. Make
sure you generate test calls from several different regions of the country. For
more information, see Appendix C, “Using HDX.”

Script syntax
CLID

Return type
This intrinsic returns a CLID.

Wildcards and placeholders


The following free-format expressions in CLID comparisons provide flexible
digit string evaluation:
„ wildcard—Use the at symbol (@) to represent a string of digits (zero or
more).
„ placeholder—Use a question mark (?) to represent a single-digit position.

Wildcard and placeholder rules


The following rules apply to the use of wildcards and placeholders:
„ Use wildcards and placeholders only with the CLID intrinsic.
„ Use only one wildcard in any one CLID string. For example, the string
@345@ is not valid.
„ Use wildcards only at the beginning or the end of a string.

418 Contact Center Manager


December 2007 Intrinsics

„ Do not use wildcards and placeholders in ranges of CLIDs. For example,


333@ .. 339@ is not allowed. However, you can use wildcards and
placeholders in lists of CLIDs.
„ Only use equal (=) and not equal (< >) operators with wildcards and
placeholders. Greater than and less than operations on wildcard expressions
give ambiguous results. A validation error is generated for scripts that use
this construct.
„ Use only variables of the WILDCLID data type for wildcard and
placeholder characters.
„ The statement
CLID = @
always returns a True value.
„ A string with placeholders has only a return value of True for CLIDs with
the same number of digits as there are placeholders. For example, the
statement
CLID = ???
is true for all CLID strings of three digits, and false for all other strings.
This type of expression is useful if you want to screen out strings of a fixed
length.
„ Both wildcards and placeholders can occur in a CLID digit string. All rules
still apply to placement.

Examples

Example 1
In this example, calls with CLIDs that are included in the vip_list_gv variable
are handled in a special way.
IF (CLID = vip_list_gv) THEN
EXECUTE Special_Handling
END IF

Example 2 (using wildcards)


The following example shows how to use a wildcard in a CLID digit string. All
calls starting with 305 are queued to the VIP skillset with the priority of 1 and
hear a special recorded announcement.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 419


Intrinsics Standard 8.05

IF (CLID = 305@) THEN


QUEUE TO SKILLSET VIP_sk WITH PRIORITY 1
WAIT 2
GIVE RAN you_are_special_ran_gv
END IF

Example 3
The following example shows how to use a placeholder and wildcard to indicate
that all CLIDs starting with 305 through to 395 are queued to the VIP skillset
with a priority of 1 and hear a special recorded announcement.
IF (CLID = 3?5@) THEN
QUEUE TO SKILLSET VIP_sk WITH PRIORITY 1
WAIT 2
GIVE RAN you_are_special_ran_gv
END IF

420 Contact Center Manager


December 2007 Intrinsics

CONFERENCED

This intrinsic is True when the call is a consultative call. A consultative call is
created when you start to conference in another party. When the conference is
established, this intrinsic is False.

This intrinsic applies to voice contacts only.

Script syntax
CONFERENCED

Return type
This intrinsic returns a True or False value to the script.

Example
In this example, the conference consultation call receives a recorded message
stating that the conference is starting. The other callers in the conference do not
hear this message. Only the caller initiating the conference hears it.
IF CONFERENCED THEN
GIVE RAN in_conference_ran_gv
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 421


Intrinsics Standard 8.05

DIALED DN

The value of this intrinsic is the number that the caller originally dialed if the
call is forwarded to the CDN using a switch feature. This intrinsic applies only
to forwarded calls. You can use the dialed DN to transfer a call to Contact Center
Manager (see “Use the DIALED DN intrinsic to transfer calls” on page 81).

This intrinsic applies to voice contacts only.

Script syntax
DIALED DN

Return type
This intrinsic returns a DN.

Example
In this example, calls are queued to the appropriate skillset depending on the
dialed DN.
WHERE DIALED DN EQUALS
VALUE 2512: QUEUE TO SKILLSET sales_sk WITH PRIORITY 1
VALUE 2603: QUEUE TO SKILLSET sales_sk WITH PRIORITY 2
VALUE 2776: QUEUE TO SKILLSET service_sk WITH PRIORITY 1
DEFAULT: QUEUE TO SKILLSET service_sk WITH PRIORITY 2
END WHERE

The DIALED DN intrinsic can handle the blind transfer of a call back to the
contact center by an agent. The dialed DN of the agent’s transfer call is
preserved for the original call when the transfer is complete so the caller can be
redirected to a new treatment or skillset.

422 Contact Center Manager


December 2007 Intrinsics

Transferring calls with the dialed DN

This section explains how you can transfer a call using the dialed DN.

This section applies to voice contacts only.

Using the DIALED DN intrinsic to transfer calls


You can test the DIALED DN intrinsic only with DNs that are redirected to a
CDN under control of Contact Center Manager by CALL FORWARD, CALL
FORWARD BUSY, or CALL FORWARD NO ANSWER. You use the DIALED
DN intrinsic to facilitate the transfer of calls back to Contact Center Manager.
You can create phantom DNs in the Communication Server 1000/Meridian 1
PBX. Phantom DNs call forward to a CDN under the control of Contact Center
Manager.

If you want to use phantom DNs to transfer calls, you must configure a phantom
DN for each skillset from which an agent or IVR system transfers calls. These
DNs all forward calls to one CDN acquired by Contact Center Manager. You can
program these DNs in a speed dial on the agent telephone to facilitate transfers.

Script syntax
DIALED DN

Return type
This intrinsic returns a DN.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 423


Intrinsics Standard 8.05

Example
The following is an example of the DIALED DN intrinsic.
IF CDN = transfer_CDN THEN
IF TRANSFERRED THEN
GIVE RINGBACK
WAIT 20 /*Allow time for transferring party to hang up*/
DISCONNECT
ELSE
WHERE DIALED DN EQUALS
VALUE XXXXXXX: EXECUTE SCRIPT ScriptA
VALUE XXXXXXX: EXECUTE SCRIPT ScriptB
VALUE XXXXXXX: EXECUTE SCRIPT ScriptC
DEFAULT: EXECUTE SCRIPT ScriptD
END WHERE
END IF
END IF

424 Contact Center Manager


December 2007 Intrinsics

DIRECT CALL

The value of this intrinsic indicates if the call is a direct call (where the return
value is True) or not (where the return value is False). Use the DIRECT CALL
intrinsic with phonesets that have the forwarding option.

This intrinsic applies to voice contacts only.

Script syntax
DIRECT CALL

Return type
This intrinsic returns a True or False value to the script.

Example
In this example, all calls that are not direct calls receive a recorded
announcement.
IF NOT DIRECT CALL THEN
GIVE RAN you_were_forwarded_ran_gv
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 425


Intrinsics Standard 8.05

DNIS

The value is the first number that the caller dialed to enter the system.

This intrinsic is called the Dialed Number Identification Service (DNIS) and is
specific to the trunk used. Not all trunks can be configured to support DNIS;
therefore, the DNIS intrinsic is empty for any trunk that is not configured on the
switch to provide DNIS.

This intrinsic applies to voice contacts only.

If you are using Virtual Network Services (VNS) trunks, the DNIS feature is not
supported. This means that a DNIS number cannot be forwarded from one site to
another in a VNS multisite contact center. If you want to send DNIS numbers
from one site to another, you must configure Meridian Customer Defined
Networking (MCDN) between sites.

When used for an incoming network call, the DNIS value is the same as the
value at the source node. The answering agent set can display the original source
DNIS information, as long as the DNIS name and number are programmed in
both the source and target Contact Center Manager (under Switch
Configuration). For more information, see the Administrator’s Guide.

Use the provider.exe tool to verify the DNIS string sent by the switch. Make
sure you generate test calls to different DNIS numbers. For more information,
see “Using HDX” on page 597.

Script syntax
DNIS

Return type
This intrinsic returns a DNIS.

426 Contact Center Manager


December 2007 Intrinsics

Example
In this example, calls are queued to the appropriate skillset depending on the
DNIS.
WHERE DNIS EQUALS
VALUE 5552512: QUEUE TO SKILLSET sales_sk WITH PRIORITY 1
VALUE 5552603: QUEUE TO SKILLSET sales_sk WITH PRIORITY 2
VALUE 5552776: QUEUE TO SKILLSET service_sk WITH PRIORITY 1
DEFAULT: QUEUE TO SKILLSET service_sk WITH PRIORITY 2
END WHERE
WAIT 2
GIVE RAN agents_busy
GIVE MUSIC soft_music
QUIT

Scripting Guide for Communication Server 1000/Meridian 1 PBX 427


Intrinsics Standard 8.05

INTERNATIONAL CALL

The value of this intrinsic indicates whether the call is international (where the
return value is True) or not (where the return value is False).

This intrinsic applies to voice contacts only.

Script syntax
INTERNATIONAL CALL

Return type
This intrinsic returns a True or False value to the script.

Example
The following script gives calls that are identified as international a choice of
languages in which the callers can receive service.
IF INTERNATIONAL CALL THEN
OPEN VOICE SESSION
PLAY PROMPT VOICE SEGMENT choose_language_vs
/* "For service in English, please press 1, followed
by the pound key. For service in French, please
press 2, followed by the pound key. For service in
German, please press 3, followed by the pound
key." */
COLLECT 1 DIGITS INTO language_choice_cv WITH
TERMINATING CHARACTER #
END VOICE SESSION

END IF

428 Contact Center Manager


December 2007 Intrinsics

WITH TERMINATING CHARACTER option


You can specify a terminating character to end the digit collection even if the
maximum number of digits is collected. The terminating character is not
included in the variable with the digits.

Ending digit collection


Digit collection ends under the following conditions:
„ The INTER DIGIT TIMER expires.
„ The terminating character is received.
„ The maximum number of possible digits is reached.
„ An agent becomes available to take the call (if the call is already queued
before digit collection began).

Scripting Guide for Communication Server 1000/Meridian 1 PBX 429


Intrinsics Standard 8.05

LOC

The value is the location code (LOC) number of the call. The LOC is the first
three digits for private network calls.

This intrinsic applies to voice contacts only.

Script syntax
LOC

Return type
This intrinsic returns an LOC.

Example
In this example, calls are played the appropriate recorded announcement based
on the LOC number of the individual call.
WHERE LOC EQUALS
VALUE 512: GIVE RAN marketing_ran_gv
VALUE 603: GIVE RAN sales_ran_gv
VALUE 776: GIVE RAN accounting_ran_gv
DEFAULT: GIVE RAN company_ran_gv
END WHERE

430 Contact Center Manager


December 2007 Intrinsics

NETWORK CALL

The value indicates if the call is a network call (where the return value is True)
or not (where the return value is False). You can use the NETWORK CALL
intrinsic in the network script to restrict local users from dialing network CDNs.

Script syntax
NETWORK CALL

Return type
This intrinsic returns a True or False value to the script.

Example
In this example, if the call is not a network call, the caller receives a recorded
announcement asking the caller to phone the local number.
IF NOT NETWORK CALL THEN
GIVE RAN wrong_number_ran_gv
DISCONNECT
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 431


Intrinsics Standard 8.05

NPA

The value is the number plan area (NPA) or area code of the current call.

This intrinsic applies to voice contacts only.

Script syntax
NPA

Return type
This intrinsic returns an NPA.

Example
This script executes different sections of the script based on the area code of the
caller.
WHERE NPA EQUALS
VALUE 416: EXECUTE Toronto_Section
VALUE 514: EXECUTE Montreal_Section
VALUE 613: EXECUTE Ottawa_Section
DEFAULT: EXECUTE Ontario_Section
END WHERE

432 Contact Center Manager


December 2007 Intrinsics

NXX

The value is the local exchange code (NXX) of the current call.

This intrinsic applies to voice contacts only.

Script syntax
NXX

Return type
This intrinsic returns an NXX.

Example
This script executes different sections of the script based on the local exchange
code of the caller.
WHERE NXX EQUALS
VALUE 491, 492, 493: EXECUTE North_Section
VALUE 290, 291, 293: EXECUTE East_Section
DEFAULT: EXECUTE All_Section
END WHERE

Scripting Guide for Communication Server 1000/Meridian 1 PBX 433


Intrinsics Standard 8.05

NPANXX

The value is the number plan area or area code as well as the local exchange
code (NPANXX) of the current call.

This intrinsic applies to voice contacts only.

Script syntax
NPANXX

Return type
This intrinsic returns an NPANXX.

Example
This script executes different sections of the script based on the area code and
the local exchange code of the caller.
WHERE NPANXX EQUALS
VALUE 416491, 416492, 416493: EXECUTE North_Section
VALUE 416290, 416291, 416293: EXECUTE East_Section
DEFAULT: EXECUTE All_Section
END WHERE

434 Contact Center Manager


December 2007 Intrinsics

ON HOLD

The value indicates whether the call is on hold (where the return value is True)
or not (where the return value is False).

This intrinsic applies to voice contacts only.

Script syntax
ON HOLD

Return type
This intrinsic returns a True or False value to the script.

Example
This script plays music if a call is on hold.
EVENT HANDLER
EVENT CALL ON HOLD: GIVE MUSIC pop_music_gv
END HANDLER

Scripting Guide for Communication Server 1000/Meridian 1 PBX 435


Intrinsics Standard 8.05

QUEUED

The value indicates whether the call is queued in any local skillsets, network
skillsets, or agent queues, or in an NACD queue (where the return value is True)
or not (where the return value is False).

This intrinsic applies to both voice and non-voice contacts.

Script syntax
QUEUED

Return type
This intrinsic returns a True or False value to the script.

Examples

Example 1
This script uses the QUEUED command to avoid an endless loop and ensures
that the initial QUEUE TO SKILLSET command worked.
IF OUT OF SERVICE sales_sk THEN
EXECUTE Help_Me_Now
END IF
QUEUE TO SKILLSET sales_sk WITH PRIORITY 3
WAIT 3
/* This section repeats a recorded announcement every 30 seconds.
It also checks whether the call is queued before playing the
announcement. */
SECTION Play_2nd_RAN
WAIT 30
IF NOT QUEUED THEN
EXECUTE Help_Me_Now
END IF

436 Contact Center Manager


December 2007 Intrinsics

GIVE RAN agents_still_busy_ran_gv


EXECUTE Play_2nd_RAN
SECTION Help_Me_Now
...

Example 2
This example shows the QUEUED intrinsic when the networking option is
enabled and the include local node option is selected. This example is used to
test if a call is queued. The QUEUED intrinsic returns a Boolean value of true if
the call is queued to a skillset (local or network) or an agent.
QUEUE TO NETWORK SKILLSET Sales_SK
WAIT 10
SECTION WaitLoop
IF NOT QUEUED THEN
QUEUE TO NETWORK SKILLSET Service_SK
WAIT 4
EXECUTE WaitLoop2
END IF
WAIT 30
EXECUTE Waitloop
SECTION WaitLoop2
WAIT 10
IF NOT QUEUED THEN
GIVE IVR mmail WITH TREATMENT sorry_closed
DISCONNECT
END IF
EXECUTE Waitloop2

Scripting Guide for Communication Server 1000/Meridian 1 PBX 437


Intrinsics Standard 8.05

ROUTE NUMBER

The value is the route number of the current call. If some routes are more
expensive than others, you can use this intrinsic to ensure that calls from
expensive routes are treated quickly.

This intrinsic applies to voice contacts only.

Script syntax
ROUTE NUMBER

Return type
This intrinsic returns a route number.

Example
In this example, a variable named route_variable_cv represents the route number
of the current call. If the route number of the current call is 321, then the caller
hears a recorded announcement.
ASSIGN ROUTE NUMBER TO route_variable_cv
IF (route_variable_cv = 321) THEN
GIVE RAN calling_californians_ran_gv
END IF

438 Contact Center Manager


December 2007 Intrinsics

TRANSFERRED

The value indicates whether the call is transferred (where the return value is
True) or not (where the return value is False).

The value for the TRANSFERRED intrinsic is True only for the call ID that is
created when you initiate a transfer. When the transfer is complete, the intrinsic
value is False.

This intrinsic applies to voice contacts only.

Script syntax
TRANSFERRED

Return type
This intrinsic returns a True or False value to the script.

Example
In this example, transferred calls receive a recorded announcement (named
please_complete_transfer_ran_gv) that tells the agent to complete the transfer.
That is, the agent who performs the transfer hears the
please_complete_transfer_ran_gv announcement, but the original call (which is
on hold during the transfer) does not. After the transfer is complete, the script
restarts at the top of the master script, and the original caller then hears a
recorded announcement (hello_again_ran_gv) because the TRANSFERRED
intrinsic returns to a false state after transfer completion.
IF TRANSFERRED THEN
SECTION Tranfer_Loop
/*force agent to complete transfer*/
GIVE RAN please_complete_transfer_ran_gv
WAIT 20
EXECUTE Transfer_Loop

Scripting Guide for Communication Server 1000/Meridian 1 PBX 439


Intrinsics Standard 8.05

ELSE
GIVE RAN hello_again_ran_gv
END IF

440 Contact Center Manager


December 2007 Intrinsics

Section E: Open Queue Intrinsics

In this section
Overview 344
AGE OF CONTACT 443
CONTACT DATA 444
CONTACT TYPE 448
ROUTE POINT 450
URI 453

Scripting Guide for Communication Server 1000/Meridian 1 PBX 441


Intrinsics Standard 8.05

Overview

This section on Open Queue intrinsics refers to intrinsics used with third-party
applications. These intrinsics are intended for future PSO & third-party
application developers.

For more information about using these intrinsics and scripting guidelines for
Contact Center Multimedia contacts, see “Scripting for Multimedia and
Outbound”.

442 Contact Center Manager


December 2007 Intrinsics

AGE OF CONTACT

This intrinsic represents the length of time the contact is in the system and is the
non-voice equivalent to AGE OF CALL.

The AGE OF CONTACT intrinsic resets when the DISCONNECT command is


used in a multimedia script because the DISCONNECT command sends the
multimedia contact from Contact Center Multimedia to Contact Center Manager
Server to be requeued.

Script syntax
AGE OF CONTACT

Return type
This intrinsic returns the age of the contact in seconds.

Example
In this example, an e-mail contact receives special handling if the age of the
contact is greater than 500 seconds.
IF CONTACT TYPE = g_EMAIL_gv THEN
IF AGE OF CONTACT > 500 THEN
/* Special Handling */
END IF
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 443


Intrinsics Standard 8.05

CONTACT DATA

Use the CONTACT DATA intrinsic to return specific pieces of custom


information associated with the contact. The intrinsic information is associated
with the contact at time of contact creation and is stored with the contact in key/
value string pairs. To retrieve the intrinsic value, the script must have explicit
knowledge of the name of the intrinsic key.

The CONTACT DATA intrinsic is used with the ASSIGN TO script command.
The value returned by CONTACT DATA is assigned to the variable specified in
the ASSIGN TO command. This is the only supported use of CONTACT DATA.
The CONTACT DATA key name is a string, which returns a string type by
default; however, a specific number of alternative return data types are also
supported. A convention is defined for identifying the specific data types: a
defined string is used in the key name to specify the alternative return type.

Expected data may not be returned in CONTACT DATA. To handle these


conditions, it is good practice to initialize the variable values use to store
CONTACT DATA intrinsic values with suitable defaults in the script.

Script syntax
ASSIGN CONTACT DATA <key name> TO <call variable>

Parameters
<key name>: The string name of the key used to store the intrinsic data. The key
is unique for the specific piece of information. The following strings at the start
of the key name are used to specify alternative return types:
„ %AGENT%
„ %DATE%
„ %INTEGER%
„ %PRIORITY%
„ %SKILLSET%
„ %TIME%

444 Contact Center Manager


December 2007 Intrinsics

These strings are case-insensitive. However, the full key name must exactly
match the key name entered when the contact is created.

<call variable>: A variable of a suitable type to store the value of the key. The
default type for the variable is string. If an alternative data type is specified using
the defined string at the start of the key name, then the type of the variable
should match. Using an inappropriate variable for the returned type results in a
script activation failure because of the incompatible types in the assignment.

Return type
The return type is a string value by default. If the key name starts with a unique
string to represent a data type, then alternative return types are returned.

Unique string Returned data type

%AGENT% Agent ID

%DATE% Date

%INTEGER% Integer

%PRIORITY% Priority

%SKILLSET% Skillset

%TIME% Time

Examples

Example one
This example specifies skillset and priority return types for direct queuing using
information stored with the contact.
ASSIGN CONTACT DATA "%SKILLSET%mySkillset" TO skillset_cv
ASSIGN CONTACT DATA "%PRIORITY%myPriority" TO priority_cv
QUEUE TO SKILLSET skillset_cv WITH PRIORITY priority_cv
WAIT 2

Scripting Guide for Communication Server 1000/Meridian 1 PBX 445


Intrinsics Standard 8.05

Example 2
This example specifies date and time return types for a callback using
information stored with the contact.
ASSIGN CONTACT DATA "%TIME%myTime" TO time_cv
ASSIGN CONTACT DATA "%DATE%myDate" TO date_cv
SECTION wait_loop
IF (((date_cv = DATE)
AND (time_cv > TIME OF DAY))
OR (date_cv > DATE)) THEN
WAIT 60
EXECUTE wait_loop
ELSE
EXECUTE wait_complete
END IF
SECTION wait_complete

Example 3
This example specifies an integer return type defining how long a contact waits
before being queued.
ASSIGN CONTACT DATA "%SKILLSET%mySkillset" TO skillset_cv
ASSIGN CONTACT DATA "%INTEGER%myWaitTime" TO integer_cv
WAIT integer_cv
QUEUE TO SKILLSET skillset_cv
WAIT 2

Example 4
This example specifies an agent return type for direct queuing using information
stored with the contact.
ASSIGN CONTACT DATA "%AGENT%myAgent" TO agent_cv
QUEUE TO AGENT agent_cv
WAIT 2

446 Contact Center Manager


December 2007 Intrinsics

Example 5
This example specifies a string for direct queuing using account type
information stored with the contact.
ASSIGN CONTACT DATA "myAccountType" TO string_cv
WHERE string_cv EQUALS
VALUE "GOLD": QUEUE TO SKILLSET gold_ss
VALUE "PLATINUM": QUEUE TO SKILLSET platinum_ss
VALUE "BRONZE": QUEUE TO SKILLSET bronze_ss
DEFAULT: QUEUE TO SKILLSET general_ss
END WHERE
WAIT 2

Scripting Guide for Communication Server 1000/Meridian 1 PBX 447


Intrinsics Standard 8.05

CONTACT TYPE

This intrinsic returns the contact type of the contact. With the release of Contact
Center Manager Server 6.0, multimedia contacts such as e-mail, Web
communication, outbound, and video can be routed to agents through the
Contact Management Framework using the Communication Control Toolkit.

This intrinsic can also be used to screen contacts and ensure that voice and
multimedia contacts are not using the same scripts or call flows. For example,
you do not want to send an e-mail contact to a voice application or voice agents.
If this happens, contact presentation to the voice agent is rejected (only on run
time).

The current default values for contact type are:


„ Voice
„ E-mail
„ Web Communication
„ Outbound
„ Video

For SIP-enabled contact centers, only voice and video contact types are
supported at this time

Both call variables and global variables can be created for CONTACT TYPE,
which can be system-default contact types or user-defined contact types.

The global variables for these contact type intrinsics are:


„ c_contact_type_voice_gv
„ c_contact_type_email_gv
„ c_contact_type_web_gv
„ c_contact_type_outbound_gv
„ c_contact_type_video_gv

448 Contact Center Manager


December 2007 Intrinsics

Script syntax
CONTACT TYPE

Return type
This intrinsic returns the contact type ID to the script.

Examples

Example 1
In this example, the CONTACT TYPE intrinsic is used to route e-mail contacts.
IF CONTACT TYPE = c_contact_type_email_gv THEN
EXECUTE SCRIPT email_handler
END IF

Example 2
In this example, scripts are executed based on their CONTACT TYPE.
WHERE CONTACT TYPE EQUALS
VALUE c_contact_type_email_gv: EXECUTE SCRIPT email_handler
VALUE c_contact_type_voice_gv: EXECUTE SCRIPT voice_handler
DEFAULT: EXECUTE SCRIPT voice_handler
END WHERE

Scripting Guide for Communication Server 1000/Meridian 1 PBX 449


Intrinsics Standard 8.05

ROUTE POINT

The ROUTE POINT intrinsic represents the anchor point for a contact and is a
multimedia equivalent to the CDN for a voice contact to represent the route
point for all contact types.

The ROUTE POINT is a software-only address you define and acquire in


Contact Center Manager Administration. This intrinsic is mapped in Contact
Center Multimedia to multimedia skillsets. It does not exist in the switch.

This intrinsic is used for filtering in the master script. It executes primary scripts
based on the ROUTE POINT of the contact, rather than just the contact type.

Script syntax
ROUTE POINT

Return type
This intrinsic returns the name of the route point to the script as a string value.

Example
In this example, contacts are first routed based upon their contact types. Voice
contacts are given treatment based upon their CDN, and e-mail and outbound
contacts are given treatment based upon their ROUTE POINT.
/* Title: Master Script */
GIVE RINGBACK
WHERE CONTACT TYPE EQUALS
VALUE c_VOICE_gv: EXECUTE CDNCheck
VALUE c_EMAIL_gv: EXECUTE SCRIPT RoutepointCheck
VALUE c_OUTBOUND_gv: EXECUTE SCRIPT RoutepointCheck
END WHERE
SECTION CDNCheck
WHERE CDN EQUALS

450 Contact Center Manager


December 2007 Intrinsics

VALUE 1001: EXECUTE SCRIPT Cust_Service_Eng


DEFAULT: ROUTE CALL DEFAULT DN
END WHERE
SECTION RoutepointCheck
WHERE ROUTE POINT EQUALS
VALUE "7000": EXECUTE SCRIPT EM_Email_App
VALUE "8000": EXECUTE SCRIPT OB_Outbound_App
DEFAULT: QUIT
END WHERE

/* Primary Script for E-mail Contacts */


ASSIGN CONTACT DATA "%SKILLSET%SKILLSET" TO skillset_cv
ASSIGN CONTACT DATA "PRIORITY%PRIORITY" TO priority_cv
ASSIGN EM_Default_Skillset TO default_skillset_cv
IF NOT OUT OF SERVICE skillset_cv THEN
QUEUE TO SKILLSET skillset_cv WITH PRIORITY priority_cv
WAIT 2
ELSE
IF NOT OUT OF SERVICE default_skillset_cv THEN
QUEUE TO SKILLSET default_skillset_cv WITH PRIORITY
priority_cv
WAIT 2
ELSE
EXECUTE NightCheck
END IF
END IF
QUIT
SECTION NightCheck
WAIT looptimer
IF NOT OUT OF SERVICE skillset_cv THEN
QUEUE TO SKILLSET skillset_cv WITH PRIORITY priority_cv
WAIT 2

Scripting Guide for Communication Server 1000/Meridian 1 PBX 451


Intrinsics Standard 8.05

ELSE
IF NOT OUT OF SERVICE default_skillset_cv THEN
QUEUE TO SKILLSET default_skillset_cv WITH PRIORITY
priority_cv
WAIT 2
ELSE
EXECUTE NightCheck
END IF
END IF
EXECUTE NightCheck

452 Contact Center Manager


December 2007 Intrinsics

URI

Uniform Resource Indentifier (URI) represents the name of the location of an


associated route point. In its current implementation, the URI is a free form
string without validation and does not need to be unique to a route point. Any
useful string can be entered as the URI value. The URI is available to make
routing decisions in the script using the URI intrinsic.

Script syntax
URI

Return type
The URI intrinsic returns a string value representing the URI of a route point.

Example
In this example, a contact is queued to an e-mail skillset if the contact type is e-
mail, if the route point matches the route point global variable, and if the URI
matches the global variable URI.
IF CONTACT TYPE = c_EMAIL_gv THEN
IF ROUTE POINT = g_ROUTEPOINT_gv THEN
IF URI = g_URI_gv THEN
QUEUE TO SKILLSET EM_URI
END IF
END IF

END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 453


Intrinsics Standard 8.05

454 Contact Center Manager


Chapter 12

Script expressions

In this chapter
Overview 456
Logical expressions 457
Mathematical expressions 460
Relational expressions 462
Order of operations 466

Scripting Guide for Communication Server 1000/Meridian 1 PBX 455


Script expressions Standard 8.05

Overview

This chapter describes the expressions that you can use in your scripts to test for
various conditions:
„ logical expressions (for example, NOT, AND, OR)
„ mathematical expressions (for example, multiplication, division, addition,
and subtraction)
„ relational expressions (for example, greater than or less than)

This chapter also explains how to control the order in which operations are
performed.

All expressions in this chapter also apply to multimedia scripting.

456 Contact Center Manager


December 2007 Script expressions

Logical expressions

This section describes the logical expressions that you can use in your scripts to
test for various conditions.

NOT
The NOT expression evaluates a conditional expression and returns a True value
to the script if the expression is False, and a False value if the expression is True.

AND
The AND expression evaluates two or more comparative expressions and
returns a True value to the script if the two expressions are both True, and a
False value if either expression is False.

OR
The OR expression evaluates two or more comparative expressions and returns a
True value to the script if either, or both, of the two expressions are True, and a
False value if both expressions are False.

Examples

Example 1
The BestAir customer service department is open Monday to Friday, from 08:00
a.m. to 06:00 p.m. After 06:00 p.m., and on Saturday and Sunday, the
department is closed.
IF (TIME OF DAY = business_hours_gv)
AND DAY OF WEEK = weekdays_gv) THEN
GIVE RAN open_ran_gv
ELSE
GIVE RAN closed_ran_gv
DISCONNECT

Scripting Guide for Communication Server 1000/Meridian 1 PBX 457


Script expressions Standard 8.05

END IF
The following table illustrates the conditions under which calls are given open
call treatment in Example 1.

Is it between
08:00 a.m.
Is it a and Give open
Expression weekday? 06:00 p.m.? service?

AND yes yes yes

AND yes no no

AND no no no

AND no yes no

Example 2
The BestAir customer service department is open Monday to Friday, from 08:00
a.m. to 06:00 p.m. After 06:00 p.m., and on Saturday and Sunday, the
department is closed.
IF (TIME OF DAY > 18:00) OR (DAY OF WEEK = SATURDAY, SUNDAY) THEN
GIVE RAN closed_ran_gv
DISCONNECT
ELSE
GIVE RAN open_ran_gv
END IF
The following table illustrates the conditions under which callers receive closed
call treatment in Example 2.

Is it after Is it Saturday Play closed


Expression 06:00 p.m.? or Sunday? recording?

OR yes yes yes


OR yes no yes

OR no no no

458 Contact Center Manager


December 2007 Script expressions

Is it after Is it Saturday Play closed


Expression 06:00 p.m.? or Sunday? recording?

OR no yes yes

Example 3
On the 1st and 15th of every month, BestAir has a company-wide meeting that
reduces the number of agents available to answer sales calls from customers.
Therefore, during these meetings, the company plays a recorded announcement
that tells callers that there can be some delay in answering their call. However,
the company does not hold the meetings if the 1st or 15th is Saturday or Sunday.
Regular sales service is available on Saturday or Sunday. This example also
shows how you can combine two expressions (in this case, AND and NOT).
IF (DAY OF MONTH = 1,15)
AND NOT(DAY OF WEEK = SATURDAY, SUNDAY) THEN
GIVE RAN meeting_ran_gv
END IF
The following table illustrates the conditions under which the recording is
played to a caller in Example 3.

Is it the 1st
or 15th day Is it
of the Saturday or Give meeting
Expression month? Sunday? recording?

AND NOT yes yes no

AND NOT yes no yes

AND NOT no no no

AND NOT no yes no

Scripting Guide for Communication Server 1000/Meridian 1 PBX 459


Script expressions Standard 8.05

Mathematical expressions

This section describes the mathematical expressions that you can use in your
scripts to test for different conditions.

Addition

Symbol
+

Description
The Addition expression (plus sign) adds two values of the same type. This
expression can be used with numerical constants, variables, and expressions that
return the data types Integer and Seconds.

Division

Symbol
/

Description
The Division expression (forward slash) divides the first value by the second
value of the same type. This expression can be used with numerical constants,
variables, and expressions that return the data types Integer and Seconds.

If the result of the division is not an integer, the value is truncated, not rounded.
For example, 10.7 becomes 10.

460 Contact Center Manager


December 2007 Script expressions

Multiplication

Symbol
*

Description
The Multiplication expression (asterisk) multiplies two values of the same type.
This expression can be used with numerical constants, variables, and
expressions that return the data types Integer and Seconds.

Subtraction

Symbol

Description
The Subtraction expression (dash) subtracts the second value from the first value
of the same type and can be used with numerical constants, variables, and
expressions that return the data types Integer and Seconds.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 461


Script expressions Standard 8.05

Relational expressions

You can use relational expressions to compare the values of intrinsics, variables,
and constants. The data type on each side of the comparison equation must be
the same for the comparison to be a valid expression. Comparison expressions
are used to evaluate a specific situation. For example, a test of the expression
TIME OF DAY >= 08:00

always yields either a yes (True) or a no (False) answer.

Values that can only be True or False are referred to as Boolean values. The state
of several situations at once (for example, it is later than 08:00, and there is at
least one agent logged on to the skillset) can be evaluated by writing several
comparison expressions, and then joining them into a logical expression
consisting of a series of true or false answers.

Limitations
Some relational expressions can be used only with variables that return integers,
seconds, and dates. For example, although you can determine that a numerical
value greater is than 312, you cannot determine that a skillset is greater than
another skillset.

Equal to (=) and not equal to (< >) can be used for all types of data.

The Greater Than (>), Less Than (<), Greater Than or Equal (> =), and Less
Than or Equal (< = ) expressions can be used only with integers, time, and dates.
These expressions cannot be used with skillsets, DNs, agent IDs, and so on.

Example 1: Incorrect
The following is an example of an invalid use of the Greater Than expression. In
these examples, 1543 is an agent ID.
IF (LONGEST IDLE AGENT gold_card_sk > 1543) THEN
...

Example 2: Correct
The following is an example of a valid use of an expression.

462 Contact Center Manager


December 2007 Script expressions

IF (LONGEST IDLE AGENT gold_card_sk = 1543) THEN


...

Set variables and constants


If you test for a set variable or a constant (for example, a list of values or a range
of values), you can use only the = and < > expressions, and they must be
compared only with an item. That is, you test whether the item has a value that is
in the set.

Example
IF (CLID = 4165355130, 4165355139, 4165355200..4165355300) THEN
...

This example tests whether the CLID is any of these values. The left side of the
comparison is an item (CLID intrinsic), and the right side is a set. In this
example, it is a constant list, including a range, but it can also be a set variable.

Equal

Symbol
=

Description
The Equal expression compares two values of the same type to see if they are
equal or if they are of the same set (list or range).

Scripting Guide for Communication Server 1000/Meridian 1 PBX 463


Script expressions Standard 8.05

Not Equal

Symbol
<>

Description
The Not Equal expression compares two values of the same type to see if the
first value is different from the second value or if the value on the left is not in
the set (list or range) of values on the right.

Greater Than

Symbol
>

Description
The Greater Than expression compares two values of the same type to see if the
first value is greater than the second value.

Less Than

Symbol
<

Description
The Less Than expression compares two values of the same type to see if the
first value is less than the second value.

Greater Than or Equal

Symbol
>=

Description
The Greater Than or Equal expression compares two values of the same type to
see if the first value is greater than or equal to the second value.

464 Contact Center Manager


December 2007 Script expressions

Less Than or Equal

Symbol
<=

Description
The Less Than or Equal expression compares two values of the same type to see
if the first value is less than or equal to the second value.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 465


Script expressions Standard 8.05

Order of operations

When you evaluate conditional expressions, the expression with the highest
precedence (importance) is evaluated first, then the one with the second highest
precedence, and through to the expression with the lowest precedence.

When expressions appear more than once, or when two expressions with equal
importance appear in the same expression, they are evaluated from left to right.

Expressions in conditional expressions are evaluated in the following order:


„ parentheses ( )
„ multiplication * and division /
„ addition + and subtraction –
„ comparison expressions =, < >, >, <, > =, < =
„ logical expressions NOT, AND, OR
„ left to right

The expression NOT has precedence over the AND and OR expressions.

If an expression contains parentheses, the partial expression within the


parentheses is resolved first. Then multiplications are resolved, followed by
additions, subtractions, comparison expressions, logical expressions, and left to
right.

Example
Compare the results of the following calculations that have the parentheses in
different places:

2 * 3 + 2 * 3 = 12

2 * (3 + 2 * 3) = 18

(2 * 3 + 2) * 3 = 24

(2 * 3) + (2 * 3) = 12

466 Contact Center Manager


Chapter 13

Applications

In this chapter
Overview 468
Applications and application thresholds 469

Scripting Guide for Communication Server 1000/Meridian 1 PBX 467


Applications Standard 8.05

Overview

This chapter describes the following topics:


„ how to view the list of applications that are defined on the system
„ how to create new application thresholds
„ how to view the thresholds assigned to an application
„ how to change the threshold class assigned to an application

What is an application ID?


An application ID is a unique identifier of a master or primary script.
Application IDs exist for the master script and for every primary script that it
references. Contact Center Manager assigns a numerical application ID to each
script.
Application IDs identify the script from which call information is collected for
reporting. Because a call can pass through many scripts, calls are tracked by the
application ID of the primary script that they enter from the master script.
Contact Center Manager collects information and provides reports for
applications to give contact center managers specific details about call types,
callers, or conditions.

ATTENTION
If you try to activate more primary scripts than the maximum
number of applications configured for your system, the
activation request is denied. This control prevents Contact
Center Manager from tracking call information. You can
reduce the number of primary scripts or you can increase the
number of applications configured for your server to ensure
that all primary scripts can be activated. The maximum
number of applications you can configure for Contact Center
Manager is 505 (including system scripts).

468 Contact Center Manager


December 2007 Applications

Applications and application thresholds

Use the Scripting window in Contact Center Manager Administration to view


the list of applications defined on your system. From this window, you can also
access the Application Thresholds, where you can view the name and the
thresholds that apply to an application and you can change the threshold class
assigned to it.

An application threshold can be applied to one or multiple applications. There is


no one-to-one relationship as long as threshold parameters apply to the
application.

What is a threshold class?


There are two types of threshold classes: display and pegging.

A display threshold class specifies the fields that apply to an application that you
use in a real-time display. For display threshold classes, you can set the level 1
(low) and level 2 (high) threshold values. In the real-time display, a statistic
changes color if it falls below the level 1 value or if it exceeds the level 2 value.

A pegging threshold class applies only to historical reports. For pegging


threshold classes, you define only the level 1 (low) value. This value represents
the cut-off limit for statistics such as short calls, or the delay time before a call is
answered or disconnected. When this level is exceeded, the system logs the
statistics. You can generate a report in the Historical Reporting component
detailing these statistics.

Example
A service level threshold is set at 20 seconds, which means that if a call is
answered or disconnected after 20 seconds, the service level objective is not met.

A caller waits for 21 seconds, and then the call is answered. The call is pegged
as Answered After Threshold.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 469


Applications Standard 8.05

To view applications
1 In Contact Center Manager Administration, open the Scripting window .
2 Expand the system tree in the Scripting window.
3 Click the appropriate server.
Result: The Script Manager appears with the expanded server.

470 Contact Center Manager


December 2007 Applications

4 In the left pane, select Application Thresholds.


Result: The Application Thresholds window appears. This window lists all
of the applications defined on your system.

5 Select the application that you want to view.

Application threshold classes must be created in the Threshold Classes window


in the Configuration component of Contact Center Manager Administration
before they can be applied to an application.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 471


Applications Standard 8.05

To create a new application threshold


1 From the Contact Center Manager Administration Launchpad, choose
Configuration.
Result: The Configuration window appears.

2 Expand the desired server.

472 Contact Center Manager


December 2007 Applications

3 Select the Threshold Classes folder.


Result: The Threshold Classes window appears.

4 In the Threshold Classes window, enter the name of the new threshold
class.
5 From the Type list, select the type Application.
Result: The application threshold class is automatically created.
. Select the application thresholds for the threshold class from the re

6 In the Thresholds window, choose the thresholds for the new application
threshold.
Result: The new application threshold class can now be applied to
applications in the Scripting component of Contact Center Manager
Administration.

You can see which threshold class is assigned to every application on a server
and you can view the threshold levels defined within the threshold class.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 473


Applications Standard 8.05

To view the thresholds assigned to an application


1 From the system tree in Scripting, expand the server on which the
application is located.
Result: The server expands to reveal a choice of folders.
2 Click the Application Thresholds folder.
Result: The Application Thresholds window appears.

Tip: If you require access to application thresholds but do not see this
folder, you do not have access to application thresholds under the selected
server. Contact your administrator and request Application Thresholds
access.
3 From the list of applications in the left-hand pane of the window, click the
desired application.
Result: The threshold class that is assigned to the application appears in
the list in the right-hand pane and the threshold class values appear in the
table below it.

474 Contact Center Manager


December 2007 Applications

You can change the statistic threshold values and enable or disable statistics in
an application threshold class.

ATTENTION
One threshold class can be assigned to multiple applications on a
server. When you edit a threshold class, your changes apply to
all applications to which it is assigned.

To edit application threshold classes


1 From the system tree in Scripting, select the server on which you want to
edit the application threshold class.
Result: The server expands to reveal a choice of folders.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 475


Applications Standard 8.05

2 Click the Application Thresholds folder.


Result: The Application Thresholds window appears.

Tip: If you require access to application thresholds but do not see this
folder, you do not have access to application thresholds under the selected
server. Contact your administrator and request Application Thresholds
access.
3 In the right-hand pane, from the list, select the threshold class that you
want to change.
Result: The threshold class attributes appear in the table.
4 To change the statistic threshold values:
a. Type the new Level 1 and Level 2 levels beside the statistic that you
want to change.
Tip: For a display threshold, type the value for the low end of the normal
range in the Level 1 box; type the value for the high end of the normal
range in the Level 2 box. For a pegging threshold, in the Level 1 box, type
the upper limit value for this statistic.
b. Press Tab to save your changes.

476 Contact Center Manager


December 2007 Applications

5 To enable statistics:
a. In the Enabled column, select the check box beside the statistics that
you want to add to the threshold class.
b. Select the Level 1 and Level 2 threshold levels for the statistics that you
add.
Tip: For a display threshold, type the value for the low end of the normal
range in the Level 1 box; type the value for the high end of the normal
range in the Level 2 box. For a pegging threshold, in the Level 1 box, type
the upper limit value for this statistic.
c. Press Tab to save your changes.
6 To disable statistics, clear the Enabled check box beside the statistics that
you want to remove from the threshold class.
Result: The system automatically removes the statistic from the threshold
class.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 477


Applications Standard 8.05

478 Contact Center Manager


Chapter 14

Using sample scripts

In this chapter
Overview 480
Section A: Getting started with sample scripts 481
Section B: Common scripts 493
Section C: Network Skill-Based Routing scripts 523
Section D: Nodal Routing examples 533

Scripting Guide for Communication Server 1000/Meridian 1 PBX 479


Using sample scripts Standard 8.05

Overview

Nortel provides sample scripts with Contact Center Manager to get you started
on your server scripts.

Section A: “Getting started with sample scripts,” on page 481, explains how to
create the initial scripts that you must get started and how to edit the master
script.

The remaining sections list the sample scripts that are included with Contact
Center Manager Administration software and provide a brief explanation of
what each script does.

You can also import sample scripts into the Web Scripts Editor, and then copy
the sections that you need into your own scripts. For more information, see
“Importing scripts into Contact Center Manager” on page 168.

The variables used in the sample scripts are examples only. If you use a sample
script that contains variables, you must create and define the variables on your
system. For more information, see “Creating script variables” on
page 109.

Advanced commands
Some sample scripts use advanced commands. With the release of Contact
Center Manager, only packages 200 and 300 are available. Package 200 contains
all commands except for networking commands. Package 300 contains all
commands. For a list of advanced commands that you can use in Contact Center
Manager, see “Advanced script commands” on page 245.

480 Contact Center Manager


December 2007 Using sample scripts

Section A: Getting started with sample


scripts

In this section
Overview 482
Creating the initial scripts 484
Editing the master script 490

Scripting Guide for Communication Server 1000/Meridian 1 PBX 481


Using sample scripts Standard 8.05

Overview

This section describes how to begin using sample scripts.

Before you begin


Before you begin using sample scripts, Contact Center Manager must be
installed and configured. In addition, all system resources such as RAN routes,
music routes, voice ports, call treatments, DNs, and IVR DNs must be set up.
For more information about setting up these resources, see the Contact Center,
Communication Server 1000/Meridian 1 PBX and Voice Processing Guide.

All variables, agents, and skillsets also must be created. For more information
about creating agents and skillsets, see the Nortel Contact Center Manager
Administrator’s Guide.

If you plan to use voice prompts in your scripts, all voice segments must be
created using the Voice Prompt Editor for Meridian Mail and Application
Builder for CallPilot.

For more information about Voice Prompt Editor, see the Nortel Contact Center
Manager Administrator’s Guide. For more information about Application
Builder, see the CallPilot Application Builder Guide.

Variables
The variables used in the sample scripts are examples only. If you use a sample
script that contains variables, you must create and define the variables on your
system. For more information, see “Creating script variables” on page 109.

482 Contact Center Manager


December 2007 Using sample scripts

Steps to take
After you configure your system and create all of the variables that you need,
complete the following procedures:
„ “Creating the initial scripts” on page 484
„ “Editing the master script” on page 490

When you complete these procedures, you can test the scripts by placing calls to
your contact center.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 483


Using sample scripts Standard 8.05

Creating the initial scripts

This section explains how to create initial scripts from the sample scripts
provided with Contact Center Manager. Create these scripts to test how calls are
handled when they arrive at Contact Center Manager.

The sample scripts directory contains a subdirectory named routing examples.


This directory contains three types of scripts (master, primary, and secondary)
that must reference each other to function correctly. You must create and
activate one master script, one primary script, and one secondary script to begin
testing call routing in your contact center.

To begin using the routing sample scripts on your system, perform the procedure
in this section to create the following scripts:
„ c_Primary_One
„ c_Common_Secondary

484 Contact Center Manager


December 2007 Using sample scripts

Creating and validating initial scripts


1 Open the Scripting window.
2 Expand the system tree in the Scripting window.
3 Click the appropriate server.
4 Right-click Script Manager and select New.
Result: The Web Scripts Editor appears.

5 Choose File > Import.


Result: A dialog box appears prompting you for the location of the script
that you want to import.
6 Select From Server.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 485


Using sample scripts Standard 8.05

7 From the server list, expand the folder list to SampleScripts > CS1000
(M1)_samples > Routing_Examples > Nodal Examples > Secondary.

Tip: By importing the secondary script first, you ensure that validation does
not fail when validating the primary script because the primary script
references the secondary script.
8 Select the secondary script that you want to create. For example, select the
script c_common_secondary.s.
9 Click OK to import the script.
10 From the Web Scripts Editor, choose File > Save.
Result: A dialog box appears prompting you to save the script to the
server.
11 Click Yes.
Result: The New Script Name dialog box appears.
12 Enter the name of the sample script. Do not enter the file extension.
13 Click OK.

486 Contact Center Manager


December 2007 Using sample scripts

14 From the Web Scripts Editor, choose Edit > Validate.


Tip: If the validation fails, it may be because of a missing variable or a
variable of the wrong type. To find which variables you need for each script,
see the script that you want to use in the following sections.
15 From the Web Scripts Editor, choose File > New to create a primary script.
Result: A confirmation message asks “Are you sure that you want to start
with a new script?”
16 Click Yes.
Result: A blank Web Scripts Editor page appears.

17 Choose File > Import.


Result: A dialog box appears prompting you for the location of the script
that you want to import.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 487


Using sample scripts Standard 8.05

18 From the server list, expand the folder list to SampleScripts > CS1000
(M1)_samples > Routing_Examples > Nodal Examples > Primary.

19 Select the primary sample script that you want to create. For example,
select the script c_primary_one.s.
20 Click OK to import the script.
21 From the Web Scripts Editor, choose File > Save.
Result: A dialog box appears prompting you to save the script to the
server.
22 Click Yes.
Result: The New Script Name dialog box appears.

23 Enter the name of the sample script. Do not enter the file extension.

488 Contact Center Manager


December 2007 Using sample scripts

24 Click OK.
25 From the Web Scripts Editor, choose Edit > Validate.
Tip: If the validation fails, it can be because of a missing variable or a
variable of the wrong type. To find which variables you need for each script,
see the script that you want to use in the following sections.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 489


Using sample scripts Standard 8.05

Editing the master script

This section explains how to import the contents of the sample script
c_Master_with_Exception_Checks into a new script. The script you create
serves as the master script for Contact Center Manager.

Editing the master script


1 Open the Scripting window.
2 Expand the system tree in the Scripting window.
3 Click the appropriate server.
Result: The Script Manager appears.

490 Contact Center Manager


December 2007 Using sample scripts

4 Double-click Master_Script.
Result: The Web Scripts Editor page appears.

5 Choose File > Import.


Result: A dialog box appears prompting you for the location of the script
you want to import.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 491


Using sample scripts Standard 8.05

6 From the server list, expand the folder list to SampleScripts > CS1000
(M1)_samples > Routing_Examples > Nodal Examples > Master.

7 Select c_Master_with_Exception_Checks.s.
8 Click OK to import the script.
9 From the Web Scripts Editor page, choose File > Activate.
Result: The script is automatically validated. If the validation fails, it may be
because of a missing variable, a variable of the wrong type, or a dependent
script that is not validated. Also, ensure that the master script references
the correct primary script name. To find which variables you need for each
script, see the script that you want to use in the following sections.
The c_Primary_One and c_Common_Secondary scripts are automatically
activated.
You can now test your scripts by placing a call to Contact Center Manager.

492 Contact Center Manager


December 2007 Using sample scripts

Section B: Common scripts

In this section
Overview 494
c_Basic 495
c_Basic_Backup_Skillset 497
c_Emergency_Boolean 500
c_Emergency_Skillset_Check 504
c_Excess_Call_Volume_Give_Busy 507
c_Expected_Wait_Message 509
c_Forced_Announcement 514
c_Holiday_Broadcast_Announcement 516
c_Priority_in_Queue_DNIS 519

Scripting Guide for Communication Server 1000/Meridian 1 PBX 493


Using sample scripts Standard 8.05

Overview

Contact Center Manager provides nine common scripts that you can use in your
contact center. The sample scripts are in the directory C:\Program Files\Nortel
Networks\WClient\Server\SampleScripts. The sample scripts serve as primary
scripts. You do not need to reference any scripts to test call routing in your
contact center when you use these scripts, but all variables used in the sample
scripts must be defined before you validate the scripts.

494 Contact Center Manager


December 2007 Using sample scripts

c_Basic

Function
In this script, a test determines if the contact center is closed because the day is a
holiday, Saturday or Sunday, or if the time is after business hours. If the contact
center is open and agents with the required skillset are available to answer the
call, it is queued to the skillset, and the caller hears a recorded announcement
followed by music.

While the caller is waiting, the call is repeatedly checked to determine if it is still
queued. If not, a test determines if agents are still logged on to the skillset. If all
agents are logged off, the caller hears a recorded announcement and is
disconnected; otherwise, the call is requeued to the skillset.

Script text
/* Title: c_Basic
Note: Replace skillset_sk with the desired skillset name.

Global Variable List: Variable Type:


1. holidays_gv - DATE (holiday dates)
2. weekend_gv - DAY (contains Saturday
and Sunday)
3. closed_hours_gv - TIME (value for closed
hours)
4. first_ran - RAN (RAN route for first
announcement)
5. second_ran - RAN (RAN route for second
announcement)
6. closed_ran - RAN (RAN route for night
announcement)
7. dayclosed_ran - RAN (RAN route for day
closed announcement)
8. treatment_timer_gv - SECONDS (delay time for wait)
9. music_route - MUSIC (route number for
music)

Scripting Guide for Communication Server 1000/Meridian 1 PBX 495


Using sample scripts Standard 8.05

*/
IF (DATE = holidays_gv)
OR (DAY OF WEEK = weekends_gv)
OR (TIME OF DAY = closed_hours_gv) THEN
GIVE RAN closed_ran
DISCONNECT
END IF

IF OUT OF SERVICE skillset_sk THEN


GIVE RAN dayclosed_ran
DISCONNECT
END IF

QUEUE TO SKILLSET skillset_sk


WAIT 2 /* Allow time in case an agent is available */
GIVE RAN first_ran
GIVE MUSIC music_route

SECTION WaitLoop
WAIT treatment_timer_gv
IF NOT QUEUED THEN
IF OUT OF SERVICE skillset_sk THEN
GIVE RAN dayclosed_ran
DISCONNECT
ELSE
QUEUE TO SKILLSET skillset_sk
WAIT 2 /* Allow time in case an agent is
available */
END IF
END IF
GIVE RAN second_ran
EXECUTE WaitLoop

496 Contact Center Manager


December 2007 Using sample scripts

c_Basic_Backup_Skillset

Function
In this script, a test determines if the contact center is closed because the day is a
holiday, Saturday or Sunday, or if the time is after business hours. If the contact
center is open and agents with the required skillset are available to answer the
call, it is queued to the skillset, and the caller hears a recorded announcement
followed by music.

After 10 seconds, a test determines if agents are still logged on to the skillset.
While the caller is waiting, the call is repeatedly checked to determine if it is still
queued. If not, a test determines if agents are logged on to the backup skillset. If
all agents in the backup skillset are logged off, the caller hears a recorded
announcement and is disconnected; otherwise, the call is requeued to the
skillset.

Script text
/* Title: c_Basic_Backup_Skillset
Note: Replace skillset_sk and backup_skillset_sk with the desired
skillset names.

Global Variable List: Variable Type:


1. holidays_gv - DATE (holiday dates)
2. weekend_gv - DAY (contains Saturday
and Sunday)
3. closed_hours_gv - TIME (value for closed
hours)
4. first_ran - RAN (audio route for
first announcement)
5. second_ran - RAN (audio route for
second announcement)
6. closed_ran - RAN (audio route for
night announcement)
7. dayclosed_ran - RAN (audio route for day
closed announcement)

Scripting Guide for Communication Server 1000/Meridian 1 PBX 497


Using sample scripts Standard 8.05

8. treatment_timer_gv - SECONDS (delay time for wait)


9. music_route - MUSIC (audio route number
for music)
*/

IF (DATE = holidays_gv)
OR (DAY OF WEEK = weekend_gv)
OR (TIME OF DAY = closed_hours_gv) THEN
GIVE RAN closed_ran
DISCONNECT
END IF

IF OUT OF SERVICE skillset_sk THEN


GIVE RAN dayclosed_ran
DISCONNECT
END IF

QUEUE TO SKILLSET skillset_sk


WAIT 2 /* Allow time in case an agent is available */
GIVE RAN first_ran
GIVE MUSIC music_route
WAIT 10

IF NOT OUT OF SERVICE backup_skillset_sk THEN


QUEUE TO SKILLSET backup_skillset_sk
WAIT 2
END IF

SECTION WaitLoop
WAIT treatment_timer_gv
IF NOT QUEUED THEN
IF OUT OF SERVICE skillset_sk THEN

498 Contact Center Manager


December 2007 Using sample scripts

IF OUT OF SERVICE backup_skillset_sk THEN


GIVE RAN dayclosed_ran
DISCONNECT
ELSE
QUEUE TO SKILLSET backup_skillset_sk
WAIT 2
END IF
ELSE
QUEUE TO SKILLSET skillset_sk
WAIT 2 /*Allow time in case an agent is
available*/
END IF
END IF
GIVE RAN second_ran
EXECUTE WaitLoop

Scripting Guide for Communication Server 1000/Meridian 1 PBX 499


Using sample scripts Standard 8.05

c_Emergency_Boolean

Function
In this script, a test determines if there is an emergency in the contact center. If
so, callers receive a recorded announcement and are disconnected. If there is no
emergency, and agents with the required skillset are available to answer the call,
it is queued to that skillset.

While the caller is waiting, the call is repeatedly checked to determine if it is still
queued, and the caller hears a series of recorded announcements. If the call is
still in a queue after all recorded announcements play, the caller receives a
message stating that all agents are busy, and the call remains in a queue.

Script text
/* Title: c_Emergency_Boolean
Note: Replace skillset_sk with desired skillset name.

Global Variable List: Variable Type:


1. emergency_gv - BOOLEAN (true or false)
2. mmail_gv - ACD (Meridian Mail queue)
3. msg_emerg_gv - TREATMENT DN (message
programmed in Meridian Mail)
4. reps_busy_gv - TREATMENT DN (message
programmed in Meridian Mail)
5. tip1_msg_gv - TREATMENT DN (message
programmed in Meridian Mail)
6. tip2_msg_gv - TREATMENT DN (message
programmed in Meridian Mail)
7. still_busy_msg2_gv - TREATMENT DN (message
programmed in Meridian Mail)
8. day_closed_msg_gv - TREATMENT DN message
programmed in Meridian Mail)
8. music_soft - MUSIC (route for music)
*/

500 Contact Center Manager


December 2007 Using sample scripts

IF emergency_gv THEN
GIVE IVR mmail_gv WITH TREATMENT msg_emerg_gv
DISCONNECT
END IF

IF OUT OF SERVICE skillset_sk THEN


EXECUTE DayClosed
END IF

QUEUE TO SKILLSET skillset_sk


WAIT 2
GIVE IVR INTERRUPTIBLE mmail_gv WITH TREATMENT reps_busy_gv
GIVE MUSIC music_soft

SECTION General
WAIT 45
IF NOT QUEUED THEN
IF OUT OF SERVICE skillset_sk THEN
EXECUTE DayClosed
ELSE
QUEUE TO SKILLSET skillset_sk
WAIT 2
END IF
END IF
GIVE IVR INTERRUPTIBLE mmail_gv WITH TREATMENT tip1_msg_gv
WAIT 60
IF NOT QUEUED THEN
IF OUT OF SERVICE skillset_cv THEN
EXECUTE DayClosed
ELSE
QUEUE TO SKILLSET skillset_cv

Scripting Guide for Communication Server 1000/Meridian 1 PBX 501


Using sample scripts Standard 8.05

WAIT 2
END IF
END IF
GIVE IVR INTERRUPTIBLE mmail_gv WITH TREATMENT
still_busy_msg2_gv
WAIT 90
IF NOT QUEUED THEN
IF OUT OF SERVICE skillset_cv THEN
EXECUTE DayClosed
ELSE
QUEUE TO SKILLSET skillset_cv
WAIT 2
END IF
END IF
GIVE IVR INTERRUPTIBLE mmail WITH TREATMENT tip2_msg_gv
WAIT 60
EXECUTE ClosedCheckLoop

SECTION ClosedCheckLoop
IF NOT QUEUED THEN
IF OUT OF SERVICE skillset_sk THEN
EXECUTE DayClosed
ELSE
QUEUE TO SKILLSET skillset_sk
WAIT 2
END IF
END IF
GIVE IVR INTERRUPTIBLE mmail_gv WITH TREATMENT
still_busy_msg2_gv
WAIT 180
EXECUTE ClosedCheckLoop

502 Contact Center Manager


December 2007 Using sample scripts

SECTION DayClosed
GIVE IVR mmail_gv WITH TREATMENT day_closed_msg_gv
DISCONNECT

Scripting Guide for Communication Server 1000/Meridian 1 PBX 503


Using sample scripts Standard 8.05

c_Emergency_Skillset_Check

Function
In this script, a test determines if the contact center is closed because the day is a
holiday, Saturday or Sunday, or if the time is after business hours. If so, the
caller hears a recorded announcement and is disconnected. If the contact center
is not closed, a test determines if there is an emergency in the contact center. If
so, the caller hears a recorded announcement and is disconnected.

If the contact center is open, there is no emergency, and agents with the required
skillset are available to answer the call, it is queued to the skillset.

While the caller is waiting, the call is repeatedly checked to determine if it is still
queued. If not, a test determines if agents are still logged on to the skillset. If all
agents are logged off, the caller hears a recorded announcement and is
disconnected; otherwise, the call is requeued to the skillset. If the call is
requeued, a test is repeatedly performed to determine if an emergency was
declared while the caller waits in a queue.

Script text
/* Title: c_Emergency_Skillset_Check
Note: Replace skillset_sk with the desired skillset name.

Global Variable List: Variable Type:


1. holidays_gv - DATE (holiday dates)
2. weekend_gv - DAY (contains Saturday
and Sunday)
3. closed_hours_gv - TIME (value for closed
hours)
4. emergency_ran - RAN (RAN route for
emergency
announcement)
5. first_ran - RAN (RAN route for first
announcement)

504 Contact Center Manager


December 2007 Using sample scripts

6. second_ran - RAN (RAN route for second


announcement)
7. closed_ran - RAN (RAN route for night
announcement)
8. dayclosed_ran - RAN (RAN route for day
closed announcement)
9. treatment_timer_gv - SECONDS (delay time for wait)
10. music_route - MUSIC (route number for
music)
*/
IF (DATE = holidays_gv)
OR (DAY OF WEEK = weekend_gv)
OR (TIME OF DAY = closed_hours_gv) THEN
GIVE RAN closed_ran
DISCONNECT
END IF

IF NOT OUT OF SERVICE emergency_sk THEN


GIVE RAN emergency_ran
DISCONNECT
END IF

IF OUT OF SERVICE skillset_sk THEN


GIVE RAN dayclosed_ran
DISCONNECT
END IF

QUEUE TO SKILLSET skillset_sk


WAIT 2 /* Allow time in case an agent is available */
GIVE RAN first_ran
GIVE MUSIC music_route

SECTION WaitLoop

Scripting Guide for Communication Server 1000/Meridian 1 PBX 505


Using sample scripts Standard 8.05

WAIT treatment_timer_gv
IF NOT OUT OF SERVICE emergency_sk THEN
GIVE RAN emergency_ran
DISCONNECT
END IF
IF NOT QUEUED THEN
IF OUT OF SERVICE skillset_sk THEN
GIVE RAN dayclosed_ran
DISCONNECT
ELSE
QUEUE TO SKILLSET skillset_sk
WAIT 2 /* Allow time in case an agent is
available */
END IF
END IF
GIVE RAN second_ran
EXECUTE WaitLoop

506 Contact Center Manager


December 2007 Using sample scripts

c_Excess_Call_Volume_Give_Busy

Function
In the following script, a test determines if the contact center capacity to handle
calls exceeds the specified threshold. If so, callers receive a busy treatment;
otherwise, the call is queued to the specified skillset.

Script text
/* Title: c_Excess_Call_Volume_Give_Busy

Global Variable List: Variable Type:


1. holidays_gv - DATE (holiday dates)
2. weekend_gv - DAY (contains Saturday
and Sunday)
3. closed_hours_gv - TIME (value for closed
hours)
4. skillset_threshold_gv - INTEGER (value for set
hreshold)
5. first_ran - RAN (RAN route for first
announcement)
6. second_ran - RAN (RAN route for second
announcement)
7. closed_ran - RAN (RAN route for night
announcement)
8. dayclosed_ran - RAN (RAN route for day
closed announcement)
9. treatment_timer_gv - SECONDS (delay time for wait)
10.music_route - MUSIC (route number for
music)
*/
IF (DATE = holidays_gv)
OR (DAY OF WEEK = weekend_gv)
OR (TIME OF DAY = closed_hours_gv) THEN

Scripting Guide for Communication Server 1000/Meridian 1 PBX 507


Using sample scripts Standard 8.05

GIVE RAN closed_ran


DISCONNECT
END IF

IF OUT OF SERVICE skillset_sk THEN


GIVE RAN dayclosed_ran
DISCONNECT
END IF

IF (QUEUED COUNT skillset_sk > skillset_threshold_gv) THEN


GIVE BUSY
END IF

QUEUE TO SKILLSET skillset_sk


WAIT 2 /* Allow time in case an agent is available */
GIVE RAN first_ran
GIVE MUSIC music_route

SECTION WaitLoop]
WAIT treatment_timer_gv
IF NOT QUEUED THEN
IF OUT OF SERVICE skillset_sk THEN
GIVE RAN dayclosed_ran
DISCONNECT
ELSE
QUEUE TO SKILLSET skillset_sk
WAIT 2 /* Allow time in case an agent is
available */
END IF
END IF
GIVE RAN second_ran
EXECUTE WaitLoop

508 Contact Center Manager


December 2007 Using sample scripts

c_Expected_Wait_Message

Function
In this script, a test determines if the contact center is closed because the day is a
holiday, Saturday or Sunday, or if the time is after business hours. If the contact
center is open and agents with the required skillset are available to answer the
call, it is queued to the skillset.

The script then calculates the time callers can expect to wait before their call is
answered. If the expected wait time is less than 1 minute, the caller hears a
recorded announcement stating that there is a short delay before the call is
answered. If the expected wait time is more than 15 minutes, the caller hears a
recorded announcement stating that there is a long delay before the call is
answered.

The caller is then informed of the expected wait time before the call is answered.
If this time is exceeded, the caller hears a message apologizing for the delay.

Script text
/* Title: c_Expected_Wait_Message
Note: Replace skillset_sk with the desired skillset name.

Global Variable List: Variable Type:


1. holidays_gv - DATE (holiday dates)
2. weekend_gv - DAY (contains Saturday
and Sunday)
3. closed_hours_gv - TIME (value for closed
hours)
4. night_ran - RAN (RAN route for
announcement)
5. emergency_ran - RAN (RAN route for
announcement)
6. short_delay_ran - RAN (RAN route for
announcement)

Scripting Guide for Communication Server 1000/Meridian 1 PBX 509


Using sample scripts Standard 8.05

7. agents_busy_ran - RAN RAN route for


announcement)
8. dayclosed_ran - RAN (RAN route for
announcement)
9. long_wait_message_vs - VOICE SEGMENT (file & segment
containing message)
10.exp_wait_greeting_vs - VOICE SEGMENT (file & segment
containing message)
11.minutes_vs - VOICE SEGMENT (file & segment
containing message)
12.please_hold_vs - VOICE SEGMENT (file & segment
containing message)
13.exp_wait_apology_vs - VOICE SEGMENT (file & segment
containing message)
14.loop_time_gv - SECONDS (delay time for wait)
15.soft_music - MUSIC (route number for
music)

Call Variable List: Variable Type:


1. expwait_rounded_mins_cv - INTEGER
*/

IF (DATE = holidays_gv)
OR (DAY OF WEEK = weekend_gv)
OR (TIME OF DAY = closed_hours_gv) THEN
GIVE RAN night_ran
DISCONNECT
END IF

IF OUT OF SERVICE skillset_sk THEN


GIVE RAN emergency_ran
DISCONNECT
END IF

QUEUE TO SKILLSET skillset_sk

510 Contact Center Manager


December 2007 Using sample scripts

WAIT 2

ASSIGN ((EXPECTED WAIT TIME skillset_sk + 30)/60) TO


expwait_rounded_mins_cv

IF expwait_rounded_mins_cv < 1 THEN /* rounded minutes used*/


GIVE RAN short_delay_ran
WAIT 2
GIVE MUSIC soft_music
EXECUTE WaitLoop
END IF

IF expwait_rounded_mins_cv >= 15 THEN /* rounded minutes used*/


GIVE CONTROLLED BROADCAST ANNOUNCEMENT
PLAY PROMPT VOICE SEGMENT long_wait_message_vs
WAIT 2
GIVE MUSIC soft_music
WAIT 40
GIVE RAN agents_busy_ran
EXECUTE WaitLoop
END IF

OPEN VOICE SESSION


PLAY PROMPT VOICE SEGMENT exp_wait_greeting_vs
NUMBER expwait_rounded_mins_cv
VOICE SEGMENT minutes_vs
VOICE SEGMENT please_hold_vs
END VOICE SESSION
WAIT 2
GIVE MUSIC soft_music
WAIT 40
GIVE RAN agents_busy_ran

Scripting Guide for Communication Server 1000/Meridian 1 PBX 511


Using sample scripts Standard 8.05

SECTION CheckAge
WAIT loop_time_gv
IF NOT QUEUED THEN
IF OUT OF SERVICE skillset_sk THEN
EXECUTE DayClosed
ELSE
QUEUE TO SKILLSET skillset_sk
WAIT 2
END IF
END IF
IF AGE OF CALL > (expwait_rounded_mins_cv * 60) THEN
/*need to convert to secs*/
GIVE CONTROLLED BROADCAST ANNOUNCEMENT
PLAY PROMPT VOICE SEGMENT exp_wait_apology_vs
EXECUTE WaitLoop
END IF
EXECUTE CheckAge

SECTION WaitLoop
WAIT loop_time_gv
IF NOT QUEUED THEN
IF OUT OF SERVICE skillset_sk THEN
EXECUTE DayClosed
ELSE
QUEUE TO SKILLSET skillset_sk
WAIT 2
END IF
END IF
EXECUTE WaitLoop

SECTION DayClosed

512 Contact Center Manager


December 2007 Using sample scripts

GIVE RAN dayclosed_ran


DISCONNECT

Scripting Guide for Communication Server 1000/Meridian 1 PBX 513


Using sample scripts Standard 8.05

c_Forced_Announcement

Function
In this script, a test determines if agents with the required skillset are available to
answer the call. If so, the caller hears an entire recorded announcement, and the
call is then queued to the skillset.

While the caller is waiting, the call is repeatedly checked to determine if it is still
queued. If not, a test determines if agents are still logged on to the skillset. If all
agents are logged off, the call is routed to a mailbox and the caller is asked to
leave a recorded message. If agents are available to answer the call, it is
requeued to the skillset.

Script text
/* Title: c_Forced_Announcement

Global Variable List: Variable Type:


1. holidays_gv - DATE (holiday dates)
2. weekend_gv - DAY OF WEEK (contains
Saturday and Sunday)
3. closed_hours_gv - TIME (value for closed hours)
4. first_ran - RAN (RAN route for
announcement)
5. second_ran - RAN (RAN route for
announcement)
6. closed_ran - RAN (RAN route for
announcement)
7. dayclosed_ran - RAN (RAN route for
announcement)
8. music_route - MUSIC (route number for music)
9. treatment_delay_gv - SECONDS (delay time for wait)
10. mailbox_gv - DN (value of voice system)

514 Contact Center Manager


December 2007 Using sample scripts

*/
IF (DATE = holidays_gv)
OR (DAY OF WEEK = weekends_gv)
OR (TIME OF DAY = closed_hours_gv) THEN
GIVE RAN closed_ran
DISCONNECT
END IF

IF OUT OF SERVICE skillset_sk THEN


GIVE RAN dayclosed_ran
DISCONNECT
END IF

GIVE RAN first_ran


/*This forces the RAN to be heard before queuing a call*/

QUEUE TO SKILLSET skillset_sk


WAIT 2
GIVE MUSIC music_route

SECTION WaitLoop
WAIT treatment_delay_gv
IF NOT QUEUED THEN
IF OUT OF SERVICE skillset_sk THEN
ROUTE CALL mailbox_gv
ELSE
QUEUE TO SKILLSET skillset_sk
WAIT 2
END IF
END IF
GIVE RAN second_ran
EXECUTE WaitLoop

Scripting Guide for Communication Server 1000/Meridian 1 PBX 515


Using sample scripts Standard 8.05

c_Holiday_Broadcast_Announcement

Function
In this script, a test determines if the contact center is closed due because the day
is a holiday. If so, the caller hears a special holiday announcement. If it is
Saturday or Sunday, or if the time is after business hours, the caller hears a
recorded announcement stating that the contact center is closed. If the contact
center is open, and agents with the required skillset are available to handle the
call, it is queued to the skillset.

While the caller is waiting, the call is repeatedly checked to determine if it is still
queued. If not, a test determines if agents are still logged on to the skillset. If all
agents are logged off, the caller hears a recorded announcement and is
disconnected. If agents are available to answer the call, it is requeued to the
skillset.

The GIVE CONTROLLED BROADCAST feature is not supported on a


CS 1000E platform. For more information, see Nortel Product Bulletin
P-2006-0312_Global.

Script text
/* Title: c_Holiday_Broadcast_Announcement

Note: Replace skillset_sk with the desired skillset name.

Global Variable List: Variable Type:


1. holiday_gv - DATE of specific holidays
2. closed_hours_gv - TIME that business is closed
3. weekends_gv - DAY(s) that business is closed
5. closed_message_vs - voice segment variable -
closed
6. holiday_message_vs - voice segment variable - on
holiday

516 Contact Center Manager


December 2007 Using sample scripts

7. first_ran - RAN (RAN route for first


announcement)
8. second_ran - RAN (RAN route for second
announcement)
9. dayclosed_ran - RAN (RAN route for day
closed announcement)
10. treatment_timer_gv - SECONDS (delay time for wait)
11. music_route - MUSIC (route number for
music)

*/

IF (DATE = holiday_gv) THEN


GIVE CONTROLLED BROADCAST ANNOUNCEMENT
PLAY PROMPT VOICE SEGMENT holiday_message_vs
DISCONNECT
END IF

IF (DAY OF WEEK = weekends_gv)


OR (TIME OF DAY = closed_hours_gv) THEN
GIVE CONTROLLED BROADCAST ANNOUNCEMENT
PLAY PROMPT VOICE SEGMENT closed_message_vs
DISCONNECT
END IF

IF OUT OF SERVICE skillset_sk THEN


GIVE RAN closed_ran
DISCONNECT
END IF

QUEUE TO SKILLSET skillset_sk


WAIT 2 /* Allow time in case an agent is available */
GIVE RAN first_ran

Scripting Guide for Communication Server 1000/Meridian 1 PBX 517


Using sample scripts Standard 8.05

GIVE MUSIC music_route

SECTION WaitLoop
WAIT treatment_timer_gv
IF NOT QUEUED THEN
IF OUT OF SERVICE skillset_sk THEN
GIVE RAN dayclosed_ran
DISCONNECT
ELSE
QUEUE TO SKILLSET skillset_sk
WAIT 2
/* Allow time in case an agent is available */
END IF
END IF
GIVE RAN second_ran
EXECUTE WaitLoop

518 Contact Center Manager


December 2007 Using sample scripts

c_Priority_in_Queue_DNIS

Function
In this script, a test determines if the contact center is closed because the day is a
holiday, Saturday or Sunday, or if the time is after business hours. If the contact
center is open and agents with the required skillset are available to answer the
call, the call is assigned a priority level based on the call DNIS number, and then
queued to the skillset.

While the caller is waiting, the call is repeatedly checked to determine if it is still
queued. If not, a test determines if agents are still logged on to the skillset. If all
agents are logged off, the caller hears a recorded announcement and is
disconnected. If agents are available to answer the call, it is requeued to the
skillset.

Script text
/* Title: c_Priority_in_Queue_DNIS
Note: Replace skillset_sk with the desired skillset name.
Global Variable List: Variable Type:
1. holidays_gv - DATE (holiday dates)
2. weekend_gv - DAY (contains Saturdayand Sunday)
3. closed_hours_gv - TIME (value for closed hours)
4. dnis_1 - DNIS
5. dnis_2 - DNIS
6. dnis_3 - DNIS
7. first_ran - RAN (RAN route for first
announcement)
8. second_ran - RAN (RAN route for second
announcement)
9. closed_ran - RAN (RAN route for night
announcement)
10. dayclosed_ran - RAN (RAN route for day closed
announcement)
11. treatment_timer_gv - SECONDS

Scripting Guide for Communication Server 1000/Meridian 1 PBX 519


Using sample scripts Standard 8.05

12. music_route - MUSIC(route number for music)

Call Variable List: Variable Type:


1. sk_priority_cv - priority number

*/

IF (DATE = holidays_gv)
OR (DAY OF WEEK = weekends_gv)
OR (TIME OF DAY = closed_hours_gv)
THEN
GIVE RAN closed_ran
DISCONNECT
END IF

IF OUT OF SERVICE skillset_sk THEN


GIVE RAN dayclosed_ran
DISCONNECT
END IF

WHERE DNIS EQUALS


VALUE dnis_1: ASSIGN 1 TO sk_priority_cv
VALUE dnis_2: ASSIGN 2 TO sk_priority_cv
VALUE dnis_3: ASSIGN 3 TO sk_priority_cv
DEFAULT: ASSIGN 4 TO sk_priority_cv
END WHERE

QUEUE TO SKILLSET skillset_sk WITH PRIORITY sk_priority_cv


WAIT 2 /* Allow time in case an agent is available */
GIVE RAN first_ran
GIVE MUSIC music_route

520 Contact Center Manager


December 2007 Using sample scripts

SECTION WaitLoop
WAIT treatment_timer_gv
IF NOT QUEUED THEN
IF OUT OF SERVICE skillset_sk THEN
GIVE RAN dayclosed_ran
DISCONNECT
ELSE
QUEUE TO SKILLSET skillset_sk WITH PRIORITY
sk_priority_cv
WAIT 2 /* Allow time in case an agent is
available */
END IF
END IF
GIVE RAN second_ran
EXECUTE WaitLoop

Scripting Guide for Communication Server 1000/Meridian 1 PBX 521


Using sample scripts Standard 8.05

522 Contact Center Manager


December 2007 Using sample scripts

Section C: Network Skill-Based Routing


scripts

In this section
Overview 524
c_NSBR_Basic 525
c_NSBR_Primary 527
c_NSBR_Distribution 530
c_Network 532

Scripting Guide for Communication Server 1000/Meridian 1 PBX 523


Using sample scripts Standard 8.05

Overview

If you purchased the Network Skill-Based Routing (NSBR) option, you can use
the following sample scripts to test the routing of calls from one Contact Center
Manager site to another. The sample scripts are located in the directory
C:\Program Files\Nortel Networks\WClient\Server\SampleScripts\CS1000
(M1)_samples\NSBR.

524 Contact Center Manager


December 2007 Using sample scripts

c_NSBR_Basic

Function
This script is used to route a call from one Contact Center Manager site to
another. The script first performs a test to determine if the contact center is
closed due to a holiday or a weekend, or if it is after business hours. If the
contact center is open and agents with the required skillset are available to
answer the call, it is queued to the local skillset and the network skillset. If no
agents in either the local or network skillset are available to answer the call, a
recorded announcement plays asking the caller to leave a message.

Script text
/* Title: NBSR_Basic
Global Variable List: Variable Type:
1. holiday_gv - DATE (holiday dates)
2. weekend_gv - DAY (weekend days:
Saturday, Sunday)
3. closed_hrs_gv - TIME (special value for
closed hours)
4. ran_nite_gv - RAN (RAN route for night
announcement)
5. ran_greeting_gv - RAN (RAN route for
greeting
announcement)
6. music_soft_gv - MUSIC (route for music)
7. mailbox_gv - DN (value of voice system)

*/

IF (DATE = holiday_gv)
OR (DAY OF WEEK = weekend_gv)
OR (TIME OF DAY = closed_hrs_gv) THEN
GIVE RAN ran_nite_gv

Scripting Guide for Communication Server 1000/Meridian 1 PBX 525


Using sample scripts Standard 8.05

DISCONNECT
END IF

IF NOT OUT OF SERVICE skillset_sk THEN


QUEUE TO SKILLSET skillset_sk
WAIT 2 /* Just in case an agent is idle*/
END IF

QUEUE TO NETWORK SKILLSET skillset_network_sk


WAIT 4 /* Just in case an agent is idle*/
GIVE RAN ran_greeting_gv
GIVE MUSIC music_soft_gv

SECTION WaitLoop
WAIT 20
IF NOT QUEUED THEN
IF NOT OUT OF SERVICE skillset_sk THEN
QUEUE TO SKILLSET skillset_sk
WAIT 2
QUEUE TO NETWORK SKILLSET skillset_network_sk
WAIT 4/* Just in case an agent is idle*/
ELSE
ROUTE CALL mailbox_gv
END IF
END IF
GIVE RAN ran_second_gv
EXECUTE WaitLoop

526 Contact Center Manager


December 2007 Using sample scripts

c_NSBR_Primary

Function
This script is used to route a call from one Contact Center Manager site to
another. The script queues the call to the local skillset and the network skillset. If
the call is not successfully queued to the network skillset, it is then queued to a
backup network skillset. If the call is not successfully queued to the backup
network skillset or the local skillset, a recorded announcement plays asking the
caller to leave a message.

Script text
/* Title: c_NSBR_Primary

Global Variable List: Variable Type:


1. holidays_gv - DATE (dates for holidays)
2. weekend_gv - DAY (days of week)
3. afterhours_gv - TIME (hours closed)
4. nite_ran - RAN (RAN route for night
announcement)
5. first_ran - RAN (RAN route for first
announcement)
6. second_ran - RAN (RAN route for second
announcement)
7. soft_music - MUSIC (route number for
music)
8. backup_skillset_sk - Network SKILLSET used for backup
9. nacd_q - ACD ACD DN with night
routing table)
10. too_old_gv - SECONDS (value for age of
call)
11. mailbox_gv - DN (value of voice
system)

Scripting Guide for Communication Server 1000/Meridian 1 PBX 527


Using sample scripts Standard 8.05

*/

IF (DATE = holidays_gv)
OR (DAY OF WEEK = weekend_gv)
OR (TIME OF DAY = afterhours_gv) THEN
GIVE RAN nite_ran
DISCONNECT
END IF

IF NOT OUT OF SERVICE skillset_sk THEN


QUEUE TO SKILLSET skillset_sk
WAIT 2
END IF
QUEUE TO NETWORK SKILLSET skillset_sk
WAIT 4
GIVE RAN first_ran
GIVE MUSIC soft_music

SECTION WaitLoop
WAIT 20
IF PRIORITY IN NETWORK QUEUE skillset_sk = 0 THEN
QUEUE TO NETWORK SKILLSET backup_skillset_sk
WAIT 4
EXECUTE WaitLoop2
END IF
GIVE RAN second_ran
EXECUTE WaitLoop

SECTION WaitLoop2
WAIT 20
IF NOT QUEUED THEN
QUEUE TO NACD nacd_q

528 Contact Center Manager


December 2007 Using sample scripts

WAIT 2
EXECUTE AgeCheck
END IF
GIVE RAN second_ran
EXECUTE WaitLoop2

SECTION AgeCheck
WAIT 30
IF AGE OF CALL >= too_old_gv THEN
ROUTE CALL mailbox_gv
END IF
GIVE RAN second_ran
EXECUTE AgeCheck

Scripting Guide for Communication Server 1000/Meridian 1 PBX 529


Using sample scripts Standard 8.05

c_NSBR_Distribution

Function
This script is used to route a call from one Contact Center Manager site to
another. The script first performs a mathematical calculation to determine if the
number of idle agents in a specific skillset is less than or equal to the number of
logged-on agents divided by an agent logged-on ratio. Based on the result of the
calculation, the call is queued first to either a local or a network skillset. If the
call is not successfully queued to either the local or network skillset, a recorded
announcement plays asking the caller to leave a message.

The purpose of this script is to distribute calls evenly among all sites in a
multisite contact center. This ensures that no single site is handling the majority
of calls.

With Contact Center Manager Release 6.0, you can also route calls using LIA,
ASA, FB, Reserve Agent, and Wild Variables.

Script text
/* Title: c_NSBR_Distribution
Global Variable List: Variable Type:
1. holidays_gv - DATE (dates for holidays)
2. weekend_gv - DAY (days of week)
3. afterhours_gv - TIME (hours closed)
4. nite_ran - RAN (RAN route for night
announcement)
5. first_ran - RAN (RAN route for first
announcement)
6. second_ran - RAN (RAN route for second
announcement)
7. soft_music - MUSIC (route number for
music)
8. agent_factor_gv - INTEGER (value of agent
logged in ratio)
*/

530 Contact Center Manager


December 2007 Using sample scripts

IF (DATE = holidays_gv)
OR (DAY OF WEEK = weekend_gv)
OR (TIME OF DAY = afterhours_gv) THEN
GIVE RAN nite_ran
DISCONNECT
END IF

IF (IDLE AGENT COUNT skillset_sk) <=


(Logged Agent Count skillset_sk/agent_factor) THEN
QUEUE TO NETWORK SKILLSET skillset_sk
WAIT 4
QUEUE TO SKILLSET skillset_sk
WAIT 2
ELSE
QUEUE TO SKILLSET skillset_sk
WAIT 2
QUEUE TO NETWORK SKILLSET skillset_sk
WAIT 4
END IF

GIVE RAN first_ran


GIVE MUSIC soft_music

SECTION WaitLoop
WAIT 20
IF NOT QUEUED THEN
GIVE RAN nite_ran
DISCONNECT
END IF
GIVE RAN second_ran
EXECUTE WaitLoop

Scripting Guide for Communication Server 1000/Meridian 1 PBX 531


Using sample scripts Standard 8.05

c_Network

Function
This script is used in the event that a call is routed to an agent at a remote site but
it is returned to the queue because the agent at the remote site became
unavailable. When the call is returned to the local queue, the caller hears music
and a recorded announcement. If all agents in the local skillset log off before the
call is answered, the caller hears a recorded announcement and is disconnected.

Script text
/* Title: c_Network

Global Variable List: Variable Type


1. soft_music - MUSIC (music route)
2. nite_ran - RAN (ran route)
3. second_ran - RAN (ran route)
*/

GIVE RINGBACK
WAIT 2 /* required to avoid race conditions with music */
GIVE MUSIC soft_music
SECTION WaitLoop
WAIT 10
IF NOT QUEUED THEN
GIVE RAN nite_ran
DISCONNECT
END IF
GIVE RAN second_ran
EXECUTE WaitLoop

532 Contact Center Manager


December 2007 Using sample scripts

Section D: Nodal Routing examples

In this section
Overview 534
c_Master_Handles_Call_Transfers 535
c_Master_with_Exception_Checks 537
c_Master_with_Menus 539
c_Primary_One 543
c_Primary_Two 544
c_Primary_Three 545
c_Primary_Four 546
c_Primary_Five 547
c_Common_Secondary 548

Scripting Guide for Communication Server 1000/Meridian 1 PBX 533


Using sample scripts Standard 8.05

Overview

The sample scripts are available through Contact Center Manager


Administration Scripting. Using the Import dialog box, they are found in the
sample scripts folder. This directory contains three types of scripts: master,
primary, and secondary. Master and primary scripts must reference a lower-level
script to function properly. You must create and activate one master script, one
primary script, and one secondary script to begin testing call routing in your
contact center.

Master scripts
If you intend to use a master script, it must reference a primary script which, in
turn, must reference a secondary script.

Primary scripts
If you intend to use a primary script, it must reference a secondary script.

The primary scripts in this section define the values of call variables required for
historical reporting and real-time displays.

Secondary scripts
If you intend to use a secondary script, it must be referenced by a primary script.

534 Contact Center Manager


December 2007 Using sample scripts

c_Master_Handles_Call_Transfers

Function
This script handles a situation in which an agent transfers a call back to Contact
Center Manager. If the call arrives at the transfer CDN, a voice session is
established, prompting the agent to select the appropriate script to execute. After
the agent selects and completes the transfer by pressing the transfer key a second
time, the script executes. Executing this script ensures that any information
about the call is reported correctly.

Script text
/* Title: c_Master_Handles_Call_Transfers

Global Variable List: Variable Type:


1. transfer_cdn_gv - CDN (value of transfer
CDN)
2. transfer_menu_vs - VOICE SEGMENT (file &
segment of message)
3. pls_complete_transfer_vs - VOICE SEGMENT (file &
segment of message)

Call Variable List: Variable Type:


1. selection_cv - DN (stores input)
*/

IF CDN = transfer_cdn_gv THEN


IF TRANSFERRED THEN
/* Agent is transferring the call back into the CDN
'transfer_cdn_gv'*/
ASSIGN 0 TO selection_cv
OPEN VOICE SESSION
PLAY PROMPT VOICE SEGMENT transfer_menu_vs

Scripting Guide for Communication Server 1000/Meridian 1 PBX 535


Using sample scripts Standard 8.05

COLLECT 1 DIGITS INTO selection_cv


PLAY PROMPT VOICE SEGMENT pls_complete_transfer_vs
END VOICE SESSION
WAIT 20 /* wait for agent to hang up */
DISCONNECT

ELSE
/* Caller is redirected to a script after the Agent
completes the Blind Transfer */
WHERE selection_cv EQUALS
VALUE 1: EXECUTE SCRIPT <script name>
VALUE 2: EXECUTE SCRIPT <script name>
VALUE 3: EXECUTE SCRIPT <script name>
VALUE 4: EXECUTE SCRIPT <script name>
DEFAULT: EXECUTE SCRIPT <script name>
END WHERE
END IF
END IF

WHERE CDN EQUALS


VALUE <CDN>: EXECUTE SCRIPT <script name>
VALUE <CDN>: EXECUTE SCRIPT <script name>
VALUE <CDN>: EXECUTE SCRIPT <script name>
VALUE <CDN>: EXECUTE SCRIPT <script name>
VALUE <CDN>: EXECUTE SCRIPT <script name>
VALUE <CDN>: EXECUTE SCRIPT <script name>
VALUE <CDN>: EXECUTE SCRIPT <script name>
DEFAULT: ROUTE CALL DEFAULT DN
END WHERE

536 Contact Center Manager


December 2007 Using sample scripts

c_Master_with_Exception_Checks

Function
In this script, a test determines if the contact center is closed because the day is a
holiday or if there is an emergency in the contact center. If the contact center is
open and there is no emergency, the script determines at which CDN the call
arrived. If the call is transferred, the script determines if the transferring agent is
still on the line. If so, script execution suspends for 6 seconds so the agent can
disconnect. If the agent disconnected or the call was not transferred, a primary
script is executed based on the CDN at which the call arrived.

Script text
/* Title: c_Master_with_Exception_Checks
Note: Replace <CDN> and <Script_Names> with site specific values.

Global Variable List: Variable Type:


1. holiday_gv - DATE (holiday dates)
2. spec_holiday_gv - DATE (special holiday
dates)
3. spec_holidayhrs_gv - TIME (special value for
holiday hours)
4. call_center_emerg_gv - BOOLEAN
5. mmail_qv - ACD (Meridian Mail queue)
6. call_center_emerg_msg_gv - TREATMENT DN (message
programmed in
Meridian Mail)
7. transfer_CDN - CDN (list of CDNs used to
transfer calls back
to SCCS)
8. holiday_ran_gv - RAN (RAN route for
announcement)
*/

IF (DATE = holiday_gv)

Scripting Guide for Communication Server 1000/Meridian 1 PBX 537


Using sample scripts Standard 8.05

OR (DATE = spec_holiday_gv
AND TIME OF DAY = spec_holidayhrs_gv) THEN
GIVE RAN holiday_ran_gv
DISCONNECT
END IF

IF call_center_emerg_gv THEN
GIVE IVR mmail_gv WITH TREATMENT call_center_emerg_msg_gv
DISCONNECT
END IF

IF CDN = transfer_CDN THEN


IF TRANSFERRED THEN
GIVE RINGBACK
WAIT 6 /* wait for blind transfer complete */
ELSE
WHERE CDN EQUALS /* These are transfer CDNS */
VALUE <CDN>: EXECUTE SCRIPT <Script_Name>
VALUE <CDN>: EXECUTE SCRIPT <Script_Name>
VALUE <CDN>: EXECUTE SCRIPT <Script_Name>
VALUE <CDN>: EXECUTE SCRIPT <Script_Name>
VALUE <CDN>: EXECUTE SCRIPT <Script_Name>
DEFAULT: ROUTE CALL DEFAULT DN
END WHERE
END IF
END IF
WHERE CDN EQUALS
VALUE <CDN>: EXECUTE SCRIPT <Script_Name>
VALUE <CDN>: EXECUTE SCRIPT <Script_Name>
VALUE <CDN>: EXECUTE SCRIPT <Script_Name>
DEFAULT: ROUTE CALL DEFAULT DN
END WHERE

538 Contact Center Manager


December 2007 Using sample scripts

c_Master_with_Menus

Function
In this script, a test determines if the contact center is closed because the day is a
holiday or if there is an emergency in the contact center. If the contact center is
open and there is no emergency, the script determines at which CDN the call
arrived. Based on the CDN, either a primary script or a section within the master
script executes. The section within the master script establishes an IVR session,
prompting the caller to choose a menu option. The option chosen executes a
primary script. If the caller does not choose an option, the menu option replays,
and the call is directed to a default script.

Script text
/* Title: c_Master_Script_With_Menus
Note: Replace <CDN>,<Script_Names> and <SectionNames> with site
specific values.

Global Variable List: Variable Type:


1. holiday_gv - DATE (holiday dates)
2. spec_holiday_gv - DATE (special holiday
dates)
3. spec_holidayhrs_gv - TIME (special value for
holiday hours)
4. call_center_emerg_gv - BOOLEAN
5. mmail_qv - ACD (Meridian Mail queue)
6. call_center_emerg_msg_gv - TREATMENT DN (message
programmed in
Meridian Mail)
7. weekend_gv - DAY OF WEEK (contains
Saturday and Sunday)
8. closedhrs_gv - TIME (value for closed
hours)
9. closed_ran_gv - RAN (RAN route for
announcement)

Scripting Guide for Communication Server 1000/Meridian 1 PBX 539


Using sample scripts Standard 8.05

10. greeting_vs - VOICE SEGMENT (file &


segment of message)
11. main_menu_vs - VOICE SEGMENT (file &
segment of message)
12. pls_hold_vs - VOICE SEGMENT (file &
segment of message)

Call Variable List: Variable Type:


1. menu_choice_cv - DN (stores input)
2. loop_cv - INTEGER (counts number of
times call entered loop)
*/

IF (DATE = holiday_gv)
OR (DATE = spec_holiday_gv
AND TIME OF DAY = spec_holidayhrs_gv) THEN
EXECUTE SCRIPT Holiday_Closed
END IF

IF call_center_emerg_gv THEN
GIVE IVR mmail_q WITH TREATMENT call_center_emerg_msg_gv
DISCONNECT
END IF

WHERE CDN EQUALS


VALUE <CDN>: EXECUTE SCRIPT <Script_Name>
VALUE <CDN>: EXECUTE SCRIPT <Script_Name>
VALUE <CDN>: EXECUTE SCRIPT <Script_Name>
DEFAULT: ROUTE CALL DEFAULT DN
END WHERE

SECTION <SectionName>

540 Contact Center Manager


December 2007 Using sample scripts

IF (DAY OF WEEK = weekend_gv


OR (TIME OF DAY = closedhrs_gv) THEN
GIVE RAN closed_ran_gv
DISCONNECT
END IF

ASSIGN 0 TO loop_cv /* initially sets value to 0 */

SECTION MainMenu

OPEN VOICE SESSION


PLAY PROMPT VOICE SEGMENT greeting_vs
VOICE SEGMENT main_menu_vs
COLLECT 1 DIGITS INTO menu_choice_cv
PLAY PROMPT VOICE SEGMENT pls_hold_vs
END VOICE SESSION

WHERE menu_choice_cv EQUALS


VALUE 1: EXECUTE SCRIPT <Script_Name>
VALUE 2: EXECUTE SCRIPT <Script_Name>
VALUE 3: EXECUTE SCRIPT <Script_Name>
VALUE 4: EXECUTE SCRIPT <Script_Name>
VALUE 5: EXECUTE SCRIPT <Script_Name>
DEFAULT:
ASSIGN loop_cv +1 TO loop_cv
IF loop_cv >1 THEN
EXECUTE SCRIPT <Script_Name>
ELSE
EXECUTE MainMenu
END IF
END WHERE

Scripting Guide for Communication Server 1000/Meridian 1 PBX 541


Using sample scripts Standard 8.05

The c_Master_with_Menus sample script executes the main menu again if the
caller does not make a valid menu choice. Nortel strongly recommends that the
script check if the caller selected a valid menu choice and, if not, repeat the
menu in the one OPEN/END VOICE SESSION. Failure to do so can result in a
caller waiting too long to be reconnected because voice ports are unavailable
(not engineered correctly) and performance is affected. Voice ports must
disconnect and reconnect.

542 Contact Center Manager


December 2007 Using sample scripts

c_Primary_One

Function
This primary script defines the values of call variables and then directs the call to
a common secondary script.

Script text
/* c_Primary_One
Call Variable List: Variable Type:
1. ran_cv - RAN (holds assigned
ran route value)
2. skillset_cv - SKILLSET (holds assigned
skillset value)
3. time_loop_cv - SECONDS (holds value for
delay time)
*/
ASSIGN 100 TO ran_cv
ASSIGN A_skillset_sk TO skillset_cv
ASSIGN 20 TO time_loop_cv

EXECUTE SCRIPT c_Common_Secondary

Scripting Guide for Communication Server 1000/Meridian 1 PBX 543


Using sample scripts Standard 8.05

c_Primary_Two

Function
This primary script defines the values of call variables and then directs the call to
a common secondary script.

Script text
/* c_Primary_Two

Call Variable List: Variable Type:


1. ran_cv - RAN (holds assigned
ran route value)
2. skillset_cv - SKILLSET (holds assigned
skillset value)
3. time_loop_cv - SECONDS (holds value for
delay time)
*/
ASSIGN 101 TO ran_cv
ASSIGN B_skillset_sk TO skillset_cv
ASSIGN 40 TO time_loop_cv

EXECUTE SCRIPT c_Common_Secondary

544 Contact Center Manager


December 2007 Using sample scripts

c_Primary_Three

Function
This primary script defines the values of call variables and then directs the call to
a common secondary script.

Script text
/* Title: c_Primary_Three

Call Variable List: Variable Type:


1. ran_cv - RAN (holds assigned
ran route value)
2. skillset_cv - SKILLSET (holds assigned
skillset value)
3. time_loop_cv - SECONDS (holds value for
delay time)
*/
ASSIGN 103 TO ran_cv
ASSIGN C_skillset_sk TO skillset_cv
ASSIGN 30 TO time_loop_cv

EXECUTE SCRIPT c_Common_Secondary

Scripting Guide for Communication Server 1000/Meridian 1 PBX 545


Using sample scripts Standard 8.05

c_Primary_Four

Function
This primary script defines the values of call variables and then directs the call to
a common secondary script.

Script text
/* Title: c_Primary_Four

Call Variable List: Variable Type:


1. ran_cv - RAN (holds assigned
ran route value)
2. skillset_cv - SKILLSET (holds assigned
skillset value)
3. time_loop_cv - SECONDS (holds value for
delay time)
*/
ASSIGN 104 TO ran_cv
ASSIGN D_skillset_sk TO skillset_cv
ASSIGN 50 TO time_loop_cv

EXECUTE SCRIPT c_Common_Secondary

546 Contact Center Manager


December 2007 Using sample scripts

c_Primary_Five

Function
This primary script defines the values of call variables and then directs the call to
a common secondary script.

Script text
/* Title: c_Primary_Five

Call Variable List: Variable Type:


1. ran_cv - RAN (holds assigned
ran route value)
2. skillset_cv - SKILLSET (holds assigned
skillset value)
3. time_loop_cv - SECONDS (holds value for
delay time)
*/
ASSIGN 105 TO ran_cv
ASSIGN E_skillset_sk TO skillset_cv
ASSIGN 30 TO time_loop_cv

EXECUTE SCRIPT c_Common_Secondary

Scripting Guide for Communication Server 1000/Meridian 1 PBX 547


Using sample scripts Standard 8.05

c_Common_Secondary

Function
In this script, a test determines if the contact center is closed because the day is a
holiday, Saturday or Sunday, or the time is after business hours. If so, the caller
hears a recorded announcement and is disconnected; otherwise, the caller hears a
message stating that the call may be recorded, and then the call is queued to the
appropriate skillset.

While the caller is waiting, the call is repeatedly checked to determine if it is still
queued. If not, a test determines if agents are still logged on to the skillset. If all
agents are logged off, the caller hears a recorded announcement and is
disconnected. If agents are available to answer the call, it is queued to the skillset
again.

Script text
/* Title: c_Common_Secondary
Global Variable List: Variable Type:
1. holiday_gv - DATE (holiday dates)
2. weekend_gv - DAY (weekend days:
Saturday, Sunday)
3. closed_hrs_gv - TIME (special value for
closed hours)
4. ran_nite_gv - RAN (RAN route for night
announcement)
5. wg_theme_gv - MUSIC (route for music)
6. mailbox_gv - DN (value of voice
system)
7. ivrdn - ACD (Meridian Mail queue)
8. system_unavailable_gv - TREATMENT DN (message
programmed in
Meridian Mail)
9. agents_busy_gv - TREATMENT DN (message
programmed in
Meridian Mail)

548 Contact Center Manager


December 2007 Using sample scripts

*/
IF (DATE = holiday_gv)
OR (DAY OF WEEK = weekend_gv)
OR (TIME OF DAY = closed_hrs_gv) THEN
GIVE RAN ran_nite_gv
DISCONNECT
END IF

IF OUT OF SERVICE skillset_cv THEN


GIVE IVR ivrdn WITH TREATMENT system_unavailable_gv
DISCONNECT
END IF

GIVE RAN ran_cv /* session may be recorded message*/


QUEUE TO SKILLSET skillset_cv
WAIT 2
GIVE MUSIC wg_theme_gv

SECTION Wait_Loop
WAIT time_loop_cv
IF NOT QUEUED THEN
IF OUT OF SERVICE skillset_cv THEN
GIVE IVR ivrdn WITH TREATMENT system_unavailable_gv
DISCONNECT
ELSE
QUEUE TO SKILLSET skillset_cv
WAIT 2
END IF
END IF
GIVE IVR INTERRUPTIBLE ivrdn WITH TREATMENT agents_busy_gv
EXECUTE Wait_Loop

Scripting Guide for Communication Server 1000/Meridian 1 PBX 549


Using sample scripts Standard 8.05

550 Contact Center Manager


Appendix A

Troubleshooting

In this appendix
Overview 552
Script execution problems 553
Voice processing problems 556
Networking problems 561
Phantom calls 563
Validation errors 565
Validation option rules 579

Scripting Guide for Communication Server 1000/Meridian 1 PBX 551


Troubleshooting Standard 8.05

Overview

This appendix provides troubleshooting information and tips in case you


experience problems with your scripting process.

552 Contact Center Manager


December 2007 Troubleshooting

Script execution problems

The following sections describe possible problems with script execution.

ASSIGNED command fails to change the value of a variable


The ASSIGNED command is now the ASSIGN TO command. The ASSIGNED
command cannot run if it used within an OPEN VOICE SESSION; however, it
continues to run in all other instances. Nortel recommends that you use the
ASSIGN TO command in your scripts.

The syntax of the ASSIGN TO command is ASSIGN <value> TO <variable>.


You can use call variables only of type Item.

Script does not validate


If the script executes a series of commands but then ignores any of the
subsequent commands, you may not have included both an opening and a
closing marker with comments inserted in the script. Comments in your scripts
must begin with an opening marker (/*) and end with a closing marker (*/). If
you do not include both an opening and closing marker, the script does not
validate.

Callers are caught in an endless loop


When using loops to give recorded announcements (GIVE RAN) to callers
waiting in queue, scriptwriters often forget to include a test to determine if the
call is answered. If queuing fails or if the call is disconnected for some reason,
the caller continues to hear a recorded announcement. However, the call is never
answered.

For information about the GIVE RAN command in SIP-enabled contact centers,
see “SIP Contact Center” on page 675.

You must include a test, such as using the QUEUED or OUT OF SERVICE
intrinsics, inside loops. Use the results of these tests to provide default
treatments to the call to ensure that it is successfully routed.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 553


Troubleshooting Standard 8.05

In this example, a call is queued to the sales skillset, and then the caller is given
a recorded announcement. Every 30 seconds, a loop is used to test whether the
call is still in a queue or if agents are logged on to the sales skillset.
QUEUE TO SKILLSET sales_sk
WAIT 10
SECTION LoopForever
IF NOT QUEUED THEN
IF OUT OF SERVICE sales_sk THEN
ROUTE CALL auto_att
ELSE
QUEUE TO SKILLSET sales_sk
WAIT 2
END IF
END IF
GIVE RAN please_wait_ran_gv
WAIT 30
EXECUTE LoopForever

Calls are routed to a default ACD-DN because of a scripting failure


If one of the commands listed here is the first command in a script, Contact
Center Manager does not take control of the call. The switch routes the call to
the default ACD-DN configured for the CDN. The call is not queued to the
default skillset or RAN. Contact Center Manager logs an error to the alarm
monitor and event browser.
„ WAIT
„ QUIT
„ GIVE SILENCE
„ REMOVE FROM AGENT
„ CHANGE PRIORITY IN AGENT
„ REMOVE FROM SKILLSET
„ CHANGE PRIORITY IN SKILLSET

554 Contact Center Manager


December 2007 Troubleshooting

The following commands in this list apply only if you purchased the NSBR
option:
„ REMOVE FROM NETWORK SKILLSET
„ CHANGE PRIORITY IN NETWORK SKILLSET

The call must first be given treatment using any other command before any of
the preceding commands are used in a script.

This script execution problem applies to voice contacts only.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 555


Troubleshooting Standard 8.05

Voice processing problems

The following sections describe possible problems with voice processing.

GIVE IVR treatment fails


If a GIVE IVR treatment to a voice messaging system such as Meridian Mail or
CallPilot fails, you must ensure the following details are correct:
„ On Contact Center Manager, the IVR DN is configured correctly and is
acquired.
„ On the switch (in LD 23), the IVR ACD-DN is configured with IVR = YES
and ALOG = YES.
„ On both the switch and the voice messaging system, voice ports are logged
on and available.
Note: Ports configured on the switch for the ACD DN must also be
configured on Contact Center Manager and CallPilot or Meridian Mail. The
configuration on the switch must match the configuration on CallPilot or
Meridian Mail.

For information about the GIVE IVR command in SIP-enabled contact centers,
see “GIVE IVR” on page 679.

GIVE CONTROLLED BROADCAST ANNOUNCEMENT command fails


If your scripts fail after the GIVE CONTROLLED BROADCAST
ANNOUNCEMENT command, ensure that you set the value of the Number of
IVR Ports Reserved for Broadcast variable in the IVR ACD-DN Global Settings
window on the client.

If you set the GIVE CONTROLLED BROADCAST ANNOUNCEMENT value


to be greater than the number of ports in the IVR ACD-DN, call processing
suspends at this statement, even if no ports are free for the call. The calls queue
until a connection to the port becomes free.

556 Contact Center Manager


December 2007 Troubleshooting

If you set this value equal to or less than the number of ports in the IVR ACD-
DN, the caller hears the announcement only if there is a port with free capacity
to connect the call. If all ports are used, the call skips this statement and goes to
the next statement in the script.

The GIVE CONTROLLED BROADCAST command is not supported in SIP-


enabled contact centers.

Script does not execute voice processing commands


When the script executes, it ignores the voice processing commands and
continues to run after the voice processing commands. This behavior can be
caused by a configuration problem on the switch, on Contact Center Manager
Server, on Meridian Mail, or on CallPilot.

For information about how to ensure that scripts execute all voice processing
commands, see the Contact Center - Manager, Communication Server 1000 and
Voice Processing Guide.

Voice processing commands do not run consistently


When scripts use the CONTROLLED BROADCAST or voice sessions
commands, some callers hear the prompts, and others do not. This behavior can
be caused by a configuration problem on the switch, on Contact Center Manager
Server, on Meridian Mail, or on CallPilot.

For information about how to ensure that voice processing commands run
consistently, see the Contact Center - Manager, Communication Server 1000
and Voice Processing Guide.

Callers hear silence instead of voice processing treatments


The script executes the voice processing commands, but callers hear silence
instead of the prompts and announcements specified in the script. This behavior
can be caused by a configuration problem on the switch, on Contact Center
Manager Server, on Meridian Mail, or on CallPilot. This behavior can also be
caused by servers that are not synchronized or voice ports that are not in a
correct state.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 557


Troubleshooting Standard 8.05

For information about how to ensure that voice processing treatments are
executed successfully, see the Contact Center - Manager, Communication
Server 1000 and Voice Processing Guide.

Callers hear the wrong message


Callers hear a message different from the one indicated by the voice processing
command. This behavior can be caused by a configuration problem on the
switch, on Contact Center Manager Server, on Meridian Mail, or on CallPilot.
This behavior can also be caused by the voice prompt variable referring to the
wrong voice prompt file.

For information about how to ensure that the correct voice processing treatment
is given, see the Contact Center - Manager, Communication Server 1000 and
Voice Processing Guide.

Callers hear only one of multiple voice processing treatments


At first, callers hear the correct voice processing treatment. Then, after some
traffic, the script no longer runs the voice processing commands. This behavior
can be caused by a configuration problem on the switch, on Contact Center
Manager Server, on Meridian Mail, or on CallPilot.

For information about how to ensure that scripts do not skip over voice
processing commands, see the Contact Center - Manager, Communication
Server 1000 and Voice Processing Guide.

Calls suspend in the script at the voice processing statement


Scripts advance to the voice processing commands, but do not continue beyond
them. The script stops until the caller hangs up or an agent answers the call (if
the call was previously queued). This suspension can be caused by a
configuration problem on the switch, on Contact Center Manager Server, on
Meridian Mail, or on CallPilot.

For information about how to ensure that script execution does not suspend at a
voice processing command, see the Contact Center - Manager, Communication
Server 1000 and Voice Processing Guide.

558 Contact Center Manager


December 2007 Troubleshooting

Callers wait too long to hear voice processing


The caller hears too many cycles of ringback before the message is played. This
behavior can be caused by a configuration problem on the switch, on Contact
Center Manager Server, on Meridian Mail, or on CallPilot.

For information about how to ensure that voice processing commands run
successfully, see the Contact Center - Manager, Communication Server 1000
and Voice Processing Guide.

Callers hear “Your voice session cannot be completed” message


The caller hears the message “Your Voice Session cannot be completed” instead
of the prompts specified in the script. This behavior can be caused by a
configuration problem on the switch, on Contact Center Manager Server, on
Meridian Mail, or on CallPilot.

For information about how to ensure that voice processing commands run
successfully, see the Contact Center - Manager, Communication Server 1000
and Voice Processing Guide.

Caller hears voice prompts but is not presented to an agent


The caller hears the voice prompts, but is not connected to an agent. This
behavior occurs if a transfer fails after a GIVE IVR command to a third-party
voice processing system.

If the GIVE IVR script command is used with a third-party IVR application or a
CallPilot or Meridian Mail voice menu to transfer a call to a DN that is busy,
Contact Center Manager loses control of the call. When you use the GIVE IVR
command, always transfer the call to an ACD-DN.

For information about the GIVE IVR command in SIP-enabled contact centers,
see “GIVE IVR” on page 679.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 559


Troubleshooting Standard 8.05

Callers hear a broadcast announcement too many times


The caller hears a broadcast announcement repeated several times. This behavior
occurs only if the script repeats the same voice segment within the GIVE
CONTROLLED BROADCAST command. For example:
GIVE CONTROLLED BROADCAST
PLAY PROMPT VOICE SEGMENT welcome_vs
VOICE SEGMENT welcome_vs

560 Contact Center Manager


December 2007 Troubleshooting

Networking problems

The following sections describe possible problems with network processing.

Script execution stops in the network script


This situation occurs only if you purchased the NSBR option. When a call is
networked out and the agent at the destination site becomes unavailable for some
reason (such as the agent using the Not Ready key on the phoneset), the network
script is executed. If the network script references a subscript that contains any
of the following commands or intrinsic, script execution stops, the call remains
in the queue, and the caller continues to hear any previous treatments. Contact
Center Manager logs an error to the alarm monitor and event browser:
„ GIVE BUSY
„ GIVE BUSY CONTROLLED
„ GIVE OVERFLOW
„ GIVE OVERFLOW CONTROLLED
„ QUEUE TO NACD
„ QUEUE TO NETWORK SKILLSET
„ CHANGE PRIORITY IN NACD
„ CHANGE PRIORITY IN NETWORK SKILLSET
„ REMOVE FROM NACD
„ REMOVE FROM NETWORK SKILLSET
„ PRIORITY IN NETWORK QUEUE (intrinsic)

Do not use the preceding commands or intrinsic in the network script as they
cause script execution to stop.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 561


Troubleshooting Standard 8.05

Queue to Network Skillset command does not successfully route call


This situation occurs only if you purchased the NSBR option. If you attempt to
route a call to another Contact Center Manager site using the Queue to Network
Skillset command, yet the call does not arrive at the site, the network
communication link between the sites may not be functioning properly.

You can use the PRIORITY IN NETWORK QUEUE intrinsic to determine if


the call was successfully routed to another Contact Center Manager site.

562 Contact Center Manager


December 2007 Troubleshooting

Phantom calls

A phantom call is a call that is no longer active on the switch, but which the
Statistical Data Manager or the call processing subsystem treats as though it is
still active. That is, the server continues to collect statistics for the call and
provide treatments for it.

Diagnosis
If you have calls in your system for an extended period of time, those calls can
be phantom calls. However, other conditions, such as incorrectly written scripts,
can make calls remain in the system for a long time.

Calls that are not treated correctly in the script show as Waiting in the
application real-time statistics but not in the skillset real-time statistics. For
example, calls that are queued to a skillset that is out of service or calls that are
unqueued show as Waiting in the application real-time statistics but not in the
skillset real-time statistics.

Check your scripts to ensure that there are no infinite loops and that no calls are
queued to skillsets that are out of service. If no problems exist in your scripts,
the oldest calls in the system can be phantom calls.

Possible causes
Phantom calls can occur if the system is configured incorrectly. Make sure that
you
„ installed all of the latest Contact Center Manager Service Updates (SU)
„ dedicated voice ports to Contact Center Manager; the server must not share
voice ports with other applications
„ created separate ACD-DNs for GIVE IVR and ACCESS voice ports

Scripting Guide for Communication Server 1000/Meridian 1 PBX 563


Troubleshooting Standard 8.05

Solution
Verify that your system is configured correctly. For more information, see the
Contact Center - Manager, Communication Server 1000 and Voice Processing
Guide. If the problem persists, contact Nortel customer support.

564 Contact Center Manager


December 2007 Troubleshooting

Validation errors

This section contains a list of errors that you can receive when you validate a
script. The following table lists the error numbers and the text of the error
messages, and gives a brief explanation of each error.

Error
num Error message Description

14 An end-of-file is encountered An end-of-comment symbol (*/) is missing. Insert


before the comment is the symbol at the end of commented text.
terminated with an end-of-
comment “*/”.

15 Syntax error or unsupported A syntax error can occur when the Script Validator
command. cannot understand a command because of a
missing or incorrect keyword. If you cannot see the
error in the line of the script indicated by the Script
Validator, check the previous line for errors. For the
correct syntax of commands, use the Script
Command Reference panel, or see the description
of the command in this document.
An unsupported command is one that cannot be
used in the network script. For a list of commands
that cannot be used in the network script, see
“Network script restrictions” on page 274.
The network script applies only if you purchased
the NSBR feature for the switch.

16 An end-of-file is encountered There is an incomplete command in the line


in the script in the middle of indicated by the Script Validator. For the correct
a statement. syntax of the command, use the Script Command
Reference panel, or see “Basic script commands”
on page 193 and “Advanced script commands” on
page 245.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 565


Troubleshooting Standard 8.05

Error
num Error message Description

17 A carriage return is A string literal is a string of characters surrounded


encountered in a string literal by quotation marks. For example, “This is a string.”
before the closing quotation There is a hard return inside a string of quoted text.
marks. Remove the hard return.
18 An end-of-file is encountered A string literal is a string of characters surrounded
in a string literal before the by quotation marks. For example, “This is a string.”
closing quotation marks. A closing quotation mark (”) is missing from the
line indicated by the Script Validator.

19 String literals cannot be A string literal is a string of characters surrounded


longer than 80 characters. by quotation marks. For example, “This is a string.”
There are too many characters in the string of text.
Reduce the number of characters in the string to 80
or fewer.

20 Valid integer constants Ensure that the number on the line indicated by the
cannot be greater than Script Validator is valid.
1999999999 or less than –
1999999999.

21 WildCLID constants cannot An incorrect WildCLID constant is specified in the


be longer than 32 digits. line indicated by the Script Validator. Make sure
that the WildCLID constant is 1–32 digits in
length.

22 CDN or DNIS range is 1–31 Ensure that the CDN or DNIS number on the line
digits. indicated by the Script Validator is 1–31 digits in
length.

23 Agent IDs can be maximum An invalid agent ID or skillset is specified in the


16 digits, skillsets 30. line indicated by the Script Validator. Make sure
that the agent ID is not longer than 16 digits or that
the skillset is not longer than 30 alphanumeric
characters.

566 Contact Center Manager


December 2007 Troubleshooting

Error
num Error message Description

24 Max day of month is 31. An invalid day of month is specified in the line
indicated by the Script Validator. Make sure that
the day of month is from 1 to 31.

25 Time of day ranges from An invalid time of day is specified in the line
00:01 to 23:59. indicated by the Script Validator. Make sure that
the time of day is from 00:01 to 23:59.

26 Time format was incorrect An invalid time format is specified in the line
(three-digit hours, and so indicated by the Script Validator. Make sure that
on). you specify the time in the format hh:mm.

27 Valid music, RAN, route An invalid music, RAN, or route number is


number is 0 to 511. specified in the line indicated by the Script
Validator. Make sure that the number is from 0–
511.

28 DNs or CLIDs can be max An invalid DN or CLID number is specified in the


32 digits. line indicated by the Script Validator. Make sure
that the number is 1 to 32 digits in length.

31 Valid priority 1 to 6. An invalid priority is specified in the line indicated


by the Script Validator. Make sure that the priority
is from 1 to 6.

32 IDs (variable names) can be An invalid variable name is specified in the line
30 characters max. indicated by the Script Validator. Make sure that
the variable name is from 1 to 30 characters in
length.

33 Incorrect format for An invalid WildCLID is specified in the line


WildCLID was used indicated by the Script Validator. For information
(Wildcards @/? in about using wildcard characters, see “Example 2
WildCLID were used (using wildcards)” on page 419.
improperly.)

Scripting Guide for Communication Server 1000/Meridian 1 PBX 567


Troubleshooting Standard 8.05

Error
num Error message Description

34 Char not valid in language An invalid character is in the line indicated by the
({, |, and so on) was Script Validator. Remove invalid characters.
encountered.

36 Sets (lists and ranges) must The set of values in the line indicated by the Script
contain elements of the same Validator contains values of different types, or
type, and variables cannot mixes constants with variables. Make sure that all
(currently) be mixed with of the values are the same type, and remove either
constants, even if they are of the constants or the variables.
the same type.

37 The variable specified is not The variable in the line indicated by the Script
the expected type. Validator is not the correct type. Use a different
variable, or change the variable type. For more
information, see “Working with script variables”
on page 99.
39 An EXECUTE statement An EXECUTE statement in the line specified by
references a non-existent the Script Validator references a section that does
label. not exist. Make sure that the section exists and that
it is referenced correctly (that is, use exact spelling)
by the EXECUTE statement.

40 A label is defined in more A section name is repeated in the script. Rename


than one place. one of the sections.

41 In the Event Handler, no An event is repeated in the EVENT HANDLER


event can be handled more statement. Remove the repeated event.
than once.

42 This statement cannot be the An invalid first statement is in the script. For a list
first statement in a script. of statements that cannot be used as the first
statements in a script, see “First command rule” on
page 65.

568 Contact Center Manager


December 2007 Troubleshooting

Error
num Error message Description

44 A set (variable or constant) You can use only a variable of class Item or a single
cannot be used in a prompt. constant number for a prompt. If you use a variable
for the prompt indicated (by line number) by the
Script Validator, make sure its class is set to Item.
47 Day in date is invalid (three An invalid day is specified in the date. Make sure
digits, and so on). that the correct day is specified. The day should
contain no more than two digits.Valid date formats
are as follows:
May 4, 16 July, Dec 13

49 Invalid date for month The date specified for the month in the line
specified. indicated by the Script Validator is invalid. For
example, Feb. 30 and Nov. 31 are invalid. Make
sure that you specify the correct date.

50 Max 20 agents IDs in set Too many agent IDs are in the list specified by the
(list). Script Validator (by line number). Make sure that
the list contains no more than 20 agent IDs.

51 Too many skillsets are listed Too many skillsets are listed in the line indicated.
for this command. Skillset-related commands can use no more than 20
skillsets in the list of skillsets. If the command
relates to an NSBR feature (Communication Server
1000/Meridian 1 PBX only), no more than 10
skillsets can be listed.
52 Invalid type in Unary Minus A Unary Minus operation is an operation in which
operation. you change the sign of a mathematical expression
using a negative sign (–) in front of the expression.
(For example, ASSIGN –variable2 TO variable1.)
The variable being negated must be type Integer or
Seconds.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 569


Troubleshooting Standard 8.05

Error
num Error message Description

53 Invalid type (left side) in The value on the left side of the Addition operation
Addition operation. is invalid. The left and right sides must be type
Integer or Seconds. For more information, see
“Mathematical expressions” on page 460.
54 Invalid type (right side) in The value on the right side of the Addition
Addition operation. operation is invalid. The left and right sides must
be type Integer or Seconds. For more information,
see “Mathematical expressions” on page 460.

55 Invalid type (left side) in The value on the left side of the Subtraction
Subtraction operation. operation is invalid. The left and right sides must
be type Integer or Seconds. For more information,
see “Mathematical expressions” on page 460.

56 Invalid type (right side) in The value on the right side of the Subtraction
Subtraction operation. operation is invalid. The left and right sides must
be type Integer or Seconds. For more information,
see “Mathematical expressions” on page 460.

57 Invalid type (left side) in The value on the left side of the Multiplication
Multiplication operation. operation is invalid. The left and right sides must
be type Integer or Seconds. For more information,
see “Mathematical expressions” on page 460.

58 Invalid type (right side) in The value on the right side of the Multiplication
Multiplication operation. operation is invalid. The left and right sides must
be type Integer or Seconds. For more information,
see “Mathematical expressions” on page 460.

59 Invalid type (left side) in The value on the left side of the Division operation
Division operation. is invalid. The left and right sides must be type
Integer or Seconds. For more information, see
“Mathematical expressions” on page 460.

570 Contact Center Manager


December 2007 Troubleshooting

Error
num Error message Description

60 Invalid type (right side) in The value on the right side of the Division
Division operation. operation is invalid. The left and right sides must
be type Integer or Seconds. For more information,
see “Mathematical expressions” on page 460.
61 Sets (left side) are not A set (that is, more than one value) is included in
allowed in Addition the Addition operation. This is invalid. Ensure that
operations. there is only one value. If a variable is on the left
side of the equation, ensure that the class of the
variable is set to Item.

62 Sets (right side) are not A set (that is, more than one value) is included in
allowed in Addition the Addition operation. This is invalid. Ensure that
operations. there is only one value. If a variable is on the right
side of the equation, ensure that the class of the
variable is set to Item.
80 Incompatible types in Less The values in the Less Than or Equal To expression
Than or Equal To relational cannot be compared. Use only types Integer and
expression. Seconds. For more information, see “Mathematical
expressions” on page 460.

81 Incompatible types in The values in the Greater Than expression cannot


Greater Than relational be compared. Use only types Integer and Seconds.
expression. For more information, see “Relational expressions”
on page 462.

82 Incompatible types in The values in the Greater Than or Equal To


Greater Than or Equal To expression cannot be compared. Use only types
relational expression. Integer and Seconds. For more information, see
“Relational expressions” on page 462.
83 Constants in range must be Both ends in the range are not the same type. (For
of same type. example, Monday .. March is an invalid range
because both ends of the range are not the same
type.) Make sure that all values in the range are the
same type.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 571


Troubleshooting Standard 8.05

Error
num Error message Description

84 In a WHERE-EQUALS Either the Where statement or one of the value


statement the Where statements in the WHERE-EQUALS command
expression must be of the contains data of the wrong type. The Where value
same type as the value lists. must be the same type as the values in the values
list. For more information, see “WHERE-
EQUALS” on page 261.

85 The Where expression in the The Where statement in the line indicated by the
WHERE-EQUALS Script Validator contains invalid data. Make sure
statement cannot be a set. that the value in the Where statement is a single
value only. You cannot use sets of values. If you
use a variable, make sure that its class is set to
Item.

86 Sets cannot be used on the The Equal To operator in the line indicated by the
left side of the Equal To Script Validator contains invalid data. Make sure
operator. that the value on the left side of the operator is a
single value only. You cannot use sets of values. If
you use a variable, make sure that its class is set to
Item.

87 Sets cannot be used on the The Not Equal To operator in the line indicated by
left side of the Not Equal To the Script Validator contains invalid data. Make
operator. sure that the value on the left side of the operator is
a single value only. You cannot use sets of values.

88 WildCLID constants cannot The ASSIGN TO command in the line indicated by


be assigned to call variables the Script Validator contains an invalid value. Do
in an ASSIGN TO command. not use a WildCLID with the ASSIGN TO
command.

89 A set cannot be assigned to a The ASSIGN TO command in the line indicated by


call variable in an ASSIGN the Script Validator contains an invalid value. Make
TO command. sure that only a single value is assigned to the call
variable. You cannot use sets of values.

572 Contact Center Manager


December 2007 Troubleshooting

Error
num Error message Description

90 Variable cannot be in a set. One of the following problems is indicated:


„ The variable class is Set, but the variable is an
invalid type for a set (for example, Boolean).
„ The command cannot use a variable whose
class is Set, a constant list, or a range.
91 Unknown variable type. The variable in the line indicated by the Script
Validator is not defined or is an unknown type.
Make sure that the variable is properly created and
is the correct type for the command. If this error
still appears after revalidating the script, it can
indicate a product problem. If this problem persists,
report this error to your Nortel customer support
representative.

92 Incompatible types in The values in the ASSIGN TO command in the line


ASSIGN TO command. indicated by the Script Validator are not
compatible. For more information, see “ASSIGN
TO” on page 196.

95 <MaxDigits> cannot be a set The maximum digits parameter must be a single


type. value. Make sure that you specify only one value
(not a set of values). If you use a variable to
indicate the number of digits, make sure that the
class is Item.

97 An undefined skillset is used. An invalid skillset is specified in the line indicated


by the Script Validator. Make sure that the skillset
exists and is properly referenced in the script. If
you use a variable, make sure that it is created, that
it is type Skillset, and that its value is a valid
skillset.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 573


Troubleshooting Standard 8.05

Error
num Error message Description

98 An undefined agent ID is One of the following problems occurred:


used. „ A variable in the line indicated by the Script
Validator is not defined. This variable is
expected to be type Agent.
„ No agent is defined with the agent logon ID
specified in the line indicated by the Script
Validator.
Make sure that the agent exists and is assigned the
correct ID. If you use a variable, ensure that it is
defined correctly and is type Agent.

99 An undefined script is An invalid script name is in the EXECUTE


referenced in the EXECUTE SCRIPT command in the line indicated by the
SCRIPT command. Script Validator. Make sure that the script exists
and that it is properly referenced (that is, it is
spelled correctly) in the EXECUTE SCRIPT
command.

100 An undefined identifier is A name (or an identifier) is used in the script, but
encountered. no skillset, variable, or script is defined in the
system with this name.

102 Illegal statement is used in An invalid statement is in the Event Handler. For a
Event statement. list of valid statements that you can use in the
Event Handler, see “EVENT HANDLER” on page
247.

106 Division by zero is not An error in the division operation is in the line
allowed. indicated by the Script Validator. You cannot divide
by zero.
107 An EXECUTE/SECTION Change the name of the SECTION label in the line
label should not be the same indicated by the Script Validator so that it is not the
as a variable name or a same as a skillset or variable name. The system is
skillset name. case-insensitive, so the label names must differ by
more than just the case of the letters.

574 Contact Center Manager


December 2007 Troubleshooting

Error
num Error message Description

108 Only call variables can be The variable used with the ASSIGN TO command
used on the left side of the in the line indicated by the Script Validator is a
ASSIGN TO command. global variable, which is not correct. You must
delete the variable and create it again, this time
choosing Call as the variable type. For more
information, see “Adding variables” on page 110.

109 The variables used in third- The variable class for the SEND INFO, SEND
party statements (SEND REQUEST, or GET RESPONSE variable should
INFO, SEND REQUEST, be Item.
GET RESPONSE) cannot be
sets.
111 A GET RESPONSE A GET RESPONSE statement is missing after the
statement must appear SEND REQUEST statement. For more
immediately after a SEND information, see “GET RESPONSE” on page 336.
REQUEST statement.

112 No more than 10 variables Too many variables are listed in the SEND INFO,
are allowed as parameters in SEND REQUEST, or GET RESPONSE command
each third-party statement. in the line number indicated by the Script Validator.
Remove as many variables as necessary.

113 Third-party variables can be The variable in the line indicated by the Script
of the following types: DN, Validator is the wrong type. Change the type to one
CLID, ACD, CDN, DNIS, the following: DN, CLID, ACD, CDN, DNIS,
LOC, NPA, NXX, LOC, NPA, NXX, NPANXX, String, Integer. For
NPANXX, String, Integer. more information, see “Changing variable
properties” on page 119.

114 Invalid use of keywords or The line indicated by the Script Validator contains
punctuation. an invalid keyword or invalid punctuation. For the
correct syntax of a command, use the Script
Command Reference panel, or see “Basic script
commands” on page 193 and “Advanced script
commands” on page 245.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 575


Troubleshooting Standard 8.05

Error
num Error message Description

115 Missing parentheses. A parenthesis is missing in the line indicated by the


Script Validator. Insert the parenthesis where
appropriate.

116 Only variables of Boolean The variable in the line indicated by the Script
type are allowed. Validator should be a Boolean-type variable. For
more information, see “Changing variable
properties” on page 119.

117 Invalid Boolean value. Must In a WHERE-EQUALS command, if you use a


be True/1 or False/0. boolean-type variable for the expression, the Value
clauses must also be Boolean. However, you can
also use a constant 1 or 0 to represent True or False.
The constants 1 and 0 are the only valid constants.

118 TIMER variable must be The timer variable in the line indicated by the
seconds type. Script Validator should be a Seconds-type variable.

120 Only variables of DN and The variable type in the line indicated by the Script
ACD type are allowed. Validator is invalid. The variables indicated must
Variables cannot be sets. be the type DN or ACD. The class must be Item.
For more information, see “Changing variable
properties” on page 119.

121 Statement is part of the The script command in the line indicated by the
Advanced Script Elements Script Validator is an advanced command. You
package. Package not must purchase the Nortel Symposium Call Center
purchased. Server 200 application software package to use
advanced commands.

122 Advanced Scripts Package A server installation problem. Try to revalidate the
Query failed. script. If the problem persists, contact your Nortel
customer support representative.

123 No SEND REQUEST before A SEND REQUEST statement is missing before


GET RESPONSE. the GET RESPONSE statement. For more
information, see “SEND REQUEST” on page 334.

576 Contact Center Manager


December 2007 Troubleshooting

Error
num Error message Description

124 Invalid value assigned to this The value assigned to the variable in the line
variable. Check limit for indicated by the Script Validator is invalid. Change
variables of this type. the value of the variable. For more information, see
“Sets of values in variables” on page 103.
125 Range of seconds is 0 to An incorrect number of seconds is specified in the
65535. line indicated by the Script Validator. Make sure
that the number of seconds you specify is from 0 to
65535.

126 Treatment range is 1 to 7 An incorrect treatment number is in the line


digits. indicated by the Script Validator. Make sure that
the treatment number is 1 to 7 digits in length.

127 ACD range is 2 to 7 digits. There is an incorrect ACD number in the line
indicated by the Script Validator. Make sure that
the ACD is 2 to 7 digits in length.

128 Variables used in this context An invalid variable type is in the line indicated by
must be Boolean. the Script Validator. Make sure that the variable is a
Boolean-type (that is, has a True or False value)
variable.

129 Numbers cannot be greater The number in the line indicated by the Script
than 32 digits. Validator is not valid. Make sure that the number is
no longer than 32 digits.

130 Agent ID expression cannot An expression or a statement with a return type of


be compared with constant Agent ID cannot be compared with a list of
ranges. Use variable instead. constant Agent ID values or a range of Agent ID
values. That is, IF LONGEST IDLE AGENT
skillset1 = 1111, 2222 cannot be used. Use a set
type variable instead.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 577


Troubleshooting Standard 8.05

Error
num Error message Description

131 Statement is part of Host A third-party statement (SEND INFO, SEND


Data Exchange API feature. REQUEST, GET RESPONSE) was encountered in
Feature not purchased or the script. Either you did not purchase the feature
error accessing database. or a database error occurred when the system
accessed the features purchased.

137 Call Center Manager feature You did not purchase the package that includes the
not purchased or error set of basic features for the system to work or a
accessing database. database error occurred when the system accessed
the features purchased.

138 Intrinsic not supported for An intrinsic statement that is not supported for the
ICM protocol. ICM protocol was encountered in the script.

139 Call Data index out of range. The value of the Call Data intrinsic is incorrect.
Valid range is 1 to 10. Ensure that the value is an integer from 1 to10.

141 Incomplete comment. Check “/*” specifies the beginning of a comment and “*/”
that a previous comment was specifies the end of a comment. This error is
terminated properly. logged when a comment is not terminated properly
or when another comment starts before a previous
comment ends.

143 A Wildcard constant/variable In an IF statement comparison, a wildcard (a


cannot be used on the LHS of constant or a variable) cannot be on the left side of
an Equal comparison the equal sign (=). That is, you cannot use IF @23
statement. = c_wildcard THEN...

144 A Wildcard constant/variable In an IF statement comparison, a wildcard (a


cannot be used on the LHS of constant or a variable) cannot be on the left side of
a Not Equal comparison the not equal symbol (<>). That is, you cannot use
statement. IF @23 <> c_wildcard THEN...
145 A Wildcard constant/variable In a WHERE statement, a wildcard (a constant or a
cannot be used in the <exp> variable) cannot be in the expression. That is, you
in a WHERE <exp> cannot use WHERE c_wildcard EQUALS ...
EQUALS statement.

578 Contact Center Manager


December 2007 Troubleshooting

Validation option rules

This section contains a list of errors that you can receive if you configure the
Validation Options dialog box to inform you when you break scriptwriting rules.
The table lists the rule numbers, provides the text of the error messages, and
gives tips to avoid breaking rules.

Num Statement Description

Rule 1 Choose a different Scripts cannot begin with this command.


command as the first
command in the script.

Rule 2 Remove all statements Any statements following this command


after this command. are ignored.
Rule 3 Move this statement to the This statement must be the first statement
beginning of the script. in the script

Rule 4 Insert a DEFAULT clause This clause should be included in


into the WHERE...EQUALS element.
WHERE...EQUALS
element.

Rule 5 Remove the GIVE BUSY This command must not be followed by a
command or the GIVE GIVE BUSY or GIVE OVERFLOW
OVERFLOW command, command.
or insert another command
before the command the
message refers to.
Rule 6 Simplify this statement as Code structure tip.
follows: IF OUT OF
SERVICE <skillset_1>,
<skillset_2>,
<skillset_3>,...THEN...

Scripting Guide for Communication Server 1000/Meridian 1 PBX 579


Troubleshooting Standard 8.05

Num Statement Description

Rule 8 Insert IF NOT OUT OF You should use the OUT OF SERVICE
SERVICE <skillset> <skillset> intrinsic to test the skillset queue
THEN before the QUEUE before the QUEUE TO SKILLSET
TO SKILLSET command. command.

Rule 9 Insert a WAIT command Loops must contain at least one statement
or an announcement that suspends script execution for a finite
treatment inside the loop. time, such as WAIT or an announcement
treatment.
Rule Insert a test of the Loops must have an exit so that they do not
10 QUEUED intrinsic or loop indefinitely if the call is not queued.
AGE OF CALL intrinsic,
and exit the loop if the call
is not queued.

Rule Insert WAIT 2 (minimum) There must be a WAIT command


11 after the QUEUE TO immediately following a QUEUE TO
command. command.

Rule Remove the duplicate After a QUEUE TO SKILLSET command


12 QUEUE TO SKILLSET executes, it is not necessary to run it again
command, or insert an IF for the same skillset, unless the next
NOT QUEUED THEN QUEUE TO SKILLSET command follows
statement before the an IF NOT QUEUED THEN statement.
command.

Rule Remove the duplicate After a QUEUE TO AGENT executes,


13 QUEUE TO AGENT there is no need to run it again for the same
command, or insert an IF agent, unless the second (or next) QUEUE
NOT QUEUED THEN TO AGENT follows an IF NOT QUEUED
statement before the THEN statement.
command.

580 Contact Center Manager


December 2007 Troubleshooting

Num Statement Description

Rule Remove all duplicate After a QUEUE TO NACD command is


14 QUEUE TO NACD executed, it is not necessary to execute it
commands. again, regardless of ACD queue.
This rule applies only if
you purchased the
Network Skill-Based
Routing feature.

Rule Remove this statement. This command is not allowed in Network


16 This rule applies only if scripts.
you purchased the
Network Skill-Based
Routing feature.

Rule Use an IF NOT QUEUED There should be an IF NOT QUEUED


17 THEN command to test if THEN command in Network scripts to test
the call is queued. if the call is queued.
This rule applies only if
you purchased the
Network Skill-Based
Routing feature.

Rule Use the QUEUE TO Using the QUEUE TO NETWORK


18 SKILLSET command if SKILLSET command does not queue the
you want to queue the call call to local agents or skillsets.
to local agents or skillsets.
This rule applies only if
you purchased the
Network Skill-Based
Routing feature.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 581


Troubleshooting Standard 8.05

Num Statement Description

Rule After the call is queued to The QUEUED intrinsic is not useful to be
19 NACD, only use the tested in a loop if the call is already queued
QUEUED intrinsic once. to NACD.
This rule applies only if
you purchased the
Network Skill-Based
Routing feature.

582 Contact Center Manager


Appendix B

Scripting keywords

In this appendix
Reserved keywords 584

Scripting Guide for Communication Server 1000/Meridian 1 PBX 583


Scripting keywords Standard 8.05

Reserved keywords

The keywords listed in this section are reserved within the Contact Center
Manager scripting language. Do not use the keywords as user-defined names or
labels.

Scripting keywords specific to the Communication Server 1000/


Meridian 1 PBX switch
The words in this list are applicable only if your switch is a Communication
Server 1000/Meridian 1 PBX. If you use this switch, you must consult both this
list and the list for “Scripting keywords (non-switch specific)” on page 586,
which lists all other keywords (non-switch specific).

ANNOUNCEMENT

BROADCAST

COLLECT

CONFERENCED

CONTROLLED

INTERNATIONAL

INTERRUPTIBLE

NETWORK

NONCONTROLLED

PLAY

PROMPT

SEGMENT

TRANSFERRED

584 Contact Center Manager


December 2007 Scripting keywords

TREATMENT

VOICE

Scripting keywords specific to the SIP switch


The words in this list are applicable only if your switch type is SIP. If you use
this switch, you must consult both this list and the list for “Scripting keywords
(non-switch specific)” on page 586, which lists all other keywords (non-switch
specific).

The keywords marked with an asterisk (*) are input parameters to the VXML
treatments provided by the Media Application Server (MAS) and are case-
sensitive. These Contact Center Manager script variables are automatically
created when SIP is enabled on Contact Center Manager Server.

ADDRESS

HEADER

im *

interdigittimeout *

notypeahead *

numberofdigits *

PARAMETERS

PREFERRED

promttoplay *

RETURNS

SERVICEURI

SIP

SUBJECT

termchar *

Scripting Guide for Communication Server 1000/Meridian 1 PBX 585


Scripting keywords Standard 8.05

TREATMENT

urltopush *

USER

vars *

VXML

vxmlfrom *

vxmlto*

WHERE

WITH

Scripting keywords (non-switch specific)


Consult this table for a list of keywords that are valid regardless of the switch
that you use.

%AGENT%

%DATE%

%PRIORITY%

%SKILLSET%

%TIME%

ABANDON

ACD

ACTIVE

AGE

AGE OF CONTACT

586 Contact Center Manager


December 2007 Scripting keywords

AGENT

AGENTS

AHEAD

AND

ANSWER

ANSWERED

APPLICATION

APR

APRIL

ASSIGN

ASSIGNED

AUG

AUGUST

AVERAGE

BUSY

BY

CALL

CALLS

CDN

CHANGE

CHARACTER

CHINESE

Scripting Guide for Communication Server 1000/Meridian 1 PBX 587


Scripting keywords Standard 8.05

CLID

CONSULTED

CONTACT DATA

CONTACT TYPE

CONTINUOUS

COUNT

CUSTOMERID

DATA

DATE

DAY

DEC

DECEMBER

DEFAULT

DEQUEUE

DIALED

DIGIT

DIGITS

DIRECT

DISCONNECT

DISTURB

DN

DNIS

588 Contact Center Manager


December 2007 Scripting keywords

DO

ELSE

END

ENGLISH

EQUALS

EVENT

EXECUTE

EXPECTED

FAIL

FALSE

FEB

FEBRUARY

FOR

FOREVER

FORWARD

FRENCH

FRIDAY

FROM

FROMADDRESS

GERMAN

GET

GIVE

Scripting Guide for Communication Server 1000/Meridian 1 PBX 589


Scripting keywords Standard 8.05

HANDLER

HOLD

ID

IDLE

IF

IN

INCOMING

INFO

INTER

INTO

IVR

JAN

JANUARY

JAPANESE

JUL

JULY

JUN

JUNE

LANGUAGE

LEAST

LOC

LOCATION

590 Contact Center Manager


December 2007 Scripting keywords

LOG

LOGGED

LONGEST

MAR

MARCH

MAY

MONDAY

MONTH

MOST

MUSIC

NACD

NAME

NEXTYEAR

NIGHT

NO

NON

NOT

NOV

NOVEMBER

NPA

NPANXX

NUMBER

Scripting Guide for Communication Server 1000/Meridian 1 PBX 591


Scripting keywords Standard 8.05

NUMBERBYDIGIT

NXX

OCT

OCTOBER

OF

OLDEST

ON

OPEN

OR

OUT

OVERFLOW

PORTUGUESE

POSITION

PRESENT

PRIORITY

QUEUE

QUEUED

QUEUES

QUEUETYPE

QUIT

RAN

RATE

592 Contact Center Manager


December 2007 Scripting keywords

RECEIVED

RELEASED

REMOVE

REQUEST

RESPONSE

RETRIEVE

RETURN

RINGBACK

RINGING

ROUTE

ROUTEPOINT

SATURDAY

SCRIPT

SECTION

SEND

SEP

SEPTEMBER

SERVICE

SESSION

SET

SILENCE

SKILLSET

Scripting Guide for Communication Server 1000/Meridian 1 PBX 593


Scripting keywords Standard 8.05

SPANISH

SPEED

SUCCESS

SUNDAY

TERMINATING

THEN

THURSDAY

TIME

TIMEOUT

TIMER

TO

TOADDRESS

TOTAL

TRUE

TUESDAY

TYPE

URI

VALUE

VOICE

WAIT

WAITING

WEDNESDAY

594 Contact Center Manager


December 2007 Scripting keywords

WEEK

Scripting Guide for Communication Server 1000/Meridian 1 PBX 595


Scripting keywords Standard 8.05

596 Contact Center Manager


Appendix C

Using HDX

In this appendix
Using Provider 598

Scripting Guide for Communication Server 1000/Meridian 1 PBX 597


Using HDX Standard 8.05

Using Provider

Provider (provider.exe) is an application that receives contact center script


information over the Host Data Exchange (HDX) interface between the Contact
Center Manager Server (provider.exe host) and the Contact Center Manager
Administration server (scripts).

Also, you can configure Provider to return information to the contact center
script because Provider has a receiving side and a sending side. The receiving
side receives both SEND INFO and SEND REQUEST information from the
contact center script. You can configure the sending side to send a variety of
information to the contact center script. The contact center script command GET
RESPONSE receives the information sent by the Provider.

This appendix shows how you can use the provider.exe application to verify the
caller information received from the switch.

598 Contact Center Manager


December 2007 Using HDX

Service Provider
The following is an image of the Service Provider main page in the Provider
application.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 599


Using HDX Standard 8.05

Functionality
The following table describes the fields in the Provider application.

Provider Provider
component subcomponent Functionality

Main Server Site IP To connect to Contact Center


Address box Manager Server, you must enter the
CLAN IP address of the server.
Use this box with the Connect to
Server button.

Main Connect to Server After you enter the CLAN IP address


button for the Contact Center Manager
Server, click this button to connect to
the server.

Main Enter Register ID Use this box to enter the value used
box by Provider to communicate with the
HDX interface.
Create this value in Contact Center
Manager Administration script
variables as a global variable.

Main Register button After you connect to Contact Center


Manager Server, click this button to
register the Register ID for the HDX
interface.
If the Register ID is incorrect,
Provider returns a Register Fail
window.
If successful, the Register button
changes to Unregister.

600 Contact Center Manager


December 2007 Using HDX

Provider Provider
component subcomponent Functionality

Request Data Don't Show If enabled, no information is returned


Received Data to Provider (Request Data) from the
check boxes Contact Center Manager
Administration script.
Select the check box to increase the
performance of Provider.

Request Data 1st box—10th Accepts the first to tenth piece of


box caller information sent by the Contact
Center Manager Administration
script, as defined in the Contact
Center Manager Administration
script.
Provider can handle only 10
parameters (80 characters each) of
caller information as defined in the
Contact Center Manager
Administration script.

Request Data Server Request The Server Request ID is the


ID box reference number for matching
response messages from this
provider.
Used when responding with the
SEND REQUEST message. In a
manual response to the SEND
REQUEST messages, the Server
Request ID is used in the Server
Request ID of the Completion Data.

Request Data Call ID box This value is the call ID assigned by


the switch or the contact ID assigned
by the contact.

Request Data Held Call ID box This value is the held call ID. This
applies only to voice contacts.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 601


Using HDX Standard 8.05

Provider Provider
component subcomponent Functionality

Request Data Network Call ID This value is the network call ID.
box This applies only to voice contacts.

Request Data Node ID box This value is the customer site ID.

Main SEND INFOs SEND INFO received displays the


received button number of SEND INFO messages
received by this provider.

Main SEND INFOs Click Refresh to display the up-to-


Refresh button date results of the SEND INFO
received box.

Main SEND INFOs Resets the SEND INFO box count to


Reset button zero.
Main SEND SEND REQUEST Received displays
REQUESTs the number of SEND REQUEST
Received box messages received by this provider.
Main SEND Click Refresh to display the up-to-
REQUESTs date results of the SEND REQUEST
Refresh button Received box.
Main SEND Resets the SEND REQUEST box
REQUESTs count to zero.
Reset button

Main SEND SEND REQUEST Failure displays


RESPONSE the number of failed messages sent
Failures box (from Provider).
When the HDX sends a shutdown
request, Contact Center Manager
Server displays a message box to
inform you to reconnect with the
HDX service.

602 Contact Center Manager


December 2007 Using HDX

Provider Provider
component subcomponent Functionality

Main Auto Reconnect If the Auto Reconnect check box is


check box selected, Provider attempts to
reconnect when the HDX sends a
shutdown request.
If the Auto Reconnect check box is
clear, Provider displays a message
box when the HDX sends a shutdown
request.
In some cases, Provider loses
connection with Contact Center
Manager Server. If this occurs during
stress testing, use this tool try to
reconnect.

Main Log to file check Logs the information displayed by


box the Request Data. The logs are saved
to a file named ProviderOutput.log.
If you select the Log to file check
box, Provider captures the request
data information to a file.

Completion Data Echo Data Data received on the SEND


Received check REQUEST (from the Contact Center
box Manager Administration script) by
Provider is automatically returned to
the contact center script.
For example, if Request Data #1
contains test, Return Parameter 1
check box contains test.
Selecting the Echo Data Received
automatically enables the Automatic
Response selection. This selection
causes data received by this provider
to be echoed to the contact center
script.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 603


Using HDX Standard 8.05

Provider Provider
component subcomponent Functionality

Completion Data Use the Last Set Select Use the Last Set of Return
of Return Values Values to repeat the data on the last
check box send even if the data was modified.

Completion Data Return Parameter A parameter returned to the Contact


1 box Center Manager Administration
script.
Note: No parameter is sent to the
script unless its check box is selected.

Completion Data Return Parameter A parameter is returned only when


1 check box the check box is selected.
Select the check box to send this
parameter to Contact Center Manager
Server.

Completion Data Return Parameter For this parameter only, select the
1 Auto Increment check box to automatically increment
check box the value for Return Parameter 1.

Completion Data Return Parameter A parameter to be returned to the


2 check box Contact Center Manager
Administration script.

Completion Data Return Parameter Returns a parameter only when


2 check box selected.
Use this component to test scripting
where half the calls perform an
action, and the other half of the calls
perform a different action.

Completion Data Return Parameter A parameter is returned to the


2 Toggle with Contact Center Manager
value check box Administration script.

604 Contact Center Manager


December 2007 Using HDX

Provider Provider
component subcomponent Functionality

Completion Data Return Parameter Select the check box to switch


2 Toggle with between the value for Toggle with
value check box value and Return Parameter 2 when
sending return parameters to the
Contact Center Manager
Administration script.

Completion Data Return Parameter A parameter is returned to the


3 check box Contact Center Manager
Administration script.

Completion Data Return Parameter Returns a parameter only when


3 check box selected.

Completion Data Return Parameter When a value (Random Number,


3 Special Feature Random String, Timestamp) is
list selected, this value overrides any
value in the Return Parameter 3
check box and is sent to the Contact
Center Manager Administration
script.
When Random Number is selected,
you can select a range for the random
number. For example, setting a range
from 1 to 8 corresponds to using
CallPilot to collect a digit from a
voice menu. You can test Contact
Center Manager Server scripting
without an operational CallPilot
integration.

Completion Data Return Parameter A parameter is returned to the


4–10 check box Contact Center Manager
Administration script.

Completion Data Return Parameter Returns a parameter only when


4–10 check box selected.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 605


Using HDX Standard 8.05

Provider Provider
component subcomponent Functionality

Completion Data Server Request The Server Request ID is the


ID check box reference number for matching
response messages from this
provider.
Used when responding with the
SEND REQUEST message. In a
manual response to the SEND
REQUEST messages, the Server
Request ID is used in the Server
Request ID of the Completion Data.

Completion Data Automatic Select this check box to automatically


Response check provide the Server Request ID to the
box Contact Center Manager
Administration script.
Select Automatic Response so that
any Return Parameters are
automatically sent upon receipt of a
SEND REQUEST message.

606 Contact Center Manager


December 2007 Using HDX

Provider Provider
component subcomponent Functionality

Main Manual Response Send parameters manually to the


button Contact Center Manager
Administration script. To use this
function, provide the Server Request
ID (same as the Request Data Server
Request ID) and all appropriate
return parameters in the Completion
Data section.
Manual Response can set the value of
a return parameter based on Request
data sent. Enter the data to be
returned, ensure the Server Request
ID here is the same as the Server
Request ID sent to the tool, and click
this button. You must do this before
the GET RESPONSE command in
the script times out.

Main Cancel button Closes Provider.

Main Help button Starts Provider Help.

The special features for the first three return parameters help test Contact Center
Manager Server under call traffic load testing.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 607


Using HDX Standard 8.05

Configuring Provider
Before you use the Provider application, you must create a register ID as a call
contact variable in the Script Manager.

The register ID can also be a global variable of type Integer.

Configuring the Provider application


1 From the Contact Center Manager Administration Launchpad, select
Scripting.
Result: The following window appears.

2 In the Scripting window, click the Contact Center Manager Server in the
left-hand pane.
3 Right-click the Script Variables tree item.

608 Contact Center Manager


December 2007 Using HDX

4 Select New.
Result: The following window appears.

5 On the General tab, create a global variable called provider_ID.


6 Click the Attribute tab.
7 Select INTEGER as the type.
8 Enter a value that the HDX application uses to register with Contact Center
Manager Server.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 609


Using HDX Standard 8.05

9 Click Submit.
Result: The provider_ID global variable is created.

10 Right-click the Script Manager tree item.


11 Select New.
12 Include the following statement in the script:
SEND INFO provider_ID CLID, DNIS, CDN
WHERE CDN EQUALS
VALUE 2350: EXECUTE SCRIPT Sales
VALUE 2351: EXECUTE SCRIPT Marketing
VALUE 2352: EXECUTE SCRIPT Helpdesk
VALUE 2353: EXECUTE SCRIPT QToAgt
DEFAULT: ROUTE CALL DEFAULT DN
END WHERE

610 Contact Center Manager


December 2007 Using HDX

13 Click Submit.
Result: The script is saved.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 611


Using HDX Standard 8.05

14 From the Contact Center Manager Server, go to Start > All Programs >
Nortel Contact Center > Server Utility > Provider.
Tip: You can also launch Provider.exe from a client PC that has a copy of
the provider.exe application.

15 In the Server Site IP Address box, type the Nortel server subnet address
of Contact Center Manager Server.
16 Click Connect To Server.
Result: A connection is made to Contact Center Manager Server.
17 In the Enter Register ID box, type the value defined for the provider_ID
global variable.

612 Contact Center Manager


December 2007 Using HDX

18 Click Register.
Result: The label on the Register button changes to UnRegister.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 613


Using HDX Standard 8.05

Testing SEND INFO


After Provider is registered with the Contact Center Manager Server, make a
telephone call to a controlled directory number (CDN) acquired by Contact
Center Manager.
Result: The caller information appears in the Provider.exe window. The number
of fields and the contents of the fields are determined by the number of fields
and types of fields included in the SEND INFO command. In this example, the
CLID appears in the 1st box, the DNIS appears in the 2nd box, and the CDN
appears in the 3rd box.

614 Contact Center Manager


Appendix D

Scripting for Multimedia and


Outbound

In this appendix
Overview 616
Using Multimedia Contact Intrinsics 617
%AGENT%AGENT 618
%DATE%DATE 620
%INTEGER%WAITTIME 622
%PRIORITY%PRIORITY 624
%SKILLSET%SKILLSET 625
%TIME%TIME 626
CONTACTSUBTYPE 628
CUSTOMERID 631
CUSTOMFIELD1 632
FROMADDRESS 633
NEXTYEAR 634
QUEUETYPE 636
TOADDRESS 641
Recommended scripts for Contact Center Multimedia 643
Filtering Real Time Display statistics for rescheduled contacts 662
Modifying the multimedia scripts 667

Scripting Guide for Communication Server 1000/Meridian 1 PBX 615


Scripting for Multimedia and Outbound Standard 8.05

Overview

For Contact Center Multimedia, recommended scripts and variables are


provided that use specialized intrinsics to route multimedia contacts correctly in
your contact center. Initially, you must integrate the recommended scripts with
you existing scripts to ensure correct system operation. For more information,
see “Integrating the scripts” on page 647.

The total number of Multimedia contacts queued must be limited to 20 000


contacts. Nortel recommends that the number of contacts queued across
multimedia skillsets is no more than 5000 contacts. For information on how to
limit the number of contacts by disconnecting the extra contacts, see the
Multimedia script “c_Master_Handles_Multimedia Script” on page 648. Also, if
there is a large number of multimedia contacts handled by the scripts, you can
decrease the frequency of the skillset queuing loop as defined in the
“c_Queue_Multimedia_Contact Script” on page 654.

The first section of this appendix covers the intrinsics required for the
Multimedia scripts.

616 Contact Center Manager


December 2007 Scripting for Multimedia and Outbound

Using Multimedia Contact Intrinsics

Contact Center Multimedia creates a number of contact data intrinsics for each
multimedia contact. The intrinsics are used within the sample scripts to correctly
route the contact.

The contact intrinsics for multimedia contacts are:


„ %AGENT%AGENT
„ %DATE%DATE
„ %INTEGER%WAITTIME
„ %PRIORITY%PRIORITY
„ %SKILLSET%SKILLSET
„ %TIME%TIME
„ CONTACTSUBTYPE
„ CUSTOMERID
„ CUSTOMFIELD1
„ FROMADDRESS
„ QUEUETYPE
„ TOADDRESS
„ NEXTYEAR

The following sections describes each intrinsic in detail.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 617


Scripting for Multimedia and Outbound Standard 8.05

%AGENT%AGENT

For scheduled contacts or transferred contacts, this intrinsic returns the agent
assigned to the contact by Contact Center Multimedia based on actions
performed by an agent on the Agent Desktop.

For reply e-mail contacts and new e-mail contacts from existing customers, this
intrinsic returns the preferred agent assigned to that customer.

An agent ID is sent in the contact data under the following conditions:


„ An agent saves an e-mail as pending with a scheduled presentation time.
„ An agent chooses a disposition code for an outbound contact that
reschedules the contact to be presented at a later time.
„ An agent transfers a contact to another agent.
„ An agent creates a scheduled callback contact from the Agent Desktop.
„ If a reply e-mail arrives from a customer, the preferred agent for that
customer is available as the agent ID in the scripts.
„ If a new e-mail arrives from an existing customer, the preferred agent for
that customer is available as the agent ID in the scripts.
„ An agent pulls a closed contact (pull-mode). In this case, a new contact is
created and sent to Contact Center Manager Server for processing by
scripts.

Syntax
The intrinsic must be used in conjunction with the CONTACT DATA intrinsic
and must be assigned to a script call variable before use.
ASSIGN CONTACT DATA "%AGENT%AGENT" TO contact_agent_cv

Return type
This intrinsic returns an AGENT_ID variable.

618 Contact Center Manager


December 2007 Scripting for Multimedia and Outbound

Example
This example stores the %AGENT%AGENT and %PRIORITY%PRIORITY
intrinsics in call variables and then queues the contact to the agent indicated by
%AGENT%AGENT with a priority of %PRIORITY%PRIORITY.
ASSIGN CONTACT DATA "%AGENT%AGENT" TO contact_agent_cv
ASSIGN CONTACT DATA "%PRIORITY%PRIORITY" TO contact_priority_cv
QUEUE TO AGENT contact_agent_cv WITH PRIORITY contact_priority_cv

WAIT 2

Scripting Guide for Communication Server 1000/Meridian 1 PBX 619


Scripting for Multimedia and Outbound Standard 8.05

%DATE%DATE

This intrinsic returns the date on which a scheduled contact should be presented.
This date is called the Callback Date.

If you want scheduled contacts to occur at the correct date and time, ensure that
your script delays these contacts until that date and time and then queues the
contacts appropriately. The contacts can be delayed in the scripts in one of two
ways:
„ using a loop in conjunction with the intrinsics %DATE%DATE,
%TIME%TIME, and NEXTYEAR

OR
„ using a WAIT statement in conjunction with the intrinsic
%INTEGER%WAITTIME

The use of a WAIT statement is the preferred method.

Syntax
The intrinsic must be used in conjunction with the CONTACT DATA intrinsic
and must be assigned to a script call variable before use.
ASSIGN CONTACT DATA "%DATE%DATE" TO date_cv

Return type
This intrinsic returns a DATE variable.

If no callback date is set for the contact, this intrinsic returns a default date of 01
January.

620 Contact Center Manager


December 2007 Scripting for Multimedia and Outbound

Example
In this example, a check is performed to see if the current date is equal to the
callback date and if the current time is greater than the callback time. If so, the
system executes the section Queue_Contact. Otherwise, the contact remains in a
loop checking the date and time.
ASSIGN CONTACT DATA "%DATE%DATE" TO contact_cbdate_cv
ASSIGN CONTACT DATA "%TIME%TIME" TO contact_cbtime_cv
SECTION Callback_loop
/****************************************************************
Loop until the Current Date / Time is greater than or equal to the
Callback Date / Time then Queue the Contact using the script
Queue_Multimedia_Contact.
****************************************************************/
IF (DATE > contact_cbdate_cv) THEN
EXECUTE SCRIPT Queue_Multimedia_Contact
ELSE
IF ((DATE = contact_cbdate_cv)
AND (TIME OF DAY >= contact_cbtime_cv)) THEN
EXECUTE SCRIPT Queue_Multimedia_Contact
ELSE
WAIT 60
EXECUTE Callback_loop
END IF
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 621


Scripting for Multimedia and Outbound Standard 8.05

%INTEGER%WAITTIME

This intrinsic returns the number of seconds from the time the contact is created
until the callback time. Use this intrinsic as the value in a WAIT statement in the
scripts to delay queuing of a contact until the callback time.

If you want scheduled contacts to be presented at the correct date and time,
ensure that your script delays these contacts until that date and time and then
queues the contacts appropriately. The contacts can be delayed in the scripts in
one of two ways:
„ using a loop in conjunction with the intrinsics %DATE%DATE,
%TIME%TIME, and NEXTYEAR

OR
„ using a WAIT statement in conjunction with the intrinsic
%INTEGER%WAITTIME

The use of a WAIT statement is the preferred method.

Syntax
The intrinsic must be used in conjunction with the CONTACT DATA intrinsic
and must be assigned to a variable before use.
ASSIGN CONTACT DATA "%INTEGER%WAITTIME" TO contact_wait_time_cv

Return type
This intrinsic returns an INTEGER variable.

The default value of this intrinsic for contacts that do not have a callback time
set is 0. For example, new contacts have a value of 0 for this intrinsic.

622 Contact Center Manager


December 2007 Scripting for Multimedia and Outbound

Example
This example stores the %INTEGER%WAITTIME,
%SKILLSET%SKILLSET, and %PRIORITY%PRIORITY intrinsics in call
variables. It then waits the required number of seconds until the callback time
before queuing the contact to the skillset indicated by
%SKILLSET%SKILLSET with a priority of %PRIORITY%PRIORITY.
ASSIGN CONTACT DATA "%SKILLSET%SKILLSET" TO contact_skillset_cv
ASSIGN CONTACT DATA "%PRIORITY%PRIORITY" TO contact_priority_cv

ASSIGN CONTACT DATA "%INTEGER%WAITTIME" TO contact_wait_time_cv


WAIT contact_wait_time_cv

QUEUE TO SKILLSET contact_skillset_cv WITH PRIORITY


contact_priority_cv
WAIT 2

Scripting Guide for Communication Server 1000/Meridian 1 PBX 623


Scripting for Multimedia and Outbound Standard 8.05

%PRIORITY%PRIORITY

This intrinsic returns the priority assigned to this contact by Contact Center
Multimedia based on the rules configured or based on the actions performed by
an agent on the Agent Desktop.

Nortel recommends that you queue multimedia contacts with the priority
%PRIORITY%PRIORITY, because this priority is determined by Contact
Center Multimedia.

Syntax
The intrinsic must be used in conjunction with the CONTACT DATA intrinsic
and must be assigned to a script call variable before use.
ASSIGN CONTACT DATA "%PRIORITY%PRIORITY" TO contact_priority_cv

Return type
This intrinsic returns a PRIORITY variable.

Example
This example stores the %SKILLSET%SKILLSET and
%PRIORITY%PRIORITY intrinsics in call variables and then queues the
contact to the skillset indicated by %SKILLSET%SKILLSET with a priority of
%PRIORITY%PRIORITY.
ASSIGN CONTACT DATA "%SKILLSET%SKILLSET" TO contact_skillset_cv
ASSIGN CONTACT DATA "%PRIORITY%PRIORITY" TO contact_priority_cv
QUEUE TO SKILLSET contact_skillset_cv WITH PRIORITY
contact_priority_cv
WAIT 2

624 Contact Center Manager


December 2007 Scripting for Multimedia and Outbound

%SKILLSET%SKILLSET

This intrinsic returns the skillset assigned to this contact by Contact Center
Multimedia based on the rules configured or based on the actions performed by
an agent on the Agent Desktop.

Syntax
The intrinsic must be used in conjunction with the CONTACT DATA intrinsic
and must be assigned to a script call variable before use.
ASSIGN CONTACT DATA "%SKILLSET%SKILLSET" TO contact_skillset_cv

Return type
This intrinsic returns a SKILLSET variable.

Example
This example stores the %SKILLSET%SKILLSET and
PRIORITY%PRIORITY intrinsics in call variables and then queues the contact
to the skillset indicated by %SKILLSET%SKILLSET with a priority of
%PRIORITY%PRIORITY.
ASSIGN CONTACT DATA "%SKILLSET%SKILLSET" TO contact_skillset_cv
ASSIGN CONTACT DATA "%PRIORITY%PRIORITY" TO contact_priority_cv
QUEUE TO SKILLSET contact_skillset_cv WITH PRIORITY
contact_priority_cv
WAIT 2

Scripting Guide for Communication Server 1000/Meridian 1 PBX 625


Scripting for Multimedia and Outbound Standard 8.05

%TIME%TIME

This intrinsic returns the time of day which a scheduled contact should be
presented. This time is called the callback time.

If you want scheduled contacts to be presented at the correct date and time,
ensure that your script delays these contacts until that date and time and then
queues the contacts appropriately. The contacts can be delayed in the scripts in
one of two ways:
„ using a loop in conjunction with the intrinsics %DATE%DATE,
%TIME%TIME, and NEXTYEAR

OR
„ using a WAIT statement in conjunction with the intrinsic
%INTEGER%WAITTIME

The use of a WAIT statement is the preferred method.

Syntax
The intrinsic must be used in conjunction with the CONTACT DATA intrinsic
and must be assigned to a script call variable before use.
ASSIGN CONTACT DATA "%TIME%TIME" TO time_cv

Return type
This intrinsic returns a TIME variable.

If no callback time is set for the contact, this intrinsic returns a default time of
00:00.

626 Contact Center Manager


December 2007 Scripting for Multimedia and Outbound

Example
This is the same example as shown for the %DATE%DATE intrinsic. In this
example, a check is performed to see if the current date is equal to the callback
date and if the current time is greater than the callback time. If so, the system
executes the section Queue_Contact. Otherwise, the contact remains in a loop
checking the date and time.
ASSIGN CONTACT DATA "%DATE%DATE" TO contact_cbdate_cv
ASSIGN CONTACT DATA "%TIME%TIME" TO contact_cbtime_cv
SECTION Callback_loop
/****************************************************************
Loop until the Current Date / Time is greater than or equal to the
Callback Date / Time then Queue the Contact using the script
Queue_Multimedia_Contact.
****************************************************************/
IF (DATE > contact_cbdate_cv) THEN
EXECUTE SCRIPT Queue_Multimedia_Contact
ELSE
IF ((DATE = contact_cbdate_cv)
AND (TIME OF DAY >= contact_cbtime_cv)) THEN
EXECUTE SCRIPT Queue_Multimedia_Contact
ELSE
WAIT 60
EXECUTE Callback_loop
END IF
END IF

Scripting Guide for Communication Server 1000/Meridian 1 PBX 627


Scripting for Multimedia and Outbound Standard 8.05

CONTACTSUBTYPE

Contacts in the Contact Center Multimedia database have a contact type which
is one of the main contact types, e-mail, outbound, voice, Web communications
and video.

Contacts also have a subtype. For example, you can create fax, SMS, voicemail,
and whitemail contacts in the Multimedia database using the e-mail rules
configuration. These contact types are all subtypes of the e-mail contact type. In
scripting, a fax message has a CONTACTSUBTYPE of fax and a CONTACT
TYPE of e-mail.

Similarly, you can create scheduled callback contacts in the Multimedia


database using the Agent Desktop or Web services interface. This contact type is
a subtype of the outbound contact type. In scripting, the scheduled callback has a
CONTACTSUBTYPE of scheduled callback and a CONTACT TYPE of
outbound.

This intrinsic returns the subtype of the contact.

The following table shows all contact subtypes and their corresponding contact
types:

CONTACT SUBTYPE CONTACT TYPE

fax e-mail

SMS e-mail

voicemail e-mail

whitemail e-mail

other e-mail

e-mail e-mail

scheduled callback outbound


outbound outbound

628 Contact Center Manager


December 2007 Scripting for Multimedia and Outbound

CONTACT SUBTYPE CONTACT TYPE

Web communications Web communications

video video

Contacts must be queued to skillsets that correspond to a contact type. For


example, scheduled callbacks are queued to outbound (OB) skillsets while fax
contacts are queued to e-mail (EM) skillsets.

Syntax
The intrinsic must be used in conjunction with the CONTACT DATA intrinsic
and must be assigned to a variable before use.
ASSIGN CONTACT DATA “CONTACTSUBTYPE” TO contact_subtype_cv

Return Type
A STRING variable is returned by this intrinsic. It can have one of the following
values:
„ Fax
„ SMS
„ Voicemail
„ Whitemail
„ Other
„ Scheduled Callback
„ Email
„ Outbound
„ Web_Communications
„ Video

Scripting Guide for Communication Server 1000/Meridian 1 PBX 629


Scripting for Multimedia and Outbound Standard 8.05

Example
This example checks for the CONTACTSUBTYPE of scheduled callback and
executes separate primary scripts for scheduled callbacks and outbound
campaign contacts.
IF CONTACT TYPE = c_contact_type_outbound_gv THEN
ASSIGN CONTACT DATA “CONTACTSUBTYPE” TO contact_subtype_cv
IF contact_subtype_cv = “Scheduled Callback” THEN
EXECUTE SCRIPT OB_ScheduledCallback_Primary
ELSE
EXECUTE SCRIPT OB_Outbound_Primary
END IF
END IF

630 Contact Center Manager


December 2007 Scripting for Multimedia and Outbound

CUSTOMERID

This intrinsic returns the customer ID associated with contact.

Syntax
The intrinsic must be used in conjunction with the CONTACT DATA intrinsic
and must be assigned to a script call variable before use.
ASSIGN CONTACT DATA "CUSTOMERID" TO contact_custID_cv

Return type
This intrinsic returns a STRING variable. For example, 5004.

Example
The following example assigns the customer ID to a call variable and then
increases the priority of the contact if that customer is identified as a priority
customer.
ASSIGN CONTACT DATA "CUSTOMERID" TO contact_custID_cv
ASSIGN CONTACT DATA "%SKILLSET%SKILLSET" TO contact_skillset_cv
ASSIGN CONTACT DATA "%PRIORITY%PRIORITY" TO contact_priority_cv
IF contact_custID_cv = "5004" THEN
/* identify priority Customer */
ASSIGN 1 TO contact_priority_cv
END IF

QUEUE TO SKILLSET contact_skillset_cv WITH PRIORITY


contact_priority_cv
WAIT 2

Scripting Guide for Communication Server 1000/Meridian 1 PBX 631


Scripting for Multimedia and Outbound Standard 8.05

CUSTOMFIELD1

This intrinsic returns the text value of the first customer field associated with a
contact. Only information about the first customer field is available as an
intrinsic within scripting. Other customer fields are not available.

Syntax
The intrinsic must be used in conjunction with the CONTACT DATA intrinsic
and must be assigned to a variable before use.
ASSIGN CONTACT DATA “CUSTOMFIELD1” TO contact_customfield_cv

Return Type
A STRING variable is returned by this intrinsic. For example “Ref_123456”.

Example
This example checks for a CUSTOMFIELD1 value of “Ref_123456” and
executes a specific primary script for contacts that have this custom field value.
IF CONTACT TYPE = c_contact_type_outbound_gv THEN
ASSIGN CONTACT DATA “CUSTOMFIELD1” TO contact _customfield_cv
IF contact_customfield_cv = “Ref_123456” THEN
EXECUTE SCRIPT OB_ref123456_Primary
ELSE
EXECUTE SCRIPT OB_Outbound_Primary
END IF
END IF

632 Contact Center Manager


December 2007 Scripting for Multimedia and Outbound

FROMADDRESS

This intrinsic returns the e-mail address from which an e-mail contact was sent.
This intrinsic is available for e-mail contacts only.

Syntax
The intrinsic must be used in conjunction with the CONTACT DATA intrinsic
and must be assigned to a script call variable before use.
ASSIGN CONTACT DATA "FROMADDRESS" TO contact_fromAddress_cv

Return type
This intrinsic returns a STRING variable. For example, johnsmith@online.com.

Example
The following example assigns the from address value to a call variable and then
increases the priority of the contact if the customer is identified as a priority
customer.
ASSIGN CONTACT DATA "FROMADDRESS" TO contact_fromAddress_cv
ASSIGN CONTACT DATA "SKILLSET" TO contact_skillset_cv
ASSIGN CONTACT DATA "PRIORITY" TO contact_priority_cv
IF CONTACT TYPE = c_EMAIL_gv THEN
/* Identify a Priority Customer by their e-mail address */
IF (contact_fromAddress_cv = "johnsmith@online.com") THEN
ASSIGN 1 TO contact_priority_cv
END IF
END IF
QUEUE TO SKILLSET contact_skillset_cv WITH PRIORITY
contact_priority_cv
WAIT 2

Scripting Guide for Communication Server 1000/Meridian 1 PBX 633


Scripting for Multimedia and Outbound Standard 8.05

NEXTYEAR

This intrinsic indicates whether the callback date and time values for the contact
are in the current year or the next year.

If you want scheduled contacts to be presented at the correct date and time,
ensure that your script delays these contacts until that date and time and then
queues the contacts appropriately. The contacts can be delayed in the scripts in
one of two ways:
„ using a loop in conjunction with the intrinsics %DATE%DATE,
%TIME%TIME, and NEXTYEAR

OR
„ using a WAIT statement in conjunction with the intrinsic
%INTEGER%WAITTIME

The use of a WAIT statement is the preferred method.

Syntax
The intrinsic must be used in conjunction with the CONTACT DATA intrinsic
and must be assigned to a script call variable before use.
ASSIGN CONTACT DATA "NEXTYEAR" TO callback_nextyear_cv

Return type
This intrinsic returns a STRING variable with one of the following values:
„ YES—The callback date and time are in the following year.
„ NO—The callback date and time are in the current year.

634 Contact Center Manager


December 2007 Scripting for Multimedia and Outbound

Example
This example checks if the NEXTYEAR intrinsic has the value YES. If so, the
script remains in a loop until the date changes to January 1, and then the script
runs another section that checks the callback date and time.
ASSIGN CONTACT DATA "NEXTYEAR" TO callback_nextyear_cv
SECTION Next_Year_Loop
IF CALLBACK_NEXTYEAR_cv = "YES" THEN
IF DATE = Jan 01 THEN
ASSIGN "NO" TO callback_nextyear_cv
EXECUTE Callback_DateTime_Check
ELSE
WAIT 60
EXECUTE Next_Year_Loop
END IF
END IF
SECTION Callback_DateTime_Check

Scripting Guide for Communication Server 1000/Meridian 1 PBX 635


Scripting for Multimedia and Outbound Standard 8.05

QUEUETYPE

This intrinsic allows for flexibility when you decide how to queue a contact by
identifying different groups of contacts based on either
„ the type of contact (for example, a reply e-mail from a customer)

or
„ actions that are performed on the contact using the Agent Desktop (for
example, a contact that is transferred to an agent).

These different types of contacts must be queued appropriately depending on the


needs of multimedia contact center.

Syntax
The intrinsic must be used in conjunction with the CONTACT DATA intrinsic
and must be assigned to a script call variable before use.
ASSIGN CONTACT DATA "QUEUETYPE" TO contact_queuetype_cv

Return Type
This intrinsic returns a STRING variable that can have one of the following
values:
„ SKILLSET
„ AGENT
„ AGENTPULL
„ REPLYMAIL
„ NEWMAIL
„ NOQUEUE

These values are case-sensitive.

636 Contact Center Manager


December 2007 Scripting for Multimedia and Outbound

The following table describes each QUEUETYPE value in detail and indicates
the recommended queuing method for each value.

Value Description and recommended queuing method

SKILLSET Queue this contact to the skillset indicated by the intrinsic


%SKILLSET%SKILLSET with a priority of 1. This
QueueType value is set when a multimedia contact is
transferred to a skillset by using the Contact Center Agent
Desktop. This contact already reached the front of one
Skillset Queue and so should be queued with high priority
to the skillset it is being transferred to, hence the priority of
1. If you do not require transferred contacts to have a high
priority, queue this contact with a priority of
%PRIORITY%PRIORITY instead.

AGENT Queue this contact to the agent indicated by the intrinsic


%AGENT%AGENT with a priority of 1. This QueueType
value is set when one of the following actions is performed
on the Contact Center Agent Desktop:
„ A multimedia contact is transferred to an agent.
„ An agent saved an e-mail contact as pending with a
scheduled callback time.
„ An agent created a scheduled callback contact from
the Contact Center Agent Desktop.
„ An agent saved an outbound contact with a
disposition code that sets a scheduled callback time
for the contact.
This contact reached the front of one Skillset Queue and
should be queued with High Priority to the relevant agent or
next skillset, hence the priority of 1.

AGENTPULL Queue this contact to the agent indicated by the intrinsic


%AGENT%AGENT with a priority of 1. This
QUEUETYPE value is set when a multimedia contact is
pulled from the queue by using the Contact Center Agent
Desktop. The agent requires this contact to be presented
immediately.

Scripting Guide for Communication Server 1000/Meridian 1 PBX 637


Scripting for Multimedia and Outbound Standard 8.05

Value Description and recommended queuing method

REPLYMAIL This QUEUETYPE value indicates that the contact is a


reply e-mail contact from a customer. This situation occurs
if an agent sends an e-mail to a customer from the Contact
Center Agent Desktop and the customer then replies to this
e-mail. There are two queuing options in this case:
„ If you want reply e-mail contacts from customers to
be queued to the preferred agent for that customer,
queue this contact to the agent indicated by the
intrinsic %AGENT%AGENT with a priority of
%PRIORITY%PRIORITY%.
„ If you want reply e-mail contacts from customers to
be queued to a skillset, queue this contact to the
skillset indicated by the intrinsic
%SKILLSET%SKILLSET with a priority of
%PRIORITY%PRIORITY.

NEWMAIL This QUEUETYPE value indicates the contact is a new


e-mail contact from an existing customer. There are two
queuing options in this case:
„ If you want new e-mail contacts from existing
customers to be queued to the preferred agent for that
customer, queue this contact to the agent indicated
by the intrinsic %AGENT%AGENT with a priority
of %PRIORITY%PRIORITY%.
„ If you want new e-mail contacts from existing
customers to be queued to a skillset, queue this
contact to the skillset indicated by the intrinsic
%SKILLSET%SKILLSET with a priority of
%PRIORITY%PRIORITY.

638 Contact Center Manager


December 2007 Scripting for Multimedia and Outbound

Value Description and recommended queuing method

NOQUEUE In this case, no specific queuing method is recommended


by Contact Center Multimedia because no actions are
performed on this contact by using the Agent Desktop. This
QUEUETYPE value is set for new contacts (other than new
e-mail from existing customers that have a QUEUETYPE
value of NEWMAIL). Queue these contacts to the skillset
indicated by the intrinsic %SKILLSET%SKILLSET with a
priority of %PRIORITY%PRIORITY.

The scripts in this appendix check for a QUEUETYPE of AGENT,


AGENTPULL, SKILLSET, or REPLYMAIL. All other scenarios are handled
by queuing the contact to the skillset SKILLSET%SKILLSET with a priority of
%PRIORITY%PRIORITY. However, the flexibility is available to treat each
scenario differently.

Example
This example assigns the QUEUETYPE intrinsic to a variable and then queues
the contact differently based on the value of the QUEUETYPE.
ASSIGN CONTACT DATA "%SKILLSET%SKILLSET" TO contact_skillset_cv
ASSIGN CONTACT DATA "%AGENT%AGENT" TO contact_agent_cv
ASSIGN CONTACT DATA "%PRIORITY%PRIORITY" TO contact_priority_cv
ASSIGN CONTACT DATA "QUEUETYPE" TO contact_queuetype_cv

WHERE contact_queuetype_cv EQUALS


VALUE "SKILLSET": QUEUE TO SKILLSET contact_skillset_cv WITH
PRIORITY 1
VALUE "AGENT": QUEUE TO AGENT contact_agent_cv WITH
PRIORITY 1
VALUE "AGENTPULL": QUEUE TO AGENT contact_agent_cv WITH
PRIORITY 1
VALUE "REPLYMAIL": QUEUE TO AGENT contact_agent_cv WITH
PRIORITY contact_priority_cv
VALUE "NEWMAIL": QUEUE TO SKILLSET contact_skillset_cv WITH
PRIORITY contact_priority_cv

Scripting Guide for Communication Server 1000/Meridian 1 PBX 639


Scripting for Multimedia and Outbound Standard 8.05

VALUE "NOQUEUE": QUEUE TO SKILLSET contact_skillset_cv WITH


PRIORITY contact_priority_cv
DEFAULT: QUEUE TO SKILLSET contact_skillset_cv WITH
PRIORITY contact_priority_cv
END WHERE
WAIT 2

640 Contact Center Manager


December 2007 Scripting for Multimedia and Outbound

TOADDRESS

This intrinsic returns the e-mail address that an e-mail contact was sent to. It is
available for e-mail contacts only.

Syntax
The intrinsic must be used in conjunction with the CONTACT DATA intrinsic
and must be assigned to a script call variable before use.
ASSIGN CONTACT DATA "TOADDRESS" TO contact_toAddress_cv

Return Type
This intrinsic returns a STRING variable. For example, info@mycompany.com.

Example
This example assigns the to address and customer ID values to call variables and
then uses these call variables to check if a priority customer sent an e-mail to a
general mailbox. If so, the priority of the contact is increased.
ASSIGN CONTACT DATA "TOADDRESS" TO contact_toAddress_cv
ASSIGN CONTACT DATA "SKILLSET" TO contact_skillset_cv
ASSIGN CONTACT DATA "PRIORITY" TO contact_priority_cv
ASSIGN CONTACT DATA "CUSTOMERID" TO contact_custID_cv
IF CONTACT TYPE = c_EMAIL_gv THEN
/* Identify a Priority Customer who sent an E-mail to a general
mailbox */
IF ((contact_toAddress_cv = "info@mycompany.com")
AND (contact_custID_cv = "5004")) THEN
ASSIGN 1 TO contact_priority_cv
END IF
END IF
QUEUE TO SKILLSET contact_skillset_cv WITH PRIORITY

Scripting Guide for Communication Server 1000/Meridian 1 PBX 641


Scripting for Multimedia and Outbound Standard 8.05

contact_priority_cv
WAIT 2

642 Contact Center Manager


December 2007 Scripting for Multimedia and Outbound

Recommended scripts for Contact Center


Multimedia

Use the scripts in this appendix in conjunction with Contact Center Multimedia
to route multimedia contacts.

Nortel recommends:
„ Nortel recommends that you initially integrate these scripts with your
e