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...
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!
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...
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)
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
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())
can you see anything wrong with this set command? Am I missing something?
These are the paths to get to each CCX logs through CLI. They may be helpful if you are having issues accessing RTMT or downloading logs through it.
If you want to download them you have to prefix "file get " and you can add one of the options (re...