cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3775
Views
10
Helpful
7
Replies

UCCX v8.5 - Create XML Document

greglowe1329
Level 1
Level 1

Hey All,

I'm looking for help with the Create XML Document UCCX function. I need to reference a string variable as the Source Document as this step needs to to call different XML files dependent on what CTI RP the calls enters the Queue on.

I have looked at a couple of support discussions but the syntax used in these reply's doesn't appear to work.

Attached is a screen shot of the Create XML Document step as i have it configured so far.

CreateXMLDoc.PNG

Variables:

Name                                        Type             Value

pathDocumentApplication        String            "\HPC"

QueueSettings                         Document     DOC[]

Any suggestions would be greatly appreciative!

Greg

7 Replies 7

Aaron Harrison
VIP Alumni
VIP Alumni

Hi

My approach to this has been as follows:

String, parameter, sDocumentFilename

So sDocumentFilename is a simple String, and made a parameter enterable in the web UI. You would set this to "myfile.xml" or whatever is appropriate.

THen in the script:

set docWhatever = DOC[sDocumentFilename]

This correctly sets docWhatever to DOC[myfile.xml]

Presumably it's some hidden magic of the Document object/set step that makes it work like this rather than using the variable name of the string in the variable definition for the Document. If I understand what you are asking correctly :-)

Regards

Aaron

Please rate helpful posts..

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

Its sort of on the right track but what if you had your scenario described above but the sDocumentFilename myfile.xml needs to be a variable. For example if you had 10x myfileX.xml (X being a number from 0-9) files and you need them to be called as a DOC[]

From my experience I can't seem to get the following syntax to work: DOC["/en_AU/Folder1/myfile"+ documentNumber + ".xml]]

Hi Greg

So in your case you make up your string filename and assign it to a String var.

Then do a:

set yourDocumentVariable = DOC[StringVar]

Then use createXMLDocument on the yourdocumentvariable - rather than pointing the createXMLDocument step at a concatenation directly.

Trick is that you need to have that SET step... same applies even if you have a simple String (e.g. from an App Parameter) - you need the SET rather than just using DOC[strinvar] directly.

Aaron

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

Thanks Aaron, I will give that a go tomorrow and report back

I can't seem to get the script to call the StringVar.

I get the following error: As you can see the variable xmlNumberPilot does not appear to be able to populate the DOC[] variable

Have you got a working script for reference?

Try adding:

Set QueueSettings = DOC[xmlNumberPilot]

after your highlighted Set step.

Tanner Ezell www.ctilogic.com

I blew a few hours trying to get my variable document name to work before finding this thread. All good now. A very belated thanks to all of you.

Brian