cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
366
Views
4
Helpful
6
Replies

Play the Multiple Prompts

Hi Team,

I want to play the multiple prompts based on the message code. So I used the if statement . 

If  value == "2"  is  True  we need to play the prompt ID is wrong,  value == "3" is True play the prompt otp is invalid. If it is a False go the next step.

jijeshktbramblescom_0-1727356583563.png

How do I do that . Can you help.

 

Jijesh

 

 

 

6 Replies 6

OTPInvalid needs to be a prompt variable.

david

@david.macias  sorry for the delayed response.

 I created a prompt for each message and  I am  trying single if statement can able to achieve  play the multiple prompt based on the message code. but I failed. After that I created multiple If statement and played the  different prompts based on the message code.

jijeshktbramblescom_0-1727677259933.png

 

 

I am not sure I follow what you're trying to do. If you're chaining multiple if statements you could use a a case step to make it easier. Additionally, why don't you just rename your prompts to be 02.wav, 07.wav, that way you play whatever is returned from the OTPSEND document.

david

I agree with @david.macias that you’re somewhat unclear in what it is that you want to achieve and that you likely could do it much simpler by just playing the sound file with a play prompt step that plays the file named based on whatever is returned from the lookup in the OTPSEND document. That way you should not need to use any if checks for this at all as the play prompt step would directly use the value provided by the lookup in the JSON document, resulting in different sound files being played based upon this lookup.



Response Signature


JohnBushong8071
Level 1
Level 1

If you are trying to play a different prompt based on the value of a single variable, try using the "Switch" step.

 

@JohnBushong8071 

Yes, this is what I am expecting. I have moved the script in production now.