Hi Support Team,
Can a create a field that plays condition-specific prompts? For example:
<field name="fld_service" type="digits?maxlength=2">
<prompt cond="variable1 == TRUE'">
<audio expr="audio_file1">
<value expr="audio_tts_prompt_1"/>
</audio>
</prompt>
<prompt cond="'variable1 == FALSE'">
<audio expr="audio_file2">
<value expr="audio_tts_prompt_2"/>
</audio>
</prompt>
...
Thanks,
Scott
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
Can a field have multiple prompts?
Re: Can a field have multiple prompts?
Hi Scott,
You are correct in how you can control which prompt can be heard through the cond attribute of the prompt tag. There's a couple small edits that you would need to make to ensure it would work properly.
Note that the VXML boolean values are all lowercase. If you wanted to check against a specific value within them (ie. the string TRUE) then you would set the var and prompt to be:
Regards,
Plum Support
You are correct in how you can control which prompt can be heard through the cond attribute of the prompt tag. There's a couple small edits that you would need to make to ensure it would work properly.
Code: Select all
<var name="variable1" expr="true"/>
<var name="variable2" expr="false"/>
<field name="fld_service" type="digits?maxlength=2">
<prompt cond="variable1">
This should be heard.
</prompt>
<prompt cond="variable2">
This should not be heard.
</prompt>
</field>
Code: Select all
<var name="variable1" expr="'TRUE'"/>
<prompt cond="variable1 == 'TRUE'">
Plum Support
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com
-
- Posts: 20
- Joined: Thu Oct 19, 2017 3:40 pm
Re: Can a field have multiple prompts?
Thanks for your help!