Dynamically route to prompt

I would like to be able to play a prompt depending on the result of an external API call. I can get the prompt Id, name but then how can I use the result in the prompt in Architect? I tried a ToAudio(myvaraiable= prompt Id) but it didn't work.
I understand we can probably work around it with some If(variable == "FixedValue", ToAudio(Propmt.XXXX),ToAudio(Propmt.default)), but in the case of lots of prompt (> 400) it becomes really hard to mainain/support.
Any other way possible? Any plan to implement collections of Prompt (similar to Skill and Queue collections) to at least help a bit this part? Any roadmap to allow a Prompt based on UID of the prompt in a variable?

We do plan to add the ability to dynamically reference a prompt. In the meantime your workaround would work. You can also use the parallel arrays approach shown https://help.mypurecloud.com/articles/convert-string-value-typed-value/

For the parallel array approach, I don't find any prompt collection available. Am I missing something? I only found ACD Skills, Wrapup codes, Phone Numbers and Queues.

You're right, I'm sorry the parallel array approach doesn't work with prompts. Nested ifs or using the switch action (it can have up to 64 cases) is the only workaround.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.