cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3564
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Mark Applebee on 08-03-2013 06:41:08 PM
I am trying to move my icm admin script for open/close to  studio application. Basically customer would like to change the open/close time through a web page into a sql database. I am planning to write a call studio application to check the open/close time before sending the call to the menu option. The database have mainly three fields DNIS, Open Time, Close time. I just want the studio application to check whether current time is between open & close time before presenting to menu option. Could someone help me whether I can do this by using a simple database element or do I need to know custom element to do this. If this is a simple sql query, can someone provide me an example or point me in the right direction.

Subject: Re: New Message from Mark Applebee in Customer Voice Portal (CVP) - General
Replied by: Janine Graves on 08-03-2013 10:24:58 PM
You can definitely use the Studio Database element to do that. Look in the Element Specifications ref manual to see how to configure Tomcat to use JNDI. This requires configuring the Tomcat/conf/context.xml or server.xml file. Download the jdbc driver (.jar file) from the internet to match your database and verion. Then install it into Tomcat/common/lib directory. Then you'll have to restart VxmlServer. The query would be simple. SELECT DNIS, OPENTIME, CLOSETIME FROM TABLENAME WHERE DNIS={CallData.DNIS} Data is returned as Element data for the Database element with the names of the columns. So here the element data for the DB element would be named DNIS, OPENTIME, CLOSETIME Then you'll want to use a Decision element to check that the CallData DNIS equals the DB DNIS (to ensure that you got something back from the D. One warning about the Studio Database element is that if the database is down, the element throws a Java exception and the call will return to ICM down the error path of the RunExternalScript node. On 3/8/2013 5:41 PM, Cisco Developer Community Forums wrote: Mark Applebee has created a new message in the forum "General Discussion - All Versions": -------------------------------------------------------------- I am trying to move my icm admin script for open/close to  studio application. Basically customer would like to change the open/close time through a web page into a sql database. I am planning to write a call studio application to check the open/close time before sending the call to the menu option. The database have mainly three fields DNIS, Open Time, Close time. I just want the studio application to check whether current time is between open & close time before presenting to menu option. Could someone help me whether I can do this by using a simple database element or do I need to know custom element to do this. If this is a simple sql query, can someone provide me an example or point me in the right direction. -- To respond to this post, please click the following link: http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/12814654 or simply reply to this email. -- Janine Graves

Subject: RE: CVP open/close application using database lookup
Replied by: Mark Applebee on 09-03-2013 11:20:14 AM
Thanks Janine. To compare the current time against the open/close time I am looking for a built in function to get the current time value. Please let me know there is any function available to do this.

Subject: RE: New Message from Mark Applebee in Customer Voice Portal (CVP) - General
Replied by: GEOFFREY THOMPSON on 09-03-2013 12:18:58 PM
I have done date and time comparisons many times in Studio and I always write a custom class.

In Java you can instantiate a Calendar class object with numbers representing the date and time you are fetching from your caller and then you can use the before() and after() methods on the Calendar class, thus dealing with the intricacies of leap years and so forth. This technique is superior to anything you may cobble together with the Decision Editor. I did try that path. ;-)

Sometimes there is no other way but to go to Java. If you are a Studio programmer and you cannot program in Java, you will struggle on what, on the surface, seems to be a simple requirement for your application.

If you attend Janine’s Developer’s course, you will get the basics of Java. You don’t need the full monty, but you do need the fundamentals as it applies to manipulating data in Studio.

Regards,
Geoff

Subject: RE: New Message from Mark Applebee in Customer Voice Portal (CVP) - General
Replied by: Hemal Mehta on 09-03-2013 04:52:58 PM
This is simple. You can do several ways, GregorianCalendar, SimpleDateFormat etc.  The following will get you the hour of the day, min, day etc
GregorianCalendar cal = new GregorianCalendar();
int hour = cal.get(Calendar.HOUR_OF_DAY);
int min = cal.get(Calendar.MINUTE);
int  day = cal.get(Calendar.DAY_OF_WEEK);


Hemal

From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Saturday, March 09, 2013 11:20 AM
To: cdicuser@developer.cisco.com
Subject: New Message from Mark Applebee in Customer Voice Portal (CVP) - General Discussion - All Versions: RE: CVP open/close application using database lookup

Mark Applebee has created a new message in the forum "General Discussion - All Versions": -------------------------------------------------------------- Thanks Janine. To compare the current time against the open/close time I am looking for a built in function to get the current time value. Please let me know there is any function available to do this.
--
To respond to this post, please click the following link: http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/12827372 or simply reply to this email.

Subject: Re: New Message from Mark Applebee in Customer Voice Portal (CVP) - General
Replied by: Janine Graves on 09-03-2013 06:40:58 PM
FYI, if it's relatively simple comparison the time (no time zone math
that you need to perform) then might get away without using Java.

You can get the current hour, minute, day, month, and year in the
Substitution window under the Date/Time column.

Be aware that they are returned as integers, so they are not padded to
begin with 0 if they're one digit.

But if you are comparing as Number in the Decision element, I think it'd
work for you.

Subject: RE: New Message from Asher Schweigart in Customer Voice Portal (CVP) - Gene
Replied by: GEOFFREY THOMPSON on 21-03-2013 11:55:35 AM
ICM is the best place for determining opening hours. Why would you do this in CVP Studio?

Regards,
Geoff

Subject: RE: New Message from Mark Applebee in Customer Voice Portal (CVP) - General
Replied by: GEOFFREY THOMPSON on 21-03-2013 12:39:35 PM
You can have a web front end that writes to a database and ICM admin scripts that query the database. It has to be optimized to get all the information in one hit since the query will run every 60s. But I have thought about this a few times and prototyped the ICM scripting.

Regards,
Geoff

Subject: RE: CVP open/close application using database lookup
Replied by: Asher Schweigart on 21-03-2013 11:35:30 AM
The best way to do this would be within the SQL query itself. Something along the lines of:


SELECT CASE 
    WHEN GETDATE() BETWEEN startTime AND endTIme THEN 'open'
    ELSE 'closed'
END AS 'status'
FROM yourTable
WHERE dnis = '5558675309'
 
There is some more complicated things you can do to have it take the day of week into account as well. I use a system that allows me to have a schedule in a database ,and have the database simple return the status number of the call center. We use a 0-255 value to mark the conditions of the call center.  That way we can play different messages to the caller depending on the status of the call center. If you are interested I can share our table and view schema.
 

Subject: RE: New Message from Asher Schweigart in Customer Voice Portal (CVP) - Gene
Replied by: Hemal Mehta on 21-03-2013 12:18:10 PM
Use ICM man, no need to do it in studio.  It is very easy to setup.

From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Thursday, March 21, 2013 11:36 AM
To: cdicuser@developer.cisco.com
Subject: New Message from Asher Schweigart in Customer Voice Portal (CVP) - General Discussion - All Versions: RE: CVP open/close application using database lookup

Asher Schweigart has created a new message in the forum "General Discussion - All Versions": -------------------------------------------------------------- The best way to do this would be within the SQL query itself. Something along the lines of:


SELECT CASE
    WHEN GETDATE() BETWEEN startTime AND endTIme THEN 'open'
    ELSE 'closed'
END AS 'status'
FROM yourTable
WHERE dnis = '5558675309'

There is some more complicated things you can do to have it take the day of week into account as well. I use a system that allows me to have a schedule in a database ,and have the database simple return the status number of the call center. We use a 0-255 value to mark the conditions of the call center.  That way we can play different messages to the caller depending on the status of the call center. If you are interested I can share our table and view schema.

--
To respond to this post, please click the following link: http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/13352227 or simply reply to this email.

Subject: RE: New Message from Asher Schweigart in Customer Voice Portal (CVP) - Gene
Replied by: Mark Applebee on 21-03-2013 12:30:31 PM
Asher,
Can you email the schema and code to markapplebee@outlook.com?
Regards
Mark

Subject: RE: New Message from Asher Schweigart in Customer Voice Portal (CVP) - Gene
Replied by: Mark Applebee on 21-03-2013 12:33:31 PM
Yea..I would like to use ICM admin script to do this. But customer wants to manage business hours through a web interface . I think this is the only way I can do this through a DB Dip.
Anyone knows a better option?
 

Subject: RE: New Message from Mark Applebee in Customer Voice Portal (CVP) - General
Replied by: Bill Webb on 21-03-2013 01:09:26 PM
How about CVP as a "web front end" that kicks off a Studio script that does nothing more than calls a "ReqICMLabel" with passed data to get/set Global Variables, etc.?
I've done something like this with a "TUI" (dial-in) interface, but seems like building a simple web browser-accessible front end to this would be awesome. I don't think you need to call a CVP_Subdialog_Start in order to call a ReqICMLabel, right?
;-)

Subject: Re: New Message from Bill Webb in Customer Voice Portal (CVP) - General Dis
Replied by: Janine Graves on 21-03-2013 01:35:10 PM
Bill, I just had these nodes in my Studio app:
StartCall --> ReqIcmLabel --> Custom Java (to create global data) -->
Hangup element.

Subject: RE: Re: New Message from Bill Webb in Customer Voice Portal (CVP) - General
Replied by: Bill Webb on 21-03-2013 01:52:27 PM
BAM! ...and there it is!!
Thanks for batting it around in your lab, Janine!! ;-)
 - Bill

Subject: Re: New Message from Bill Webb in Customer Voice Portal (CVP) - General Dis
Replied by: Janine Graves on 21-03-2013 01:59:09 PM
Bill, you also want these global variables to be created on a restart of
VxmlServer. So, you'd need to kick off the URL request every time
VxmlServer restarts. How do you do that?

Subject: RE: Re: New Message from Bill Webb in Customer Voice Portal (CVP) - General
Replied by: Bill Webb on 21-03-2013 02:00:52 PM
And actually, your dnis, ani, and callid could essentially be the building blocks of the action you wish to call. I can already see a simple web form as a front-end providing all sorts of simple but almost always requested functions that are normally done with medium-to-complex dial-in applications. You could front-end with a web server like IIS tied into AD to control access through Windows Domain credentials, and mask the URLs for additional security...
Not that I'm looking to re-invent CCMP here, but the idea definitely has some legs!

Subject: RE: Re: New Message from Bill Webb in Customer Voice Portal (CVP) - General
Replied by: Bill Webb on 21-03-2013 02:07:20 PM
These would be ICM Global Variables, which are persistent across Call Router restarts even (independent of CVP/VXML Server).
My thought here is really CVP becomes like a middleware of sorts. The URL request would come from a user trying to do something like perform an emergency close, or a meeting close, or even change hours of operation, etc. So you would need a little bit of web work on the front end to collect the data and construct the URL to send to CVP to actually change the variables in ICM.
Even so, I wasn't expecting the first part to be as easy as you've proven it to be! ;-)
Does that description make sense, or are we not talking about the same idea?

Subject: Re: New Message from Bill Webb in Customer Voice Portal (CVP) - General Dis
Replied by: Janine Graves on 21-03-2013 02:15:09 PM
I'm more VXML Server focused, so I was thinking of using it to let
VxmlServer query ICM for values to set global variables in VxmlServer!

But, it works both ways - I'm just not as experienced with ICM's
limitations (can't kick off a script with web browser).

I was surprised that the call server didn't complain  that there was no
'active call' for the callid used in the ReqIcmLabel node, but it was fine.

Subject: Re: New Message from Bill Webb in Customer Voice Portal (CVP) - General Dis
Replied by: Janine Graves on 21-03-2013 01:33:35 PM
Bill, that's awesome! I just tried it and it works. But you need to send
in _dnis (which ICM script to run) and a callid (make up a number).
http://vxmlserverip:7000/CVP/Server?application=Test&_dnis=2009&callid=7777777777777777777777

The only WARNING is that you need to follow this up with another URL to
free the vxml server license
http://vxmlserverip:7000/CVP/Server?audium_action=hangup

I guess if the Studio app had a 1-minute Session Timeout, you could omit
the 2nd step.

Subject: Re: New Message from Bill Webb in Customer Voice Portal (CVP) - General Dis
Replied by: Janine Graves on 21-03-2013 01:37:35 PM
And the 1 minute Session Timeout in the Studio app works great.
Then you can just use a web browser, use the first URL to call a studio
app that calls an ICM script (passes data and gets back data) and
creates global variables on vxml server.
Just have to remember to do this to all the vxml servers.
LOVE pushing the envelope.

Subject: RE: New Message from Mark Applebee in Customer Voice Portal (CVP) - General
Replied by: Sidney Orret on 21-03-2013 02:56:10 PM
For example, create a db table named DNISOpenClose with the following fields

DOW - integer DNIS - varchar
OpenTime -datetime
CloseTime -datetime

-----------------
On the table insert one record per DNIS per day of the week with the correct open and close times. You will have 7 records per DNIS. For days that are closed, like weekends, just make OpenTime and CloseTime = 00:00

------------------

and on the VXML Database Element use the following query.

SELECT CONVERT(varchar, DATEADD(hh, DATEDIFF(hh,GETUTCDATE(),GETDATE()), GETUTCDATE()), 108) AS CURRENTTIME,
CONVERT(varchar, OpenTime, 108) AS OPENTIME ,
CONVERT(varchar, DATEADD(ss,-1,CloseTime), 108) AS CLOSETIME,
CASE   WHEN (CONVERT(varchar, DATEADD(hh, DATEDIFF(hh,GETUTCDATE(),GETDATE())+2, GETUTCDATE()), 108)
BETWEEN CONVERT(varchar,OpenTime,108) AND CONVERT(varchar, DATEADD(ss,-1,CloseTime), 108))
AND (1 > 0)
THEN 'OPEN' ELSE 'CLOSED'
END as STATUS
FROM  DNISOpenClose WHERE DNIS = {CallData.DNIS} AND DOW = {GeneralDateTime.DayOfWeek.CURRENT}

-----------

The query above will return on the database element data variable STATUS a value of OPEN or CLOSED that you can use on a decision element.  The other element variables OPENTIME, CURRENTTIME, CLOSETIME I used them just for logging purposes to make sure the logic works fine. You don’t really need them.

I see value on doing this on the VXML side because now users can control and change their hours on their own by modifying the content of the table and avoid the intervention of an ICM administrator to modify admin scripts. You can extend the model above to have some kind of default hours set on your application that will kick in for times when the database is down or no record for the specific DNIS DOW combination is found. Good luck!

Subject: RE: Re: New Message from Bill Webb in Customer Voice Portal (CVP) - General
Replied by: Bill Webb on 21-03-2013 03:02:04 PM
No prob - that's what's great about this forum!
 
So in terms of UCCE and CVP in "Comprehensive Mode", things like call flow hours of operation, emergency closures, other time of day routing, etc. - ICM (UCCE) is far more effective and efficient for that.
 
In past deployments, I have created a basic UCCE script that kicks off a CVP Studio app which has some sort of basic authentication and then a menu for operations (open/close a call flow/queue, enable emergency, etc.). Those operations I then execute by calling a ReqICMLabel which kicks off an ICM script and, based on values in the Call Variables and/or ECCs, gets or sets values of Global Variables in ICM. Those ICM Global Variables are the ones referenced in the routing scripts.
 
The idea here was to perform the same operations with a web browser instead of a phone, and it seems like a workable idea.
 
On the last note - that is really the reason that I think the ReqICMLabel is somewhat underutilized and/or misunderstood. It really has no "call" concept - it is pure signaling using the GED-125 (ICM VRU Spec) message set/API, and performs no call control on its own. It is described as being used to get a returned Label in CVP Standalone, which would then still need to be subsequently transferred to using the Transfer element in Studio. So ReqICMLabel is really just 2-way messaging between CVP and ICM...which is exactly why it makes for a great tool in Comprehensive deployments! Technically there is no reason why other methods in the GED-125 API couldn't be utilized as well, such as updating Call Variable data for a call active in a Studio/VXML Server application, but I digress from the thread...
 
Thanks again for testing, and ditto on the "love pushing boundaries" comment! ;-)

Subject: Re: New Message from Sidney Orret in Customer Voice Portal (CVP) - General
Replied by: Janine Graves on 21-03-2013 03:27:09 PM
One of you smart guys should create and sell an app on the Apple or Droid App Store to do this! I'd totally recommend it to my students. -- Janine Graves

Subject: RE: New Message from Asher Schweigart in Customer Voice Portal (CVP) - Gene
Replied by: Sidney Orret on 21-03-2013 03:45:30 PM
With that I agree. I like simple ICM scripts and put the workload on the VXML application.  Combining VXML apps with databases is powerful. I just finish a project where pretty much all the parameters of the application like hours of operations, annoucements, prompts, timeouts, target skill group were defined through a database table enabling the customer to pretty much change anything on the fly.
 
Asher Schweigart:

GEOFFREY THOMPSON:

ICM is the best place for determining opening hours. Why would you do this in CVP Studio?


No reason you couldn't do the DB lookup in ICM. Although I am curious, why the aversion to checking once you are in CVP? I likew to keep my ICM scripts simple. Most of my call centers follow a simple set of steps in ICM:
 
Set language based on DNIS.
Call CVP script that play welcome message, checks status of call center, and has all menus.
Once the CVP script has determined what to do with the caller (queue, transfer, or hangup, which will be set in callerInput), return to ICM, and parse data returned.
If hangup, just drop the call, since CVP already played the closed message.
If transfer, send call to transfer number in VXML0
if queue, parse data in VXML0-3 into appropriate ICM variable, and queue call.
Once call is queue, call second CVP script for hold music during queue loop. This loop also does some checks to see if the caller needs to stay in the queue, be moved to another, or dropped (we have a special DB condition we can set that will dump all calls from queue, which we use in the case of a fire alarm or power outage)


Subject: RE: New Message from Asher Schweigart in Customer Voice Portal (CVP) - Gene
Replied by: GEOFFREY THOMPSON on 21-03-2013 03:48:09 PM
>>>I likew to keep my ICM scripts simple. Most of my call centers follow a simple set of steps in ICM:

I like to make my ICM scripts complex and my Studio scripts simple. ;-)

I never do in CVP VXML what I can do in ICM.

I use microapps whenever I can and only go to Studio for complex applications that call to a back end system (Database, Web Service etc) or for things like Recording. I am in and out of the Studio script – ICM is the boss.

Regards,
Geoff

Subject: RE: Re: New Message from Bill Webb in Customer Voice Portal (CVP) - General
Replied by: Sidney Orret on 21-03-2013 03:21:01 PM
I am seeing more customers requesting web interfaces to control the hours or status of their contact centers. I think is because the web interface is more suitable for the tablets and enable the managers to quickly change hours in a very simple and powerfull way.

It won't be long before we are doing iPad or Droid apps to manage this kind of things. The dial-in method is quickly becoming obsolete and never was too flexible.

Subject: RE: New Message from Asher Schweigart in Customer Voice Portal (CVP) - Gene
Replied by: Asher Schweigart on 21-03-2013 03:37:01 PM
GEOFFREY THOMPSON:
ICM is the best place for determining opening hours. Why would you do this in CVP Studio?

No reason you couldn't do the DB lookup in ICM. Although I am curious, why the aversion to checking once you are in CVP? I likew to keep my ICM scripts simple. Most of my call centers follow a simple set of steps in ICM:
 
Set language based on DNIS.
Call CVP script that play welcome message, checks status of call center, and has all menus.
Once the CVP script has determined what to do with the caller (queue, transfer, or hangup, which will be set in callerInput), return to ICM, and parse data returned.
If hangup, just drop the call, since CVP already played the closed message.
If transfer, send call to transfer number in VXML0
if queue, parse data in VXML0-3 into appropriate ICM variable, and queue call.
Once call is queue, call second CVP script for hold music during queue loop. This loop also does some checks to see if the caller needs to stay in the queue, be moved to another, or dropped (we have a special DB condition we can set that will dump all calls from queue, which we use in the case of a fire alarm or power outage)

Subject: RE: CVP open/close application using database lookup
Replied by: Hemal Mehta on 21-03-2013 04:04:11 PM
For app to be controlled by Web, I would def do it in CVP.  CVP because of underlying java has amazing integration with literally anything and
the most complex backend systems.
The URL suggestion by Bill works well too.

Subject: RE: New Message from GEOFFREY THOMPSON in Customer Voice Portal (CVP) - Gen
Replied by: Asher Schweigart on 21-03-2013 03:56:09 PM
I guess it’s just a matter of preference. It seems like those who have been using UCCE for a while have stuck to ICM for the bulk of their coding, and those of us newer to it have gravitated to CVP for most of the coding.

Subject: RE: New Message from Asher Schweigart in Customer Voice Portal (CVP) - Gene
Replied by: GEOFFREY THOMPSON on 21-03-2013 04:28:09 PM
>>>>I guess it’s just a matter of preference. It seems like those who have been using UCCE for a while have stuck to ICM for the bulk of their coding, and those of us newer to it have gravitated to CVP for most of the coding

I would say that’s mostly true. I grew up loving Script Editor in Monitor mode. ;-)

I would also hazard to guess that while you may have complex CVP Studio applications, you probably have simpler routing requirements than I have. No complex ICM systems with 20-40 PGs, multiple PG translation routing, integration of Application Gateways, use of Enterprise Skill Groups, Queue to Agent with overflow, Precision Routing, integration of EIM and WIM etc.

There are also some performance penalties doing things in CVP VXML that you can do in ICM when gateways are a very long way from CVP servers.

Regards,
Geoff

Subject: RE: Re: New Message from Bill Webb in Customer Voice Portal (CVP) - General
Replied by: Paul Tindall on 21-03-2013 05:00:34 PM
Regarding the 1 minute session timeout, just invoke a custom element and invalidate the session to end it immediately.

Subject: RE: New Message from Asher Schweigart in Customer Voice Portal (CVP) - Gene
Replied by: Sidney Orret on 21-03-2013 05:07:53 PM
Well as it is routing simple or complex is always on the ICM side. That is what ICM does well.
 
What ICM doesn't do that well is interface with databases (other than SQL), webservices, etc.  Also I use VXML apps for my queue treatments, menus, collect digits, etc, etc rather than having 100's of ICM Set Variable and Run Ext Script nodes. Bottom line, I try to avoid as much as possible the use of CVP microapps.
 
Asher Schweigart:

GEOFFREY THOMPSON:

I would also hazard to guess that while you may have complex CVP Studio applications, you probably have simpler routing requirements than I have. No complex ICM systems with 20-40 PGs...


That is true. While I have about 30 different call centers, I only have 2 PGs right now, and everything is local on campus. Makes ICM management fairly simple, and little to no cost for going from ICM to CVP
 
 


Subject: RE: Re: New Message from Bill Webb in Customer Voice Portal (CVP) - General
Replied by: Paul Tindall on 21-03-2013 05:16:31 PM
Janine Graves:
Bill, you also want these global variables to be created on a restart of
VxmlServer. So, you'd need to kick off the URL request every time
VxmlServer restarts. How do you do that?

You can use a dummy minimalist application with just start and hangup elements in it, define an application start class for it and load your global data from back-end DB, file etc when the application is loaded or updated.   If you prefix the dummy application with an underscore, it will load first as it happens alphabetically.

Subject: RE: Re: New Message from Sidney Orret in Customer Voice Portal (CVP) - Gene
Replied by: Paul Tindall on 21-03-2013 05:34:11 PM
Janine Graves:
One of you smart guys should create and sell an app on the Apple or Droid App Store to do this! I'd totally recommend it to my students. -- Janine Graves

On the topic of pushing the boundaries and using other HTTP clients with CVP VocieXML Server, I've attached a few slides you may find of interest.

Subject: RE: New Message from Asher Schweigart in Customer Voice Portal (CVP) - Gene
Replied by: Asher Schweigart on 21-03-2013 04:49:42 PM
Mark Applebee:
Asher,
Can you email the schema and code to ?

 
 
 
I'll post it here so anyone else who is interested can take advantage of it as well.
The sql for the tables is attached.
 
 
 
Let me describe how it works, and then I will detail the tables.
 
Conditions are broken down into groups. This is not defined in the databases, but it is the assumption they work under.
 
0-31 - Informational conditions. More than one can be scheduled at once, and in my scripts, each one that is active cause a message of the corresponding number to be played, usually after the welcome message.
32-63 - Weekly hours Schedules. Currently we use 4, but more could be defined. 32 is the default, if no condition is scheduled that is 33-63, the view assumes the call center is using the default(32) schedule. When the call center is open, the current active schedule is the active condition returned in the database.
64-127 - Closed holiday. Script treats the call center as closed, but plays a different closed message according to the number.
128-191 - Other closed conditions. Call center is treated as closed, and message corresponding to number is played.
192-224 - open condition. Currently, we just use 200 - Open, and since this group of numbers is higher than the closed conditions, this forces the call center open even if the schedule says otherwise. This should not be used in the weekly schedule as the return condition for when the call center is open, since you won't be able to override it with a closed holiday/weather condtion. In the weekly schedule, when the call center is open, the condition returned should be the same as the schedule number (32-63).
 
255 - Closed abnormal. In the script, 200 is treated as open, even if the schedule says the call center is closed. 255 is a special condition we use for the queue loop. We check every 1-2 minutes to see if the call center is under this condition, and if it is, we play a special message to the caller, telling the to call back later, and dequeue the call. This is used for fire alarms, powere outages, etc.
 
The call center managers have the ability to set temporary conditions through a web interface. These conditions are set for a specific starting & ending date & time. Conditions ovverride each other based on the number. The hours for a call center can be set through a web interface too, but we have not set that up yet. The table for the weekly schedules is UM.definedSchedules. FK_schedule determines the schedule the row is for, and fk_returnCondition determines what condition the call center is under for that time. Only open conditions have to be scheduled, the view that we use later assumes that any undefined time is a closed time. Each row has a start & end time, but is only used for the days that are marked as true in the sun-sat columns. Here would be an example to have a default schedule of open 8-5 M-F, 10-6 on sat, and closed for a meeting on Wed 10-11:
 
Row 1:
    FK_schedule: 32
    FK_returnCondtion: 32
    startTime: 08:00:00
    endTime: 17:00:00
    sun: false
    mon: true
    tue: true
    wed: true
    thu: true
    fri: true
    sat: false
Row 2:  
    FK_schedule: 32
    FK_returnCondtion: 32
    startTime: 10:00:00
    endTime: 18:00:00
    sun: false
    mon: false
    tue: false
    wed: false
    thu: false
    fri: false
    sat: true
Row 3:
    FK_schedule: 32
    FK_returnCondtion: 130
    startTime: 10:00:00
    endTime: 11:00:00
    sun: false
    mon: false
    tue: false
    wed: true
    thu: false
    fri: false
    sat: false
    
Note that conditions override each other based on the number, so even though condition 32 (open) is set as FK_returnCondition from 0800-1700, it is overriden on wednesday from 1000-1100 by the higher numbered condition 130.
    
If you use multiple schedules, to activate a different one than the default one, the call center managers can activate a particular schedule using the web interface for temporary scheduled conditions. If you wanted to activate Semester Hours (40) from september through december, just schedule that conditiion for that period. The row would get inserted into UM.scheduledConditions, and would look something like this:
    FK_condition: 40
    startDateTime: 2013-09-01:00:00:00
    endDateTime: 2013-12-31:23:59:59
The same number higharchy applies here too. If you scheduled Semester (40) hours from september to december, but scheduled break (48) hours for two weeks at the end of october, you would not have to leave a gap in the Semester (40) hours, because Break (48) will override it during that period.
 
If the call center was closed unexpectedly, such as for bad weather, you would use the same web interface, jsut with a shorter time. Say tomorrow we were closed until 2pm due to bad weather:
    FK_condition: 146
    startDateTime: 2013-03-22:8:00:00
    endDateTime: 2013-03-22:14:00:00
 
These condition numbers could be changed, especially for the closed conditions. Although if you change the range of info conditons (0-31) or defined schedules (32-63), the views will have to be modified. 
 
 
Here's a list of the tables and views:
 
Tables:
 
UM.callCenter - simply a list of call center names and pkids.
 
UM.definedConditions - a list of the different conditions that a call center could be under. This table is used in a frontend interface, it is not needed for the backend work, but it is helpful to have a list of all the conditions that a call center could be under.
 
UM.definedSchedules - This is where you set the weekly schedule for the call center.
 
UM.scheduledConditions - This is what the web interface will write to when managers activate different conditions (through a stored procedure I will list later)
 
UM.updateLog - When a change to UM.scheduledConditions is made through the web interface, this table is updated with information about who and when the update was made. This is all handled automatically through the stored procedure.
 
Views:
 
UM.ActiveConditionsView - This lists the current active contion and active schedule for each call center. The active conditon is listed so that we can use that to determine what hours of operation message to play. For example, if the call center was under activeCondition 112 (Christmas), and active schedule 40 (Semester hours), we would tell the caller that the call center is closed for Christmas in 112.wav, and tell them the normal semester hours in 40.wav
 
UM.InformationalCondtionsView - One row for each Informational Condition that is active for each call center. This is used to play messages to the caller, usually after the welcome message. In the script, the view is queried based on the current call center's pkid, and then the returned rows are looped throug and the messages played. Again, I name the files the same as the conditions, so if High Call Volume (16), and Options have changed (24) were active, after the welcome.wav file, 16.wav and then 24.wav would be played.
 
Stored procedures:
 
UM.newScheduledCondtion - This is used by the web interface to update the UM.scheduledCondtion table. Variables passed in are callCenter (pkid), condition (id number, 0-255), start & end datetime, and user& source, which are recorded in UM.updateLog, so that if necessary we can go back and see who added, deleted, or modified the scheduled conditions.
 
UM.updateScheduledCondition - Same as newScheduledCondition, except the existing rowid is passed in as well.
 
UM.deleteScheduledConditiom - Same as updateScheduledCondition, except start & end datetime are not needed.
 
 
I know this looks rather complex, but once it is setup it is very simple to manage, and because of it I never have to modify a script because a call center is changing it's hours, or they want a special message played for a few days at the beginning of a call.
 
 
Once it is all setup, you can find out what the condition of the call center is in your CVP script with this query:
 
SELECT 
    activeCondtion,
    activeScedule
FROM
    .[UM.ActiveConditionsView]
WHERE
    callCenter = {data.Session.callCenterPkid}
    
Then, use an if statement with the following exit paths based on the returned activeCondition:
    32-63 - Schedules (Open)
    64-127 - Holidays (Closed)
    128-191 - Closed (Closed)
    192-224 - Open (Open)
    255 - Closed Abnormal (Closed)
    
Thanks for reading! I'll do my best to answer any questions about this. 

Subject: RE: New Message from Asher Schweigart in Customer Voice Portal (CVP) - Gene
Replied by: GEOFFREY THOMPSON on 21-03-2013 04:53:35 PM
Don’t you hate it when the forum software screws up the formatting so much that it’s virtually unreadable?

Regards,
Geoff

Subject: RE: New Message from Asher Schweigart in Customer Voice Portal (CVP) - Gene
Replied by: Asher Schweigart on 21-03-2013 04:53:53 PM
For those reading over email, the forum borked my post's formating. Luckily I had it typed up in a document that I pasted from, so I was able to edit it, so if you want to see it with proper formatting, you'll have to visit the forum on the web.

Subject: RE: New Message from Asher Schweigart in Customer Voice Portal (CVP) - Gene
Replied by: Asher Schweigart on 21-03-2013 04:57:32 PM
GEOFFREY THOMPSON:
I would also hazard to guess that while you may have complex CVP Studio applications, you probably have simpler routing requirements than I have. No complex ICM systems with 20-40 PGs...

That is true. While I have about 30 different call centers, I only have 2 PGs right now, and everything is local on campus. Makes ICM management fairly simple, and little to no cost for going from ICM to CVP
 
 

Subject: RE: New Message from Sidney Orret in Customer Voice Portal (CVP) - General
Replied by: GEOFFREY THOMPSON on 21-03-2013 05:22:35 PM
>>>What ICM doesn't do that well is interface with databases (other than SQL), webservices, etc.

No disagreement at all.

>>>Also I use VXML apps for my queue treatments,

I would never do that.

>>>menus, collect digits, etc, etc rather than having 100's of ICM Set Variable and Run Ext Script nodes. Bottom line, I try to avoid as much as possible the use of CVP microapps.

I almost always do those simple things with microapps. Their performance exceeds Studio apps.

Regards,
Geoff

Subject: RE: Re: New Message from Sidney Orret in Customer Voice Portal (CVP) - Gene
Replied by: Bill Webb on 21-03-2013 09:09:22 PM
Thanks Paul!
As always, great info relevant to this thread - interesting stuff in that PDF!

Subject: RE: New Message from Asher Schweigart in Customer Voice Portal (CVP) - Gene
Replied by: Gerard O'Rourke on 22-03-2013 05:13:59 AM
> No reason you couldn't do the DB lookup in ICM
ICM DB lookup is not supported in Packaged CCE 9.0
Its also required offically to go through A2Q if you need to enable dblookup in ICM/UCCE.
So my impression is that Cisco are moving to remove the use of DB lookup in ICM in the future and so using CVP for lookups would seem to way forward?
Gerry
 
 

Subject: RE: New Message from Gerard O'Rourke in Customer Voice Portal (CVP) - Gener
Replied by: GEOFFREY THOMPSON on 22-03-2013 07:11:10 AM
>>>>ICM DB lookup is not supported in Packaged CCE 9.0

Thanks for that.

>>>>>So my impression is that Cisco are moving to remove the use of DB lookup in ICM in the future

I can’t imagine they would do that. Hundreds of contact centers around the world would break.

At one of my bigger customers I had implemented a CVP Studio app (with no audio) to do a database dip on every incoming call using a custom Java element calling a somewhat complex stored procedure. Callers were typically well known to the system and ANI hit rate was over 70%.

This worked fine in North America and Europe for a number of years. When the system was extended to branch offices in Asia (CVP servers in Europe), the response time was terrible because of the VXML back and forth to execute the CVP VXML database application.

Fortunately, the requirements for the complex stored procedure had never been acted upon and I was able to drop it in favour of ICM DB Lookup. Performance returned to what it should be over those long distances.

App Gateways and DB Lookup are fundamental, in my opinion.

Regards,
Geoff

Subject: RE: Re: New Message from Sidney Orret in Customer Voice Portal (CVP) - Gene
Replied by: Hemal Mehta on 22-03-2013 08:36:05 AM
Paul Tindall:

Janine Graves:

One of you smart guys should create and sell an app on the Apple or Droid App Store to do this! I'd totally recommend it to my students. -- Janine Graves


On the topic of pushing the boundaries and using other HTTP clients with CVP VocieXML Server, I've attached a few slides you may find of interest.

 
This is good stuff Paul. Thanks.
Hemal

Subject: Re: New Message from Paul Tindall in Customer Voice Portal (CVP) - General
Replied by: Janine Graves on 22-03-2013 09:28:35 AM
Paul, Will you be presenting this at the June Cisco Live in Orlando? -- Janine Graves

Subject: RE: Re: New Message from Paul Tindall in Customer Voice Portal (CVP) - Gene
Replied by: Paul Tindall on 23-03-2013 01:05:18 PM
Janine Graves:
Paul, Will you be presenting this at the June Cisco Live in Orlando? -- Janine Graves


No, I'm not scheduled to present a technical breakout at the US event.

Subject: RE: CVP open/close application using database lookup
Replied by: Gerard O'Rourke on 11-04-2013 12:19:27 PM
Very intersting to see web server approach & using ICM global variables.
Bringing the discussion back to using SQL databases.
If CVP Studio is using an SQL database to find out if the Contact Center is open / closed.
Does anyone have recommendations around approaches around resilence of the SQL database if this type of application?
i.e. If you don't have access to use an SQL cluster (which is resilent) and you are connected to a single SQL server.
If that single SQL server is down / out of service, All calls into your contact center cannot determine if the contact center is open or closed (critical issue).
Since this is so fudamental to the working of the contact center, (knowing how to route the call), is the recommended approach if using a single SQL database (no SQL server resilience) and if not able to connect to SQL database, just to set the Status to Open?
Gerry

Subject: RE: New Message from Gerard O'Rourke in Customer Voice Portal (CVP) - Gener
Replied by: Hemal Mehta on 12-04-2013 07:29:45 AM
If you have only one server then there are many ways around it.  For example if that one server is not available, you need to be able to get the call center open shut/status by manually passing the indicator from ICM or within the studio you can manually set the indicator or read it from a flat file on a different server.
Hemal
From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Thursday, April 11, 2013 12:20 PM
To: cdicuser@developer.cisco.com
Subject: New Message from Gerard O'Rourke in Customer Voice Portal (CVP) - General Discussion - All Versions: RE: CVP open/close application using database lookup

Gerard O'Rourke has created a new message in the forum "General Discussion - All Versions": -------------------------------------------------------------- Very intersting to see web server approach & using ICM global variables.
Bringing the discussion back to using SQL databases.
If CVP Studio is using an SQL database to find out if the Contact Center is open / closed.
Does anyone have recommendations around approaches around resilence of the SQL database if this type of application?
i.e. If you don't have access to use an SQL cluster (which is resilent) and you are connected to a single SQL server.
If that single SQL server is down / out of service, All calls into your contact center cannot determine if the contact center is open or closed (critical issue).
Since this is so fudamental to the working of the contact center, (knowing how to route the call), is the recommended approach if using a single SQL database (no SQL server resilience) and if not able to connect to SQL database, just to set the Status to Open?
Gerry
--
To respond to this post, please click the following link: http://developer.cisco.com/web/cvp/community/-/message_boards/view_message/14168902 or simply reply to this email.

Subject: RE: CVP open/close application using database lookup
Replied by: Ryan Burtch on 04-09-2013 09:14:30 AM
All:

I'm looking to do a similar thing that Mark was trying to do.  I'd like to all the customer to Ad-Hoc Open/Close their entire Contact Center (Or specific Queues) from a webpage.

Could anyone provide me with some Simple direction on this? 

- Ryan

Subject: RE: CVP open/close application using database lookup
Replied by: Patrik Englund on 12-09-2013 12:50:57 AM
Hi Bill, this thread is quite old but trying anyhow. Is it possible to share some sort of web interface configuratiion or description on how to invoke a vxml app from a web page? I have done this with ip-ivr but is not that familiar how it´s done with CVP.

Subject: RE: CVP open/close application using database lookup
Replied by: Bill Webb on 12-09-2013 10:02:04 AM
I've not personally done this with CVP either, but I like the idea of it and it *seems* like it should be pretty straightforward. The challenge is that you don't have a simple way to create an "HTTP Trigger" like on IP-IVR/UCCX, but I have played around with (for maybe about 15 minutes) creating a Studio app and just calling it out from a browser:

http://cvpserver:7000/CVP/Server?application=MyTestApp

But the catch here is that this is expecting a VXML dialog, so you need to prepare for that. I think it's a viable option, but also remember that ultimately under the covers, VXML Server is running Apache Tomcat just like IP-IVR, so you could add a new listener or whatever through those standard methods...except you wouldn't have access to the typical Studio stuff.

I would think someone out there has gone further with this idea - I was trying it to then invoke the ReqICMLabel, to basically build a web-based "Admin" page... One of these days when I have more free time (like after I retire?? haha) I might revisit, but I gotta believe someone has tried this before...

 - Bill

Subject: RE: CVP open/close application using database lookup
Replied by: Ryan Burtch on 21-09-2013 02:52:46 PM
Bill:

I'm actually working with a collegue on this right now.  When we get done, I'll put up a post stating what we did to get it working.

From a high level, we are creating a SQL DB containing every ICM Script and the associated Operating Hours (tedious, I know).  Once the DB is done, we will use CVP to query the DB to get the current status of the ICM Script (Open/Closed) and pass that data to a intranet page.  On the Intranet page, we will have a drop down list of ICM Scripts that are accessible by specific supervisor.  

Anyhow, when we get this done, I'll post it up here and hopefully it will help some people.

Subject: RE: CVP open/close application using database lookup
Replied by: Bill Webb on 23-09-2013 08:20:02 AM
Excellent! Glad to hear someone is giving this a try!

I won't tell Exony... ;-)

 - Bill
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links