06-27-2014 06:16 AM - edited 03-14-2019 01:34 PM
I am trying to route calls that come into a single script to different opening greetings. I have the get contact information step in which is working and can match that to a single number with an IF step which works and routes properly. I want to not be able to match against several numbers
Example:
callednumber=65007
IF callnumber==65007or76205or62100 then (Not sure how to do this step with multiple numbers)
Thanks
Solved! Go to Solution.
06-27-2014 07:22 AM
How's about Switch statement, you can add each number there for certain greeting and default the rest.
DP
06-27-2014 07:22 AM
How's about Switch statement, you can add each number there for certain greeting and default the rest.
DP
06-27-2014 07:47 AM
That will work. Simplifies my script
07-01-2014 10:11 AM
The Switch step does not work for multiple values requiring the same treatment, and as such you end up with something like this, which goes against DRY.
Switch (my_var) 1000 /* do something for the first three numbers */ 2000 /* do something for the first three numbers */ 3000 /* do something for the first three numbers */ 4000 /* do something for 4000 */ Default /* do something for all the rest */
In some computer programming languages you would use a Switch step exactly for that purpose, like this:
switch (my_var) { case 1000: case 2000: case 3000: // do something for the first three numbers break; case 4000: // do something for 4000 break; default: // do something for all the rest }
However, the Switch step in UCCX does not have that ability, and therefore you're looking at nested if statements. The equivalent to the above would be:
If (my_var == 1000 || my_var == 2000 || my_var == 3000) True /* do something for the first three numbers */ False If (my_var == 4000) True /* do something for 4000 */ False /* do something for all the rest */
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