Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

UCCX how to write (append) data to txt or xml file

Hi,

I would like to know how can i write data to one xml or txt file but not replacing the old data.Every time i write to file it should write in new line of same file not deleting previous lines.

Any suggestions?

Thanks

Best Regards

MC

7 REPLIES
Super Bronze

Re: UCCX how to write (append) data to txt or xml file

Hi

One way is to do this (docVar being a document variable), the '\r' + '\n' + bit inserts a new line:

docVar = Create File Document ("test.txt")

docVar = docVar + '\r' + '\n' + "new line of text"

write document (docVar to "test.txt")

In general I do something like that if I'm maintaining a text log of something (e.g. a change log or something) which doesn't need to be replicated in the repository etc. You could probably do something similar with a repository document if you wanted but I'd be wary of the size it may reach or the amount of IO.

It's not normally useful for an XML document - the hierarchical nature of XML means that the last line is typically a closing tag to match the first line, so adding lines would invalidate it - you should generate the XML all at once, or carefully insert stuff in an appropriate place.

Regards

Aaron

Please rate helpful posts...

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

Re: UCCX how to write (append) data to txt or xml file

Hi Aaron,

Thanks for your quick answer.

I want to write to a file abandoned calls (using contact inactive exception).

But couldn't i have concurrency issues writing to file if for example two users abandoned at same time? If yes , how can it be solved?

Best Regards

MC

Super Bronze

Re: UCCX how to write (append) data to txt or xml file

Hi

Why would you want to do that? UCCX automatically logs each call that comes into the system in the DB. An 'abandoned' call is generally one that is routed to a CSQ, but the customer hangs up. UCCX will automatically record this as an abandon, and you can report on this using the Historical Reports client.

No point reinventing the wheel, and yes, you would almost definately hit some concurrency issues which would result in your scripts terminating as they can't write to the txt file. You would also make it much more difficult to report on a potentially large bunch of flat text...

Aaron

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

Re: UCCX how to write (append) data to txt or xml file

Hi Aaron,

I have an issue that user complaint that while they are in queue (about 20 minutes or so), the call just dropped. Would that consider an "abandonded" call? I could use the method to write information of the call to the text file for every time the call land to the queue. Do you have other means to trapp the "dropped" call like that?

Thanks,

Tom.

Super Bronze

Re: UCCX how to write (append) data to txt or xml file

Hi

If you have the CLI and approx time of the call, you can look in the MIVR logs (c:\program files\wfavvid\log\mivr) for that CLI number, and any major 'EXCEPTION' blocks that indicate a problem.

You can also check the CDR on CCM to see whether the far end or the UCCX system terminated the call (i.e. was the disconnect received from the PSTN first?).

Aaron

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

Re: UCCX how to write (append) data to txt or xml file

Thanks Aaron,

The problem I have is do not know exactly when and which number is dropped from the queue. We found out only when user come to our office and complained. When I monitoring the queue and found nothing in the log indicate the dropped call. So if I can append to the text file the call when it in the queue, and append another line when the call get to agent. Doing that way, I hope to see 2 entry for each call. If only one from the queue, but not from agent accept call, then that may be a potential.

How do I ccheck CDR to see where it dropped the call? what specific word that I can filtering from the log?

Thanks.

New Member

Hi Aaron,docVar = Create File

Hi Aaron,

docVar = Create File Document ("test.txt")

docVar = docVar + '\r' + '\n' + "new line of text"

write document (docVar to "test.txt")

 

I can program the 1st and 3rd lines, how do I write the 2nd line?? Keeping getting an error whent using "SET"

 

TIA

Victor

 

 

 

2270
Views
4
Helpful
7
Replies
CreatePlease to create content