cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1508
Views
0
Helpful
3
Replies

UXXC Match list of numbers

wbarren
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

phamvinhdat
Level 3
Level 3

How's about Switch statement, you can add each number there for certain greeting and default the rest.

 

DP

View solution in original post

3 Replies 3

phamvinhdat
Level 3
Level 3

How's about Switch statement, you can add each number there for certain greeting and default the rest.

 

DP

That will work.  Simplifies my script

Anthony Holloway
Cisco Employee
Cisco Employee

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 */