cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
1393
Views
5
Helpful
3
Replies

UCCX 11.6 upload document step unsuccessful

I have a subflow script that is being used to set an alert prompt to play or not depending on whether the alert setting is turned ON or OFF. This variable is updated by calling into a separate trigger on the application and ultimately routed to this attached subflow script. The script seems to be failing on the Keyword Transform Document step as the value that fills in is "BIN[3C3F786D...]". I thought it should put in the same value as is listed in the XMLCurrentState document variable.

The authenticate user step is successful so I know it is not a username/password problem. Seems like I am off on my context somewhere either above these steps when filling out the "mode" string, or in the XML steps filling out the %state% values. In any case, the upload document step always ends up going to the unsuccessful branch which is where it fails.

Any help is greatly appreciated.

 

Thanks,

James

Script-Debug.JPGupload-document.JPGkeyword-transform-document.JPGcreate-XML-document.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Sean Lynch
Rising star

1.  I disagree with the previous response that the Authenticated User role needs to be Admin.  This is not true.  I searched through the Admin and Scripting guides and could not find where this is stated.  So I tested it.  Turns out, the Agent role is able to upload successfully, once authenticate.  ...and you really don't want to write a script with the Admin user and PIN (or Password) exposed in plain text--this is a bad practice from a security perspective [IMHO]).  Now, there is a way to "hide" this, but that is outside the scope of this reply.

2.  You were really close to getting this working!!  You have an order of operations issue to resolve...  Here's my sample script I wrote that does very close to the same thing for this section of the script:

Sample script:

Transform, Create, UploadTransform, Create, Upload

Transform Doc StepTransform Doc StepCreate XML Doc StepCreate XML Doc StepUpload Doc StepUpload Doc Step

Variables used:

VariablesVariables

Sample Transform Template:

Sample Template - XMLSample Template - XML

Final XML Document Uploaded:

Final Uploaded XML DocFinal Uploaded XML Doc

Again, my Authorized User is an Agent:

2021-0401-testAgentRole.png

 

Hope this helps.

-Sean

View solution in original post

3 REPLIES 3
nganvt
Beginner

you check username is role admin CCX 

When action upload in system UCCX need role's user admin system UCCX

Sean Lynch
Rising star

1.  I disagree with the previous response that the Authenticated User role needs to be Admin.  This is not true.  I searched through the Admin and Scripting guides and could not find where this is stated.  So I tested it.  Turns out, the Agent role is able to upload successfully, once authenticate.  ...and you really don't want to write a script with the Admin user and PIN (or Password) exposed in plain text--this is a bad practice from a security perspective [IMHO]).  Now, there is a way to "hide" this, but that is outside the scope of this reply.

2.  You were really close to getting this working!!  You have an order of operations issue to resolve...  Here's my sample script I wrote that does very close to the same thing for this section of the script:

Sample script:

Transform, Create, UploadTransform, Create, Upload

Transform Doc StepTransform Doc StepCreate XML Doc StepCreate XML Doc StepUpload Doc StepUpload Doc Step

Variables used:

VariablesVariables

Sample Transform Template:

Sample Template - XMLSample Template - XML

Final XML Document Uploaded:

Final Uploaded XML DocFinal Uploaded XML Doc

Again, my Authorized User is an Agent:

2021-0401-testAgentRole.png

 

Hope this helps.

-Sean

View solution in original post

Yes, that is very helpful @Sean Lynch . I was able to get mine working with reconfiguring the steps as you outlined above. Also, just for FYI, the script I was using was built on version 10.X and I was trying to get it to work on 11.6. By all reason it should have worked, but I had to rebuild it from scratch all the way which was actually helpful so that I could clear out unused variables, etc.

I agree on the authentication steps you mentioned above as well, and was hoping to actually use this script as a subflow or as part of a switch step. In my script I have an authentication subscript that authenticates a supervisor agent with their telephone number and PIN and then my hope was to transfer any variables over to this subflow script so that I could just use the agent/supervisor credentials instead of using my admin credentials. I'll mess around with the input and output mappings on these scripts to see if I can carry any of those variables over so that I don't reveal my admin username and password.

 

Create
Recognize Your Peers
Content for Community-Ad