cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3064
Views
0
Helpful
2
Replies

UCCX READ DATA FROM XML

ackarabas
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

Anthony Holloway
Cisco Employee
Cisco Employee

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

 

 

View solution in original post

2 Replies 2

Anthony Holloway
Cisco Employee
Cisco Employee

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

 

 

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.