cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
433
Views
10
Helpful
2
Replies
sjhrhaskell
Beginner

UCCX How to set variable to match selected digit in DNIS (or other Get Call Contact Info result)?

Hey gang,

 

I'm looking for a way to set the value of a variable to match a specific digit of "Original Called Number" as returned by the Get Call Contact Info step.  It's pretty easy to set the variable to match the whole thing of course, but what if I want it to match, say, just the 4th digit? 

 

For example, caller dials 202-123-9999.  I want to set the variable named "FourthDigit" to match the 4th number of the called number, in this case, "1".  

 

Any ideas?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Chris Deren
Hall of Fame Master

You can use the <variable>.substring(6,9) option to get the last 4 digits from 10 digit number.

View solution in original post

2 REPLIES 2
Chris Deren
Hall of Fame Master

You can use the <variable>.substring(6,9) option to get the last 4 digits from 10 digit number.

View solution in original post

That put me on the right track, thanks Chris!  To clarify a bit more, since I wanted to get the value of a specific digit, I used adjacent index numbers, like so:

 

Set DNIS3rdDigit = DNIS.substring(2,3)

 

 

Create
Recognize Your Peers
Content for Community-Ad