07-01-2022 03:09 PM
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 ?
Solved! Go to Solution.
07-02-2022 01:09 AM
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.
07-02-2022 01:09 AM
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.
07-14-2022 09:28 AM
Thanks Roger ! I ended up using your suggestion of the Switch step instead of the XML document. Worked better for my situation.
07-14-2022 12:46 PM
Glad to hear that.
07-02-2022 11:22 AM - edited 07-02-2022 11:22 AM
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.
07-03-2022 04:58 PM
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
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