on 10-24-2014 11:42 AM
Hi,
I am trying to build a simple IVR that allows callers to input a 3 digit code that routes to an appropriate extension number. The IVR lists all the 3 digit codes and corresponding numbers to dial if a match is found. Each code appearing in an IF statement.
The IVR works well as long as the user inputs a valid 3 digits that I have listed. eg in the above screenshot I validate 222 & 100.
My issue is I want to put an IF element in after all the valid 3 digit codes that captures any code not found before it (eg not 100 or 222)
How do I format the CONDITION so that it looks at any collected digits between 1 & 999 so that I can route this call to another audio file elsewhere in the IVR.
ie I have tried '1>999' but this wont work.
Many Thanks
Kevin F
Hi
Thomas is correct, you should try IF .. ELSEIF .. ELSE.
If there is a longer list of numbers to check, making the IF statement very long, an alternative approach could be for example:
- specify the inputs and corresponding trasnfer destinations as a dictionary var transferDict = {"222": "9000", "100": "18001234"}
- set the TransferNumber with dictionary.get() assign TransferNumber =
transferDict.get(str(AccMgr_collectDigit_FR), "default")
..and then validate the values as necessary before doing the transfer.
In the example,if DTMF input is 222, TransferNumber should get value "9000", with "100" value "18001234", and with any other input value "default". With the dictionary, maintaining a long list of input/target pairs would be fairly simple in the SC UI, and you wouldn't need to add new "IFs" when there are new numbers to check.
Sorry I wasn't able to try this out yet, so no screenshots or vxml sample. But theoretically it should work
BR,
-Lasse-
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kevin,
You can click on the If-Statement and create an ElseIf- and Else-Statement.
So your construct should look like this:
IF ... == '222'
actions
ELSEIF ... == '100'
actions
ELSE
actions
So the Else-Statement is all what didn't occur before (ie. 222 and 100).
BR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.