cancel
Showing results for 
Search instead for 
Did you mean: 

Question - BCM 7.0 SP6

0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member187604
Contributor
0 Kudos

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-

former_member250653
Participant
0 Kudos

Nice solution.

Saved directly to my brain

Thx, BR

0 Kudos

Thanks guys,

I do need to add a lot of user numbers to check , so the dictionary is a great way to simplify the admin of this IVR.

I applied the logic on my INTEG system and it works a treat.

Answers (1)

Answers (1)

former_member250653
Participant
0 Kudos

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