cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
316
Views
0
Helpful
1
Replies

Dynamically modify variable based on date

aegislabs
Level 1
Level 1

I've been working on improving a script that is currently in production. In the script, if a caller calls in after the contact center is closed, they are presented with the option to be transferred to the on-call representative. The on-call reps are only on-call for one week and are on a rotation. Right now it is simply a prompt to press a certain number which does a call redirect to a string value that has the rep's cell number in it. I currently have multiple scripts where the only difference in the script is that the string value for the on-call rep is their cell number. Script A has rep A's cell in the variable, Script B has rep B's in the variable and so on. I just manually change these scripts in the application on the day the new rep is on their call rotation. What I am trying to do is have one script where this happens automatically. I've been experimenting with using XML docs similar to the isHoliday to dynamically change the on-call variable based on the date but I just can't seem to figure it out. Has anyone else ever attempted something like this? I'm running UCCX 8.5

1 Reply 1

djlundberg
Level 5
Level 5

Hello-

 

Yes, I have done something like that. I ended up using math to figure out the relative week number (as in not the function that will give you the week of the current year) so that the rotation doesn't skip back to the beginning every year.  

From there I just have a switch string that sets the extension for the call redirect step based on week number.  That's not to say you couldn't do something similar using an XML document.

 

To make like a bit easier when you're working on the solution you could set the variable in the Call Redirect step as a parameter and only change that piece rather than changing the script that you're using.

 

I Hope that helps.

 

DJ