Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

UXXC Match list of numbers

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
Bronze

How's about Switch statement,

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

 

DP

3 REPLIES
Bronze

How's about Switch statement,

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

 

DP

New Member

That will work.  Simplifies

That will work.  Simplifies my script

The Switch step does not work

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

Please use the star ratings to help drive great content to the top of searches.
408
Views
0
Helpful
3
Replies
CreatePlease login to create content