cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
770
Views
20
Helpful
5
Replies

UCCX Script question on Get Digit String step

lleweyiss
Level 4
Level 4

Simple script :  Prompt caller to enter a PIN using the Get Digit Step.

In the Success branch I created an  IF step >  If (Pin_Entered == "1234") ;   then the TRUE branch is a  '= SET'  step to identify the  Extension I want to transfer the call to  (Attribute set up as String "")  ; then send to a Step that transfer the call to the Extension.

 

Thus far I have 8 unique PIN numbers (and each has the corresponding Steps to route the caller).  This may grow at some point.

I did add an If (PIN_Entered == null)  for anyone who entered nothing, steps to give them one more chance then  terminate the call if nothing is entered. (getting rid of the spam callers right off the bat).

 

Where I am struggling is when someone enters a PIN that is not listed in any of the subsequent "IF" steps.  The only thing I found to work is to make a  long IF step listing each PIN with the 'not'  :  If (PIN_Entered != "1234"  || PIN_Entered != "4567" ||  .... 

on and on listing each PIN.

Tried a few things unsuccessfully.  Trying to not have to keep listing each PIN  for that one step with the !=

 

Any ideas ?

 

 

1 Accepted Solution

Accepted Solutions

I would recommend you to replace your IF steps with a Switch step as that has a default outcome that should work for what you ask for. This way you’ll have one step instead of many IF steps.



Response Signature


View solution in original post

5 Replies 5

I would recommend you to replace your IF steps with a Switch step as that has a default outcome that should work for what you ask for. This way you’ll have one step instead of many IF steps.



Response Signature


Thanks Roger !  I ended up using your suggestion of the Switch step instead of the XML document. Worked better for my situation. 

Glad to hear that.



Response Signature


You could also put the valid pins into an XML document that you upload to the server and use an Xquery against the XML document. Then no coding changes would be required if you add additional valid PIN values.

This is the way, you only change one thing and you can have the PIN and destination in the same XML file which means you only update the XML and you're good to go.

 

david

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: