cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2817
Views
0
Helpful
13
Replies

UCCX Script - Emergency Script of Supervisor

AOMD
Level 1
Level 1

Hello guys 

 

I have created a script that allows a supervisor of a contact center to open and close the queue during emergency. I will explain the scenario as follows:

 

The supervisor calls into the script with a particular extension and if my result == 1 he will listen the announcement “the contact center is on and to close press 1”. If not he will be listening to announcement that the “contact center is off and to open it press 1”

 

I kept the value of my result to 1

 

There are three xml files for on and off (I created them using notepad)

 

EmergencyOFF 

 

<?xml version="1.0" encoding="UTF-8"?>

-<Emergency>

<Set>1</Set>

</Emergency>

 

EmergencyON

 

<?xml version="1.0" encoding="UTF-8"?>

-<Emergency>

<Set>0</Set>

</Emergency>

 

<?xml version="1.0" encoding="UTF-8"?>

<Emergencys>

<Emergency1>%value%<Emergency>

</Emergency1

 

The third file is an Emergency file which will store the value entered by the supervisor 

If on then contact center is off and value is 0

If off then contact center is on and value is 1

 

There are two documents files one is (my seconddocument which is for storing the value entered by the supervisor and the other one is my document that will be used to store the value that i will upload to the repository.

 

The problem I am facing that when the supervisor change the value it does not copy to my third xML file 

 

Please guys guide me what I am missing in my script 

 

Script is attached 

 

While debuging I can see that after pressing 1 to closing the queue by enable emergency on its taking correct document in my seconddocument variable but in mydocuemnt its showing something else.

 

 

 

Thanks 

 

 

 

13 Replies 13

AOMD
Level 1
Level 1

script1.pngscript2.pngaaaaa.png

Hello guys

Can any when help me to fix the bugs in my script

Hello,

I have not had a look at your script but your third XML file is not correct. It has additional element entries and is missing the closing > on the last entry.

Hi,

Your script looks to be missing quite a few required scripts so I have thrown something together which show how I would do this. Change the file extension of the attached file to .zip and you should find a script and two XML files.

 

Note it is not tested and is intended as a pointer rather than a finished script.

 

This script uses two XML files. The contains the system state which may be open or closed and would be read by your main script.

 

<?xml version="1.0" encoding="UTF-8"?>
<SystemState>open</SystemState>

 

The second is a template file which is updated by the script

 

<?xml version="1.0" encoding="UTF-8"?>
<SystemState>%setsystemstate%</SystemState>

 

For the updated template to be uploaded CCX admin credentials are required. I have hard coded these in the script which is not great practice but should be ok for testing this script (ideally you would want to read these from another XML file). Username is ccxadmin, password is Letmein123

 

Hopefully this script will allow you to see how to work with XML files - it will take a bit of tweaking to work correctly and will need prompts etc. plus maybe some confirmation messages.,

Dear James

 

Many thanks to you for your help

 

May you please attached the file as ZIP. I have converted the txt file to zip but I am not able to see script Attached.

 

 

regards

 

Hi,

This forum does not allow zip files to be downloaded.

I have uploaded the zip file to my Box account. You can download it using the link below.

 

 

https://app.box.com/s/5y378tkcy98b5a26h6107q3vcd9eubme

 

Regards

James

Dear James

 

many thanks 

 

I will uploade the script and let you know the status 

 

 

Regards

 

 

Dear James

 

I have uploaded the script and made a bit change the calling number as I am a beginner with uccx I would like to keep it like this. However, when I debug the script, the call stops at get XML document.

 

Attached is a screenshot during the debugging.

Thank you very much

 

The script is working successfully now. many thanks

 

10/10 to you may friend

Hi AOMD,

 

Are you able to provide a final working copy of your script to the forum?

 

TIA,

 

Amir

YES. I will share it tomorrow as I am away from my office. 

 

Sorry for the late reply. 

Thank you!
Amir

Replying to an old message. I was looking for a script to do the same thing and saw that you got it to work. Would you mind sharing your script? Thanks