cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5855
Views
0
Helpful
9
Replies

How to update XML file through UCCX script ?

IdontNeedNick
Level 1
Level 1

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

9 Replies 9

Aaron Harrison
VIP Alumni
VIP Alumni

Hi

I'm not clear where you are stuck - so I'll guess at that it's with putting the XML together?

You need to create a template XML file. Take out the bits that are dynamic (time/date number etc in your element) and replace with tokens like %%calldatetime%% and %%clinumber%% like so:</p><p></p><p><title>%%calldatetime%% - %%clinumber%%

Then use a 'keyword transform' XML step to swap those placeholders for info from variables - create a new Time var or use Time[now] I think to get the current time, Get Contact Info to get CLI.

To squirt the resulting doc at your web server you'll need a Create URL Document step.

Regards

Aaron

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

Hi Aaron,

Thank you for you quick reply.

I don't know so much about XML but I will try to find the solution for this.

I apologize in advance for the dummy questions

Let start from the beginning...

Do I need two xml files, one for call log (calllog.xml) and another as xml template (xmltemp.xml) or I need only one xml file ?

If I need just one file I guess that this file will be stored on the web server , however if I need two xml files I am not sure where xml template file need to be placed?

Does xml template file need to be written in UCCX script or that file is also stored on the web server?

While waiting for a response i will try solution with just one xml file to see what will happen.

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:

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

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

Aaron,

After uploading xmltemplate.xml file into UCCX repository I tried to configure keyword transform doc (KTD) in uccx script.

For Keyword template I put XMLtemplate ( XMLtemplate is Doc variable that I created and associated with xmltemplate.xml file) but I didn't know what to put in Document field of KTD ?

I tired with another xml file, however I was not sure that was the valid solution.

Hi

Just set the Document param to a Document var - it doesn't need to refer to anything initially (can be left at the default value of null). Eitehr way the Document var will get set to a new Document object created by the KTD step.

You then use that Document var in the next step where you do whatever you need to do with the transformed doc.

Regards

Aaron

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

Using KTD and Upload document steps I was able to create XML doc and uploaded it into UCCX repository.

Now I have another two issues:

1) I don't know how to append new info into xml file without deleting the previous caller id data ?

2) How to upload created xml file to external FTP or http server through LAN ? - I tried with Upload Doc step, but I wasn't successful.

Regards,

O

You can't do a "log" file type write with the Template format. You will need to go to a custom web service and write that info off board. You could use the Create URL Step and use the GET or POST.

PHP or ASP could be used in the off board system to handle the web service and that could then write multiple lines to a file.

Or you could use custom Java in script to write multiple lines to a file in the Document Repository. However, since the file is to be read by something/someone other than the CCX server, you should go with the first option and store it off board.

Hello IdontNeedNick.

can you upload the script and the xml file. Im trying to do the same, edit and upload the XML file .

or please send me the script to omcordero@indra.es

thanks in advance.

MBO46
Level 1
Level 1

Hi All,

I try to use the step KTD to modify a XML file but the returned variable is a "BIN[5616516....65156]"

If i want to modify in the UCCX in version 8.5.1 an XML file with this step KTD,

That is the procedure ?

Best regards,

Matthieu