12-27-2018 04:11 AM - edited 03-14-2019 06:41 PM
Hello folks,
I have one problem with the UCCX scripting which is about ANI.
Some calls have more importance than the other calls. I created an XML file and my main goal is when this type of customers call to the IVR, script firstly read the XML file and if there is a match between the ANI and VIP number in XML, the script will give a priority to the call. I copied a sample XML file which is helpful for the readers.
<?xml version="1.0" ?>
<VipNumbers>
<VIP ID="1">
<Numbers>4066095</Numbers>
</VIP>
<VIP ID="2">
<Numbers>4066096</Numbers>
</VIP>
</VipNumbers>
UCCX:11.5.1.10000
CUCM:11.5.1(SU3)
UCCX License: Enhanced
Solved! Go to Solution.
12-27-2018 09:01 AM
I'm not sure which part you are having trouble with, but I can offer up two quick solutions for you.
1) I tested this XPATH expression, which seems to work under your test conditions:
"//VIP[Numbers=" + ANI + "]/@ID"
The result will be the VIP ID for the Number that was matched.
2) So, that means your If step would need to be re-written to check for positive IDs (or at least non-null/non-empty values)
If (RequestedNumbers != null && Requested Numbers.trim() != "")
Bonus
If you needed to match the specific VIP ID, to either assign specific priorities or play specific messages, you could use a Switch step, like this:
Switch (RequestedNumbers) VIP ID == "1" Play Prompt 1 Set Priority 5 Goto CSQ VIP ID == "2" Play Prompt 2 Set Priority 6 Goto CSQ Default Play Prompt Default Set Priority 1 Goto CSQ
12-27-2018 09:01 AM
I'm not sure which part you are having trouble with, but I can offer up two quick solutions for you.
1) I tested this XPATH expression, which seems to work under your test conditions:
"//VIP[Numbers=" + ANI + "]/@ID"
The result will be the VIP ID for the Number that was matched.
2) So, that means your If step would need to be re-written to check for positive IDs (or at least non-null/non-empty values)
If (RequestedNumbers != null && Requested Numbers.trim() != "")
Bonus
If you needed to match the specific VIP ID, to either assign specific priorities or play specific messages, you could use a Switch step, like this:
Switch (RequestedNumbers) VIP ID == "1" Play Prompt 1 Set Priority 5 Goto CSQ VIP ID == "2" Play Prompt 2 Set Priority 6 Goto CSQ Default Play Prompt Default Set Priority 1 Goto CSQ
12-30-2018 06:23 AM
Hello Anthony,
Actually, I found a solution from your answer to this guy https://community.cisco.com/t5/contact-center/number-matching-with-xml-for-setting-priority/td-p/1877018
Thank you so much for these answers.
Have a nice day.
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