Tuesday, 15 April 2014

UCCX9 Working with XML Document

Thanks to DrVoIP’s amazing video!
No TTS server available in uccx yet.
Upload xml file to uccx
<?xml version="1.0" encoding="utf-8"?>
<TechnicianList>
    <Technician ID="1234">
        <TechnicianName>Douglas</TechnicianName>
        <TechnicianCountry>CA</TechnicianCountry>
        <TechnicianCell>8589451069</TechnicianCell>
        <TechnicianCharge>59</TechnicianCharge>
    </Technician>
    <Technician ID="5678">
        <TechnicianName>John</TechnicianName>
        <TechnicianCountry>US</TechnicianCountry>
        <TechnicianCell>7608049733</TechnicianCell>
        <TechnicianCharge>90</TechnicianCharge>
    </Technician>
    <Technician ID="9123">
        <TechnicianName>Jane</TechnicianName>
        <TechnicianCountry>UK</TechnicianCountry>
        <TechnicianCell>7025532706</TechnicianCell>
        <TechnicianCharge>36</TechnicianCharge>
    </Technician>
    <Technician ID="1212">
        <TechnicianName>Diminic</TechnicianName>
        <TechnicianCountry>ME</TechnicianCountry>   
        <TechnicianCell>9144718510</TechnicianCell>
        <TechnicianCharge>63</TechnicianCharge>
    </Technician>
</TechnicianList>


Create input value
 
Create document value that was uploaded to uccx in first step
 
Create begin value with -   "//Technician[@ID='"
, which is the a beginning part of xpath expression
 
 
Create ending parts of the xpath expression
"']/TechnicianName"
"']/TechnicianCountry"
"']/TechnicianCell"
"']/TechnicianCharge"
 



Create container values to place searching results
Create promt values
 
Create an empty string value for last name
 
Getting digits input from the caller and play promt 

 
Output the input digits into “employee” string value

 



Specify xml doc file to read
 

Stick all values together into a complete xpath expression with “+” sighs, and output to the result strings
 






Generate promt for employee name. No TTS server is used

 




Generate promt for country value

 
Generate promt for cell phone value

 
Generate promt for charge amount value

 
Play all promts together at play promt value

 


Ps: you also can paste the xml file into the value:
 
At the beginning, put “TEST[” ahead of the xml code

 


Ending with a square bracket
 





for download
https://drive.google.com/file/d/0B5tzzJsbkWkIQ1NlVnk3SEJkVGc/edit?usp=sharing

No comments:

Post a Comment