UCCX Script XML Select equivalent

Assume the following XML document exists:
<Technician>
      <ID>1234</ID>
           <CellPhone>5039991234</CellPhone>
           <HomePhone>5039992345</HomePhone>
     <ID>2345</ID>
           <CellPhone>4155551212</CellPhone>
           <HomePhone>4151234445</HomePhone>
     <ID>5678</ID>
           <CellPhone>6125431234</CellPhone>
           <HomePhone>6126634242</HomePhone>
</Technician>
I Know I have to Create the FileDocumentName = Technician
I know that I have to Create XML Document = Technician
For each element I want to retrieve I know I have to as an example
GET XML DOCUMENT DATA "/descendant::Technician/child::HomePhone"
But what is the correct format to select the HomePhone based  WHERE ID is provided of lets say 1234?
/Technician/ID=[1234]/HomePhone
What is the correct format here?

OK I broke the code on this (sorry for the PUN).   Reformat your XML document to set the ID as an Attribute and put the Phones as Element within the Technicians as follows:
           8589451069
           6590
           7608049733
           6590
           7025532706
           6590
           9144718510
           6599
The document is the same, but we set the ID as a Unique Record Number (maybe the only reason I can see that anyone would use an Attribute over an Element).   You can not use your [@ID="1234"] to select a specifc Element from the TechnicianList.   So you would setup an Xpath as follows:
strXpath = //Technician[@ID="1234"]/TechnicianCell 
Then stuff your "TechnicianCell = GET XML DATA with strXpath"
You can then Substitue a Variable for the ID so that you can fill it from the GET DIGITS step.  I sometimes find that I have to convert the String value to a int Value, but it works and you should get the desired result.  Take Away = Unique Record ID!
Peter Buswell (aka DrVoIP)
http://blog.drvoip.com

Similar Messages

  • How to update XML file through UCCX script ?

    Hi,
    I have an UCCX script with MENU step. One of the step is for technical support team. When caller chose this step, information about date and time of the call and calling number should be recorded on a XML file located on the web server.
    This XML is uploaded into the web server , but I don't know how to update it through UCCX script.
    Here is how the XML file looks like:
    <?xml version="1.0" ?>
    <rss version="2.0">
    <channel>
    <title>CALL LOG</title>
    <link></link>
    <description>Support Call log</description>
    <ttl>1</ttl>
    <item>
    <title>2011-08-24 14:56:39 - 00044 123 123 123</title>
    <link></link>
    <description></description>
    </item
    </channel>
    </rss>
    Any idea?
    Thanks,
    O

    Hi
    The 'keyword transform' step uses the template XML file to generate the actual XML file you want to post... the template would be a plain text file uploaded to the repository, and would look like so:
    <?xml version="1.0" ?>
    CALL LOG
    Support Call log
    1
    %%calldatetime%% - %%clinumber%%
    Now - if you had that bit of XML, with correct time/number in it - have you verified know that you can definately just post that XML to a certain URL to get it on the server? Check with whoever manages that server exactly what you need to do to get it to appear - then worry about how you do that from UCCX. It may not be a matter of posting up that XML, you may need it in a different format or something..
    Aaron

  • UCCX script to pull XML data

    Hello,
    My goal is to create a UCCX script that will run on a Standard license server. Basically, when a user dials a four digit "speed dial", I want them to be translated to a UCCX route point, that will take the original called number, and the calling number, and use that to create a URL that it will then query and retrieve the actual number that will need to be dialed.
    So my plan currently is to have a phone inside of a partition that has a translation pattern of XXXX. The called number gets translated to 1158, which is the trigger of the application on UCCX.
    The url I want to query will be something like this:
    http://localhost:35798/RestServiceImpl.svc/XML/1017/6314
    "Localhost" will eventually become the IP address of the server hosting IIS application that will provide the XML output. 1017 is the "speed dial" or the original called number, 6314 is the calling number.
    Going to that URL should return me this output:
    <XMLDataResponse xmlns="http://tempuri.org/">
      <XMLDataResult>
      <CallingXML>
      <Extension>6300</Extension>
      <SpeedDial>1001</SpeedDial>
      <PhoneNumber>918005551212</PhoneNumber>
      </CallingXML>
      </XMLDataResult>
    </XMLDataResponse>
    This is the script as I have written it out so far:
    It does not seem to like what I have put together thus far when I try to validate it. I'm just wondering if I'm doing something that's obviously wrong.
    The end goal will be to take the NewNumber and dial it, while hiding it from the phone.
    Thanks,
    Mark

    Here's an update: I have the script retrieving the correct numbers and formulating the URL correctly. It also appears to be delivering the query from the XML.
    Here's what the XML looks like when I hit it from my browser:
    http://tempuri.org/
    ">
      http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">63141017918003551111
    When I do an Interactive Script Debug session and dial the number, I can see that there are two problems: 1) the NewNumber string is "null" by the time it gets to the step to do a Call Consult Transfer, and 2) the script just shows up a blank Exception.
    This tells me I am not parsing the XML correctly.
    Here is what I have currently:
    NewNumber = Get XML Data (xml, "/descendant::XMLDataResponse/child::XMLDataResult/child::PhoneNumber")
    Which based upon what I've read in Cisco's Volume 2 and elsewhere, should be correct.
    Notice in the screenshot that the XML data that UCCX pulls in looks different from when I look at it from my browser. I've also attached the script.
    Thanks,
    Mark

  • UCCX Script CUCM XML Directory lookup for Calling name

    Hi there!
    I'm trying to fetch "calling name" by the below uccx script params but get "no protocol" java exception according to the attached screenshoot.
    It seems to happen when i reach the line: xml = Create XML Document(URL[dir_url + calling_number])
    My version of the UCCX is 8.02 and CUCM 7.1.5
    These are the params:
    Variables:
    This is part of the code:
    Script:
    calling_number = Get Call Contact Info(--Triggering Contact--, Calling Number)
    if (calling_number != null && calling_number.trim() != "")
         True          xml = Create XML Document(URL[dir_url + calling_number])
              calling_name = Get XML Document Data (xml, "//Name")
              if (calling_name != null && calling_name.trim() != "")
                   True
                        Set Enterprise Call Info (--Triggering Contact--)
                   False
                        /* Name Not Found */
         False
              /* ANI Not Found */
    String dir_url = "http://ip_address_cucm:8080/ccmcip/xmldirectorylist.jsp?n="
    String calling_number = ""
    String calling_name = ""
    Document xml = null
    rgds, Mikael

    Hi-
    Did you configure the 'Call Variable Layout' or did you only configure the steps in the script?
    Take a look at the 'Manage Call Variables Layout' section in the CCX Administration guide.
    Cisco Unified CCX Administration Guide, Release 10.0(1)
    Cisco Unified CCX Administration Guide, Release 10.5  
    Cisco Unified CCX Administration Guide, Release 10.6
    I have not worked much with Finesse, so I cannot provide an example.
    Thanks,
    DJ

  • UCCX scripting to invoke Web Serivces?

    Hi,
         I am working on UCCX 7.0(1). My task is to write a UCCX script that would invoke a call to web services. Below is the details of what Iam trying to achieve-
    1) Send a request as "http://L01oh055841Z2KX.cardinalhealth.net:9084/wsa/services/WsDWLServiceControllerAdapter". This involves appending an XML doc that would be the input parameter to the web services adapter. I use the Create URL Document step from the script pallette but have no idea how to send the XML document that would act as a parameter to the adapter in the above link..
    Has anybody tried this before?
    Thanks,

    Anthony,
    My thask is similar to original poster's task. I'm trying to follow your guide. Problem is, when I try to create application and select my script (that uses custom java class), I get message - Error occurred while loading script. Check log for more details. Which logfile do I check? Is it CRS engine log? I looked thet up and it contained nothing more that keepalive reports. Actually I went through all of them and found no error messages. I suspect that I should turn up tracing, but I don't like the idea of turning on trace for all subsystems. Maybe you could tell me which subsystem I should investigate further?
    Thank you!
    Ervins

  • UCCX Scripting - Open/Close time of day is different on some days

    All,
    I currently have a simple UCCX script with a DOW and TOD variable set, but need to make an adjustment to accommodate a new schedule for a call center queue.  My DOW is Monday - Friday, and TOD is set to 8am-5pm.  I need to make a change to where say Wednesday is set to not close the queue until 10pm.  How do I make that happen?
    This is the way it shows in the editor:
    DOW: Monday-Friday
     +open:
      ++8am-5pm:
       +++Goto yadayada
      ++TheRest
     +Closed
    If I need Wednesday's queue to stay open between the hours of 8am and 10pm, what logic do I need to put in?  I'm thinking I'll have to add an IF Statement, but not sure where to start.  Any ideas?

    I was able to figure this out.  Below is what I did:
    Created two new Day of Week options and selected the corresponding days.  Under each, I moved the Time of Day statement and assigned the time ranges, then selected the goto statement and assigned it as needed per my script.  
    This should provide the logic I was needed.  

  • UCCX Reading XML file hosted on IIS web server

    hi guys,
    i have a customer on CCX 8.5 environment and they have a .NET application running on an IIS web server. As part of this .NET application, the app produce an XML file.
    My questions is
    "Can CCX read XML file that is hosted externally on IIS web server rather than parsing the XML file on CCX document repository?"
    All of the examples of XML parsing points to the XML file in document repository.
    Any pointers to links and documentation/example on how to do this would be greatly appreciated.
    If this is not achievable, if you could kindly suggest a different way of doing it too would be greatly appreciated.
    Thanks in advance,
    Daniel

    Hi,
    to be quite honest with you, I don't know anything about Sharepoint - so I am afraid I cannot help you with its XML editing capabilities. XML is just a well formed text file that follows some logical rules, so no additional application is required for editing, in fact, I always encourage everybody to use Notepad/Textpad/ to read and edit XML files. Of course, if it's not possible, you will find a great number of various user friendly XML editing applications.
    A UCCX script will normally access an XML using the Create URL Document step and then, using the Get XML Document data step with the help of an XPath expression, will filter out the necessary information from the XML document.
    The protocols used are standard and well known, including HTTP and XPath (and XML itself). So it does not really matter what kind of HTTP server serves the XML file, IIS is just an option.
    Examples may be found in the Scripting guides for your particular UCCX version.
    HTH
    G.

  • DB Read error from UCCX Script

    Hi All,
    We are running uccx 7.0.
    Trying to return data from DB using stored procedure from the uccx script.
    We are able to run this when we pass explicit value instead of variable ANI.
    But whenever we provide variable ANI, we get below
    error: SQL statement varible not defined : ANI
    Query which provided in the DB Read as below,
    select * from  table(credit_back.fun_select_point($ANI));
    Request your help on it..
    Regards,
    Shalid K.C

    Yes Gergely.
    we have created new script and when i add DB Read function in the script, it is not allow to apply it, same time it is giveing the above mentioned error.
    but when i test it with explicite value it is working.. .not working by providing variable name
    Regards,
    Shalid

  • UCCX script and abandoned calls

    Hi Guys
    I got question about that UCCX script and abandoned calls , so currently we had 4 different script for  support the call follow .
    So the Main script is just AA let the people select menu 1 , 2 ,3 then go to different queue , after select 1 (for example) then call-direct to second script trigger number and coming into the queue .
    Unfortunately , the system counter the action to be an Abandoned call      , I already open the case about this issue and the TAC did not found any configure issue on UCCX , from the log we can seem all the REDIRECT,lrd=5000 is abandoned call .
    23811205: Apr 28 13:01:44.257 GMT+800 %MIVR-SS_TEL-7-UNK:Call.received() JTAPICallContact[id=37148,implId=151183/1,state=STATE_RECEIVED_IDX,inbound=true,App name=APP0,task=null,session=null,seq num=-1,cn=5000,dn=5000,cgn=0405554590,ani=null,dnis=null,clid=null,atype=DIRECT,lrd=null,ocn=5000,route=RP[num=5000],TP=null
    23811420: Apr 28 13:02:00.491 GMT+800 %MIVR-SS_TEL-7-UNK:Call.transferring(5030) JTAPICallContact[id=37148,implId=151183/1,state=STATE_ANSWERED_IDX,inbound=true,App name=APP0,task=48000040709,session=36000027315,seq num=0,cn=5000,dn=5000,cgn=0405554590,ani=null,dnis=null,clid=null,atype=DIRECT,lrd=null,ocn=5000,route=RP[num=5000],TP=5007]
    23811424: Apr 28 13:02:00.491 GMT+800 %MIVR-SS_TEL-7-UNK:Call.abandoned() - transferring JTAPICallContact[id=37148,implId=151183/1,state=STATE_ANSWERED_IDX,inbound=true,App name=APP0,task=48000040709,session=36000027315,seq num=0,cn=5000,dn=5000,cgn=0405554590,ani=null,dnis=null,clid=null,atype=DIRECT,lrd=null,ocn=5000,route=RP[num=5000],TP=5007]
    23818414: Apr 28 13:09:46.095 GMT+800 %MIVR-SS_TEL-7-UNK:Call.transferring(239) JTAPICallContact[id=37149,implId=151183/1,state=STATE_ANSWERED_IDX,inbound=true,App name=app2_Admin,task=48000040710,session=null,seq num=-1,cn=5030,dn=5030,cgn=0405554590,ani=null,dnis=null,clid=null,atype=REDIRECT,lrd=5000,ocn=5000,route=RP[num=5030],TP=5034]
    23818421: Apr 28 13:09:46.095 GMT+800 %MIVR-SS_TEL-7-UNK:Call.abandoned() - transferring JTAPICallContact[id=37149,implId=151183/1,state=STATE_ANSWERED_IDX,inbound=true,App name=app2_Admin,task=48000040710,session=null,seq num=-1,cn=5030,dn=5030,cgn=0405554590,ani=null,dnis=null,clid=null,atype=REDIRECT,lrd=5000,ocn=5000,route=RP[num=5030],TP=5034]
    Please give some advice about that and I am look forward to heard from you guys soon .
    Thanks

    Hi Jon
    I was tested "Set Call Contact Info step to mark the call as handled" last night , but not working .
    so in the get call contact info properties , I was used  last Redirect number  to nest trigger number .
    but not working .
    so have got any idea about that ?
    thanks

  • UCCX Modifying XML document in repository programatically

    Hi,
    I'm trying to write a web application that so that our non-admin users can have the ability to add holidays, turn on outage messages etc. The files that I need to manipulate are XML files that reside in the document repository.
    I had originally planned on placing the XML files on a remote web server and then have the uccx scripts reference the XML files like http://servername/holidaydates.xml and I would just have the program that I write manipulate the xml files accordingly.
    When I ran this past one of our consultants they said that this would add a lot of complexity. I'm not sure what he's talking about since I had it working in about 30 minutes.
    Anyways, I thought that another method that might be good is if I could download the xml files from the document repository, modify them locally, and then upload them. That way there isn't a web server in the mix.
    Is there a way to programatically download/upload files to the document repository?
    Thanks!

    I figured out what the issue was with my scipt and I have resolved it.

  • Working with TimeZone variables in UCCx script

    Hi Team
    I'm wondering if you guys could help me to find out the best way to work with TZ variables in UCCx script.
    Because of different countries customer has a branches, I need to setup different TimeZones for each country handled by the same centralized UCCx.
    In this post they use Java to work with TZ, however, but I prefer another way to work with TZ variables:
    https://supportforums.cisco.com/discussion/11851751/how-make-uccx-holiday-script-timezone-aware
    My idea is to work with Time Zone variables in the script, so what I did was to create different TZ variables and each one of the them assigned the proper timezone based on the country, so depending of the Trigger involved (DNIS), I can find witch country this call came from and give the right timezone.
    The problem I have is that at the time I want to add or subtract two variables of TZ, I got an error because of the syntax. I've been trying different options, but until now, no luck.
    Would you mind you guys who had been working on this let me know what is the right syntax to add or subtract TimeZone variables un UCCx?
    Thanking you in advance
    Martin

    Hi
    I've been working on TZ's recently... see this post:
    https://supportforums.cisco.com/discussion/12474756/how-check-daylight-saving-within-uccx-script
    My approach in the scripts was that basically I allow the department to set their opening hours in the timezone of their choice.
    They have a management web page served from CCX that accepts start/end times each day, and a timezone. That all gets stored in XML.
    In the script, based on that information I get the current time in whatever timezone is set, and compare that to the XML open/close times.
    Similarly for holidays, I get the current date/time in the holiday TZ and compare the holidays to that.
    Aaron

  • Procedure of mapping new UCCX script

    Hi Guys,
    Can you please tell me the procedure of correctly creating a trigger for a UCCX script?
    do I need to create a separate call control group all together or I can use existing one?

    Hi Shyam,
    Make sure before testing a script you have checked below:
    1. Unified CTI telephony Subsystem is InService
    2. The validation of Script is successful before uploading in script management.
    Yes , You can do a reactive script to check if trigger is hitting the script.
    Set the reactive script, once you make a call the script will reloaded and you will come to know that the script is triggered.
    Step 1: in Script Editor , go to Debug-->Reactive script
    Step 2: Select the Script you want to monitor from dropdown and set the timer timer
    Step 3: Call the Route point (trigger), the script will reloaded with the red mark. So you can to know the script is triggered.
    Step 4: You can debug the script by click step over button to check if any error is there in the script.

  • Order status using UCCX scripting

    I have Oracle DB which contain information about customer order such as if order has been shipped, when has been shipped,and so on. We do not want to query directly against the DB, and as far as I know Oracle has XML DB web services. If we turn that on, and have a report in xml that give me all information I needed. How do I use UCCX scripting to access these data, and read it back to customer when they call.
    I am using UCCX 8.5 premium.

    Hi,
    I see.
    This way: I certainly need the WSDL. It's basically the contract between the SOAP server and the SOAP client, the description of the protocol they are going to use. Its a file or a URL, in both cases, it's an XML document.
    SOAP might be a bit tricky, but I can help you with that. It's basically the SOAP client (in our case, the UCCX server) sending an XML over HTTP to the SOAP server, and expecting some result, which is usually an XML document, too.
    There are several approaches of enabling a UCCX script to perform SOAP commmunication, and I have created several documents about it:
    https://supportforums.cisco.com/document/97736/uccx-8x-really-simple-soap-client-no-custom-jar
    https://supportforums.cisco.com/document/112616/uccx-oop-soap-client-1-custom-jar-using-jax-ws
    Or, there's a recent thread about a similar integration:
    https://supportforums.cisco.com/discussion/12240436/uccx-soap-request
    Please ask the administrator of your Oracle DB about the WSDL, download it, post it to here.
    About the second integration option: I was thinking about a Grails proxy app - do you have a Tomcat or other Java application server in your environment we could use? 
    G.

  • Send data collected in UCCX script to external url

    I have a requirement to have a caller select an option in a UCCX script that will populate a variable (whatever type it may be).  I then would like to send that variable to an external URL.  Has anyone had success at doing this?  If so can I see an example script?

    Hi,
    I am not sure whether I got this correct, but if you mean that you have a block of Java code within your script (probably in a Set or a Do node, but any node which accepts an expression would do), then a UCCX script variable can be referenced within the Java code block by the variable's name.
    G.

  • UCCX Scripting, Time variable

    I am looking for  guidance on UCCX scripting. I have searched all the forums but can't  find what I am looking for. I want to be able to close Contact Center at  different times for different Service Queues on Holidays. For example,  Customer Service closes 5 pm on the day before holiday, but Helpdesk  does not close till 11:30 on the day before holiday. How can i  incorporate time in my script. I am using XML file with Holiday dates as  of now. Any help will be appreciated.
    Scenario:
    Sales: Close 12/23/13 at 5:00 PM and re-open 12/26/13 at 7:00 AM
    Help Desk: Close 12/24/13 at 1:30 AM and re-open 12/26/13 at 6:00 AM

    Take a look at the examples available from script repository:
    Cisco Unified Contact Center Express Script Repository 9.0(2)
    Chris

Maybe you are looking for

  • Problem with iTunes and Screensaver

    Since a little while i can't maximize iTunse when it is minimized. When i click the green maximize button iTunes stops playing and quits. (At this moment i have it running minimized) I can maximize it when i use the button "store" - "show my account"

  • Request to convert multiple files from LV 3.1 to LV 2011 or more

    Dear Friends, Can someone please upconvert the attached LabVIEW VI files to LV 2011 or later..? Thanks in advance. Solved! Go to Solution. Attachments: 1287-LV 3.1.zip ‏259 KB

  • Oracle iExpense report

    Folks, Please help with a query to find iExpense reports that are Auto Approved. Mean I need to display only the expense reports that are Auto approved. Thanks, gvk.

  • Working around a cs3[4?] Symbol Set Staining bug

    The problem will show if you stain some but not all of the symbols in a set, then apply at least one further Symbolism tool, then later want to change the original symbol. You'll find that the stained symbols won't update to the changes in the origin

  • Content region color needs to be dynamic

    I have a page that is composed of five regions: a top banner, a footer, a left navigation bar, and a portlet. The left navigation bar is next to the report and has 5% length (the report's region has 95%). The region has its own style which has a back