04-08-2018 02:37 AM - edited 03-14-2019 06:05 PM
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"?>
<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
04-08-2018 02:53 AM
04-08-2018 11:02 AM
04-09-2018 01:03 AM
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.
04-09-2018 03:45 AM
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.,
04-09-2018 05:15 AM
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
04-09-2018 06:34 AM
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
04-10-2018 01:01 AM
Dear James
many thanks
I will uploade the script and let you know the status
Regards
04-11-2018 06:25 AM
04-19-2018 03:04 AM
Thank you very much
The script is working successfully now. many thanks
10/10 to you may friend
09-06-2018 07:47 AM
Hi AOMD,
Are you able to provide a final working copy of your script to the forum?
TIA,
Amir
09-10-2018 10:36 AM
YES. I will share it tomorrow as I am away from my office.
Sorry for the late reply.
09-10-2018 10:38 AM
01-28-2022 09:33 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide