Thursday 26 February 2015

Advanced Scripting with Sessions

This article aims to let you know by using a demo:
About session management inside UCCX scripts
How to take advantage of the default session associated with a call
How to preserve information in sessions for re-use with future calls
How to store and retrieve information from sessions

Download the script that was used for this demo:

Background knowledge

A session will remain in memory for 3 minutes after it is no longer referenced by the call
Each call is associated with its own session.
Many calls could reference the same session as long as they are all related:
  • Redirected calls
  • Consult calls
A session can also be referenced manually via a mapping identifier
    Such a session will by default remain in memory for up to 30 minutes after it is no longer referenced by a call
Sessions are maintained inside the UCCX Engine memory
They are not replicated to the other server when using the High Availability feature
They are not persisted to disk

Sample queuing Script

The Modifications will involve:
    -Promoting the customer the first time, he/she calls in:
        For his/her account number
        To record his/her name
    -provide a personalized message whenever he/she:
        Calls back within 30 minutes
        Gets transferred back to the script by an agent

Call flows Script editing

Three major call flows come across our script
Five variables used in this script:
  1. First Time Caller

Used GetContactInfo and GetSessionInfo steps to determine there was no stored information in the session associated with the call
Tested that the customer has never been prompted before by using Do test
Welcomed the customer and collected his/her account number
Used SetSessionInfo step to update the current session with the account number and a prompted flag set to true
Used GetSession step to check if we had previously stored information in memory, which we had not
As a result, we used SessionMapping step to create a mapping in memory from the account number to the current session
Prompted the customer to record his/her name
Used SetSessionInfo step to update the current session with the recorded name
Queued the customer for an agent

Test

Get session
Never prompted before
Get account number
Record user name, old_session equals null
  1. Redirected Caller

Used the previous call flow redirected by an agent
Used GetContactInfo and GetSessionInfo steps to determine there was information in the session associated with the call
Tested if the customer was prmoted before which he/she was
Prompted the customer to record his/her name if it wasn’t in the session
Used the SetSessionInfo step to update the current session with the recorded name if a new one was recorded
Welcome back the customer with a personalized message
Queued the customer for an agent
  1. Previously Seen Customer

Involved the customer is calling back within 30 minutes window that is a default time remained in the memory and will be wiped out when no longer being referenced.
Used GetContactInfo and GetSessionInfo steps to determine there was information in the session associated with the call
Tested if the customer was prmoted before which he/she was not

Welcomed the customer and collected his/her account number
Used SetSessionInfo step to update the current session with the account number and a prompted flag set to true
Used GetSession step to check if we had previously stored information in memory which we had
Because we have found the existing session, we used SetContactInfo step to replace the current session associated with the call with the old one
Used GetSessionInfo step to retrieve all stored information
Prompted the customer to record his/her  name if none was stored
If that was a case, we used the SetSessionInfo step to update the old session with the recorded name if a new one was recorded
Welcomed back customer with a personalized message
if the recorded name was already existed in the old_session,  and retrieved back to the current session, we play welcome prompt + name to the customer
Finally, we queue the customer for an agent

Test

Enter the old account name”321”
Map old_session to current_session
Retrieve all information from old_session
Prompted back recorded name to the caller



Sunday 22 February 2015

Advanced Scripting with Custom Java Classes

Introduction:

The purpose of this article aims to let you understand the basic usage how UCCX script works with java classes by using an example.
UCCX version: 7.0.1
JDK version: 1.5.14
the script that will be used in this demo can be downloaded by this link:
 
https://drive.google.com/open?id=0B5tzzJsbkWkISXV0RDd4WF82Yjg&authuser=0

  1. Eclipse is recommended to edit any java programs, so let us start building a java class.
In this java class, we have a constructor that accepts “tel” variable which is a string used to store the calling number, getters and setters, ,“incCount()”is used to increase the counter by one when having gone through loop each time and ”toString()” is rewritten and returns “tel@count” string.

  1. Compiling and compressing
Create directory as “com/acme/info”, and then copy the “CustomerInfo.java” file to this directory. Open cmd, and type the following commands:

javac -source 1.5 -target 1.5 com\acme\info\CustomerInfo.java

jar fc CustomerInfo.jar com\acme\info\CustomerInfo.class

dir:

2015-02-20  20:49               974 CustomerInfo.jar

  1. Upload CustomerInfo.jar file to UCCX
Go “Applications”, “Document Management”
Locate to the folder path: default/classpath
System – Custom File  Configuration. Move jar file to the right panel
Restart
Restart

  1. Script Edit
Login CCX Editor as an authorized user
New File, choose a Queuing template called “Simple Queuing”
Click Variable Icon, and enter fully qualified class name in the type field and Name is Info:

Enter second String variable called tel
In order to retrieve the calling number, drag “get call contact info” icon right after the Accept
Set calling number variable to “tel”
Set variable to constructor
then
Click “…” button to set value to the variable:
Concentrate on Java tab, and then enter your java class name on constructor field. In the drop-down button, then choose it. In the parentheses, enter variable name “tel”. Click “Ok”
Expand the “Select Resource”, drag Do to make counter incremented when each loop caller is waiting for the Agent.
C:\Users\Administrator\Desktop\15LAB\Capture.JPG
In the expression editor, make variables hold objects
Use inCount() method
C:\Users\Administrator\Desktop\15LAB\Capture.JPG
Click Ok

Add an integer variable for saving how many times each loop has gone through
Open the expression editor
In the methods option, choose .getCount()

Test

Tuesday 10 February 2015

Unified CCX - Real Time Reports

Contact summary report

Outbound will not be displayed in this report.

Application Tasks Summary

Display “Running”, “Completed” and “total” counts about this application

Application Tasks

    Display currently running application
Click “view”

Engine Tasks

    Scripts are executing
Contacts
Select current running entry, and then click “Views” to check details for this entry

Application report

All application configured in UCCX

Sessions report

If it reaches maximum idle time, then it will be garbage collected.
Click “Views” for details

DataSource Usage report

    Display external database usage
Available Connections:   Current connections
Checkouts Granted:  Times connections be granted
Checkouts Denied: Times connections be denied



Overall Cisco Unified Contact Center Express Stats report

    Here you can see overall info, and outbound call info





CSQ Cisco Unified Contact Center Express Stats

    Total call amount of time report about this CSQ
Click “Views”  to show details in Agent level







Resource Cisco Unified Contact Express Stats

    Shows current available agents status, and inbound, outbound calls lengths

UCCX resets all stats each day at midnight; you also can do this manually.
Select “tools” →reset all stats

Set report options

Show  logged off Resources is set to “No” by default. Choose “Yes”

Printable Report

A printable Report will be shown in the separate window: