IPCCX cti screen pop using http URL...

Unanswered Question
Jul 22nd, 2009

I would like to search a SQL DB in my IPCCX script so that it will do the following:

Get calling ANI in a variable. Parse the ANI so as to include "-" like this: '520-295-1111'

Then, run a SQL query and against stored ANI in new format to find a matching record against the table.

SQL query: select locationid from locations where phone = 'callingANI' (this is the calling ANI obtained earlier but don't know how to pass an IPCCX variable to the SQL query..)

If there's a match, grab the "LocationID" vlue for the matching number, place it in a variable.

Send a CTI screen popup using the following HTTP page on the connected agent computer:

https://test.com/location/detail.asp?LocationID=9846

the LocationID of 9846 would have been the value learned from the matching calling ANI...

so, high level: get ANI, Parse ANI, querey SQL column against ANI, store "locationID" value if there's a match. send http open to client containing the URL which references the value found from the LocationID...

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Jonathan Schulenberg Wed, 07/22/2009 - 18:20

To insert the value of a scalar variable within the script in your SQL query, you would represent it as $variable. If I use your example, it would be:

SELECT locationid FROM locations WHERE phone = $callingANI

Within the Success branch of your DB Read step, you should then have a DB Get step. If more than one row was returned, you would process each row by executing the DB Get command repeatedly. This is where you map the SQL field value back into CCX script variables.

After that, this is a basic Enterprise Data discussion to get the information into CAD. CAD Workflows would open the URL for the agent. Both of these have been covered on the forum many times; just search for them.

PS- Do not forget to release your database connection as soon as you are done using it!

Jonathan Schulenberg Wed, 07/22/2009 - 18:59

Yes there is; use an If step with the .matches() method to evaluate your variable. It includes the ^ and $ automatically.

Example of matching an E.164 number's area code

If (callingANI.matches("+1"..........))

--True

----Set callingNPA = callingANI.substring(2,5)

----Set callingNXX = callingANI.substring(5,8)

----Set callingLine = callingANI.substring(8,12)

--False

----

Keep nesting If statements as needed. Note you may need to test my substring(x,y) values; I'm not positive I have them correct for this example.

Logicalis Manag... Wed, 07/22/2009 - 19:44

thank you and sorry for all these questions.

how do I pass an IPCCX varialbe into the SQL select query? When I try "$xxx" it complains.

Furthermore, do you have a quick link to on of the guides which shows how to setup the cti screen pop after the variable is updated?

I created a workflow that will be triggered if the "LocationID" variable int eh script is not null and if not null, then the action is to do an http get... I may have it correctly but my script is complaining of something...

thank you

Jonathan Schulenberg Thu, 07/23/2009 - 02:20

Using $ is the correct method of passing a script variable into your SQL query. The example within the DB Read step and the Step Reference Guide shows this as well. You need to be much more specific than "it complains" if this is not working.

Cisco Unified Contact Center Express Scripting and Development Series: Volume 2, Editor Step Reference 7.0(1)

http://www.cisco.com/en/US/docs/voice_ip_comm/cust_contact/contact_center/crs/express_7_0/user/guide/uccx701edstepref.pdf

Enterprise Data setup has been explained by many people on the forum. Here is mine:

http://forum.cisco.com/eforum/servlet/NetProf?page=netprof&forum=Unified%20Communications%20and%20Video&topic=Contact%20Center&topicID=.ee6fe12&fromOutline=&CommCmd=MB?cmd=display_location&location=.2cc1c7b2

The "screen pop" (CAD Workflow) is an entirely separate operation. I would not configure this until AFTER you have the needed Enterprise Data successfully appearing within CAD when a call arrives. The CDA Administrator guide covers workflow setup.

Cisco Desktop Administrator User Guide for CAD 6.6 for Unified CM

http://cisco.com/en/US/docs/voice_ip_comm/cust_contact/contact_center/crs/express_7_0/user/guide/cda66ug-cm.pdf

Logicalis Manag... Sun, 07/26/2009 - 12:42

Thank you. Not sure how to step through a debug to see what's going on but within the script, when trying to obtain the last 4 digits from the ANI, callingLine, it appears not to extract the last 4 digits and store that number in a variable.

When I explicitly fill in the variable with the last 4 digits, the cti screen pop appears to work - shows up in CAD integrated browser.

Here is what I'm trying to do - the ANI coming in is 10 digit (e.g., 5863333333).

set var_callingLine = var_OrigCallerANI.substring(6,var_OrigCallerANI.length())

Also tried

set var_callingLine=var_OrigCallerANI.substring(6,4)

can you see anything wrong with this set command? Am I missing something?

Actions

This Discussion