02-28-2020 10:42 AM
I have a script where I want to compare the calling number (variable) with a list of directors and above in an xml document then prioritize them and send them to a queue. I have everything setup but i can't get my expression to compare the calling number with the numbers in the document. It always pulls the first vipNumber in the xml document. I've seen other post on this subject but none that matches exactly what I'm trying to do. Any help is appreciated.
Solved! Go to Solution.
04-02-2020 08:17 PM
This post is a bit old... but it had no replies, so here is a sample solution:
Variables used:
I created a subflow that provides the logic to sort through the XML file, and search for matching entries based upon the Calling Number (variable sANI).
Your script does not contain any logic to loop through the entries in the XML document to find the Name for a matching calling number, if present.
It only searches for the first entry in the XML data. You need to create the logic to search all entries for a match against Calling Number.
Also, your XPath statements can be abbreviated...
Let me know if this helps.
-Sean
04-03-2020 11:48 AM - edited 04-03-2020 12:40 PM
I would submit the following solution which requires no looping and does the matching in XPATH rather than in more script steps:
CallersName = Get XML Document Data(xml, "//vip[vipNumber='" + CallingNumber + "']/CallersName")
If (CallersName != null && CallersName.trim() != "")
True
/* This is a VIP Caller */
False
I wouldn't think it would be necessary to check beyond a first match, because you shouldn't have more than one entry sharing the same phone number. So, my solution, just like yours, only pulls one match out of a potential pool of matches, but I don't see that as a problem.
04-02-2020 08:17 PM
This post is a bit old... but it had no replies, so here is a sample solution:
Variables used:
I created a subflow that provides the logic to sort through the XML file, and search for matching entries based upon the Calling Number (variable sANI).
Your script does not contain any logic to loop through the entries in the XML document to find the Name for a matching calling number, if present.
It only searches for the first entry in the XML data. You need to create the logic to search all entries for a match against Calling Number.
Also, your XPath statements can be abbreviated...
Let me know if this helps.
-Sean
04-03-2020 11:48 AM - edited 04-03-2020 12:40 PM
I would submit the following solution which requires no looping and does the matching in XPATH rather than in more script steps:
CallersName = Get XML Document Data(xml, "//vip[vipNumber='" + CallingNumber + "']/CallersName")
If (CallersName != null && CallersName.trim() != "")
True
/* This is a VIP Caller */
False
I wouldn't think it would be necessary to check beyond a first match, because you shouldn't have more than one entry sharing the same phone number. So, my solution, just like yours, only pulls one match out of a potential pool of matches, but I don't see that as a problem.
04-09-2020 06:53 AM
Thank you, this is very helpful.
09-26-2022 03:48 AM
Is there a limit for number of XML data which can execute on UCCX?
When I tried this, it is successfully working for a small XML data base ( less number of xml data base), whereas if i try with 300 or 400 xml entries it doesnt work on UCCX. Both case I can execute the query on http://xpather.com
On UCCX when I debug reactive script it stoped on166 th iLoopCount and stuck on "Goto NextValue" and gave an exception error " No. of executed steps:1000"
09-26-2022 04:07 AM
By defaut the CCX script has the limit of 1000 execution steps.
So each time you loop you use x number of execution steps.
One execution step is one step in the script.
You can change this value in the sustem paramters on the ccx appadmin page
09-26-2022 04:49 AM
Issue solved after making the UCCX system parameter value for Max Number of Executed Steps to 4000. Change effected after Restarting Cisco Unified CCX Engine
1 ++ On the ccx appadmin system > syetm paramters >Max Number of Executed Steps
2 ++ UCCX serviceability> Control Center - Network Services > Restart : Cisco Unified CCX Engine
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide