06-19-2015 03:17 PM - edited 03-15-2019 06:09 AM
I know how to use Xpath to read in a specific value from an XML document, but how do I reverse the process and write a value? There are lots of examples of changing a value in an xml document with a single value, but what about in a list that you have to index to find the value you want? For example:
<QueueStatus>
<Queue ID="1234">
<Saturday>active</Saturday>
<Sunday>active</Sunday>
</Queue>
<Queue ID="4567">
<Saturday>active</Saturday>
<Sunday>active</Sunday>
</Queue>
</QueueStatus>
OK, we know how to setup Xpath and read the status of Queue 1234 on Saturday. The issue is How would you change the status of Queue 4567 on Sunday from active Inactive?
(I know to authenticate user to upload documents).
06-21-2015 12:41 PM
Hi Hieronymous,
This can be achieved using "Keyword Transform Document Step" in Cisco CCX scripting.
Kindly go through the link:
http://www.cisco.com/c/dam/en/us/td/docs/voice_ip_comm/cust_contact/contact_center/crs/express_9_0/programming/guide/SeriesVol2.pdf
Page:193
Let me know if you need further help, may be I can help you with an example script on how to achieve it.
HTH
Chuck.
06-21-2015 05:31 PM
@Chakshu
You are correct that you can update the XML file using this approach but it is ugly and painful. If you have a large XML document with many elements, the keyword transform approach is unworkable. Even in the example given, Hieronymous would have to re-write the entire document to allow for different keywords to support the list of elements as they would each need a different %value% name.
CISCO scripting does however allow you to create and use external Java Jars. See Sam Wolmacks article on this subject as he regularly posts here and this subject has been discussed. http://samiamsam.com/2014/07/28/uccx-scripting-write-xml-doc-wo-keyword-transform-step/
I have used another approach for small status updates that adds a getsetting.aef and setsetting.aef that creates a file that has a single boolean value to handle this type of situation. In the example Hieronymous posted you would have to create a separate xml document for each queue that he wants to check status for; and in his example, double it!
At any rate, I think ultimately you have to learn how to use DO statements that cll on external java code to manage XML in UCCX. I think Sam has done the best job of explaining this, though others like Steve Griffin (also on this site) have suggested similar approaches.
08-24-2018 10:57 AM
Hello,
I'm looking to do this same thing and am not a java guy. Short of creating xml files for each "queue" did you figure this out?
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