Cisco Support Community
Community Member

UCCX - Using the DOC variable

Hello all,

I am trying to use the DOC variable to do a GET XML. In my GET XML I specify a variable for the Document field.

In the DOC variable I want to use the value such that DOC[variable + "filename.xml"] where variable is a directory specified as "Files\".

When I debug the script it cannot complete the GET XML step because it can't find the file at location "Files\filename.xml".  What am I doing wrong?


VIP Super Bronze

Re: UCCX - Using the DOC variable

The document repository uses a forward slash for starters: DOC[Files/filename.xml]

Besides that, ensure that you are specifying this in the Source Document parameter.

Community Member

Re: UCCX - Using the DOC variable

I couldn't get this to work.

So I tried this instead:

Create File Document Filename=filedir + "\" + filename | Document = xmlMotd   (filedir and filename are string variables)

Create XML Document Source Document=xmlMotd | Document=xmlMotdDoc

Get XML Document Date Document=xmlMotdDoc | XML Path:"a valid xml file on the server" | Result Data=xmlMotdGet

When I run the debug the xmlMotd variable gets the right path to the file \de_DE\IT\motd.xml (the actual location of the file on the server is c:\program files\wfavvid\Documents\user\de_DE\IT\motd.xml.  However, the script fails and the debug tells me "the system cannot find the path specified".

Am I using the right approach to find and read an xml file on the server whose name and location are build up using script vaiables or must I always hard code the location of the file in the script?


VIP Super Bronze

Re: UCCX - Using the DOC variable

The first thing that stands out to me is that you should not be referencing the local file system or using the Create File Document step. Your XML file needs to be in the Document Repository which you upload through /appadmin. This is synchronized to the disk from the database automatically for you.

The Create XML Document step has three parameters. They should look something like this:

Source Document:  DOC[xmlDocumentsUrl + xmlFilename]

Where xmlDocumentsUrl would be the folder within the document repository and xmlFilename is the actual file.

When the engine processes this, it will look something like this DOC[example\filename.xml]. Remember that this is inside the default language unless you qualify it with a language qualifier: DOC[example\filename.xml] @ L[de_DE]

Source ID:


This should be a Document type variable.

The parameters for your Get XML Document Data steps should look something like this:


XML Path: "/example_root/next/etc"

Xpath is very flexible. You should look at the W3C or W3Schools references for additional information.


Where you want the result stored.

Re: UCCX - Using the DOC variable

upload your script we can see more cleary.  are you really calling file name as filename?  You are in the direction except few small checks like forward slash etc. Do you have all the steps required like create file document, create xml and then get xml.....

F1- Help and few scripts are helpful as well.

Community Member

Re: UCCX - Using the DOC variable

Thank you both for your help.

Here is my script which is nearly complete. The only problem I have now is controlling the location of the temporary file when making a voice recording.

CreatePlease to create content