cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3411
Views
7
Helpful
27
Replies

Write a file with a script on UCCX 7

Anonymous
Not applicable

I want to collect the data (4 digits) entered by the user in a file and tried to create file and write document but did not record anything ... Anyone know in what way you can record a. Txt with these data.

Thanks

1 Accepted Solution

Accepted Solutions

Hi,

it's a bit confusing. Do you want to create a file on the disk, or do you want to upload the file onto the UCCX Document Repository?

If you want to create a file on the disk:

If you want to upload a document to the document repo, then:

G.

View solution in original post

27 Replies 27

Gergely Szabo
VIP Alumni
VIP Alumni

Hi,

use the Get Digit String step to collect digits and store the result in a String variable, then use the Write Document step, while casting the String variable into a Document one. Like this: (Document) collectedDigits.

Can you give me a screenshot of your script?

G.

Anonymous
Not applicable

Hi,

Why not work this way? or how can  I put (document) variable  ?? with editor ??

Thanks..

Hi,

it's a bit confusing. Do you want to create a file on the disk, or do you want to upload the file onto the UCCX Document Repository?

If you want to create a file on the disk:

If you want to upload a document to the document repo, then:

G.

Anonymous
Not applicable

Hi,

I would like to save in a file .txt , this information:

The calling number , the day of the call, the time of the call and a code that we would ask the caller with a prompt.

Maybe the better way is upload a document , but with upload document we add data to the file or create a new file every time?

I think with get call contact info and get contact info is the appropriate to save info in a different variables and after  write with upload document ??.

And this data will be written in the same file?

Thanks You Very Much ..

Hi,

it depends on what you want. New information may be appended to the file or a new file may  be created for each interaction. May I ask you what is the ultimate goal of this information?

I would recommend to save all that into a database table.

By the way, the calling number may be acquired by using the Get Call Contact Info step. The date and the time of the call is usually just a matter of calling the Set step with D[now] and T[now], assigning them to String variables.

G.

Anonymous
Not applicable

Hi,

but to save this information in a database  I need another license because I have Cisco Unified CCX Enhanced, and neither can create xml files with this license, right? Or what can I do with this license?

He had thought he could be a way to control certain people ...

And in the another mail , in upload document , how do you declare this variables ?

user         string        and value "uccxadmin"

password string         and value "cisco"

digits        document  and value ""

A lot of Thanks !

I see. Well, without the Premium license, you can't do database, indeed.

I don't understand your question "how do you declare the variables" - in the CCX Editor, bottom left corner, is this what you mean?

G.

Anonymous
Not applicable

Hi,

For the variables , is the same, because I think that the only difference with upload the document on repository or write on a directory on disk is that in a repo is accesible for all call manager but no more, ok ?

The question for the variables no is where , also is for the declaration of them ....because the first example (write on disk) is goog for me but the another don't operate correctly ..

About the repository: UCCX 7 is the last Windows-based version. Starting UCCX 8.0, it's an appliance (just like CUCM) so you cannot have direct access to the disk of the server (which is, I think, good). So if you write your script with the Write Document step, it will not function if you upgrade to UCCX 8.x. If you use the Upload Document step, however, your script will work after the upgrade, too.

The Document Repository is not available from CallManager (CallManager does not even have any knowledge about the Document Repo) but from the administration web page of UCCX.

About the second section on declaration: sorry, can you please rephrase your question, I am trying hard but I don't understand. I wish I could speak some Spanish but apart from "cerveza por favor" I can't.

G.

Anonymous
Not applicable

Ja, Ja, Ja.... Your spanish is better than my english   ... Ok , I don't know about the date and time , look:

How I write the date and time in a document ...

Thanks..

I guess this is what you want:

Anonymous
Not applicable

Ok, but I can not add data to the file because I always make a new one ...Maybe with upload document ? Or with create file is possible ?

      

Well what you can do is to load the existing file first, and append the new information and write again.

But what is the ultimate goal? I mean, this load-append-write business cannot go forever, I can't imagine UCCX handle gigabytes worth of information.

There's another way, custom Java code, but it's for an advanced UCCX programmer.

Or you can create multiple files, separated by a timestamp or any other unique ID. So it will be one file per interaction.

May I ask you again, what is the ultimate goal of the information?

G.

Anonymous
Not applicable

Hi,

for load the existing file I think is necesssary to do a new variable

(Name:lastdocument type:document valor:newfile.txt )

and after I need to load it  with set lastdocument = newfile.txt ,  ok ? 

For append the new information is the same with the last script ?

set finalString=dateString+","+timeString+","+DN+","coditreb ?

and for the last I need to write

wite document ((Document) finalString to "c:\temp\newfile.txt" , but like this no append info and generate a new file each time.....

The ultimate goal is for control the working hours of some workers from external centers , and they only have phone ...is not the proper way but seems something very basic that can work ...

But I think I will create 12 files, one for each center and through a menu and depending on the number that call written to a file or another. But , now I don't know how append the information in a file ?

Thanks..