That validation we normally do within the Data Action we call to populate the collection.
Servicios en Tecnología de la Informacion SETEINFO del Ecuador C.A.
Original Message:
Sent: 11-21-2019 13:47
From: Jeremy Lee
Subject: Dynamic Audio prompts based on data actions data
Mario thanks for your help today, I am making progress. One (more) thing I am struggling with is ensuring I am checking that a parameter has a value before I add it to collection.
How do I do an update data process that first checks if the variable has a value, if it does, then add a string to the value position:
AddItemAt(AddItemAt(AddItemAt(MakeEmptyList(ToString(NOT_SET)),
ToInt(Flow.ProductA )-1, "ProdA"),
ToInt(Flow.ProductB )-1, "ProdB"),
ToInt(Flow.ProductC )-1, "ProdC")
I need to check each Flow.Productx has a value first.
I must not be good at reading the documentation around all of this I thought it would be simpler to do something like
If(ISSet(Flow.ProductA),AddItemAt(Flow.Items, ToInt(Flow.ProductA)-1, "ProdA"), <do nothing>)
------------------------------
Jeremy
------------------------------
Original Message:
Sent: 11-20-2019 16:47
From: Mario Sanchez
Subject: Dynamic Audio prompts based on data actions data
Jeremy,
Please send me a direct email in order to schedule a zoom to help you solve the problem. My email is mario.sanchez@seteinfo.com
Regards,
Mario
------------------------------
Mario Sanchez
Servicios en Tecnología de la Informacion SETEINFO del Ecuador C.A.
Original Message:
Sent: 11-20-2019 16:04
From: Jeremy Lee
Subject: Dynamic Audio prompts based on data actions data
I am stuck. I have figured out how to loop through my collection and find a userPrompt each time that finds something like this:
FindUserPrompt("Press" + toString(Task.treeLoop + 1))
What I don't understand is how to build a dynamic menu based on the loop.
Essentially I want to have a welcome greeting then
Loop:
Add first item in my collection followed by press 1 (based on the number of the loop, then silence for 500ms) (allow for press 1 to take you to exit out)
Add second item in my collection followed by press 2 (based on the number of the loop, then silence for 500ms)
Add third item in my collection followed by press 3 (based on the number of the loop, then silence for 500ms)
All of the above, I would look up the user prompts by name, example
FindUserPrompt(Flow.PhoneTreeItemsString), FindUserPrompt("Press" + toString(Task.treeLoop + 1)), 500ms blank audio
Repeat until the loop is done, which loops for every item in Flow.PhoneTreeItemsString
When done the built up prompt would play:
Welcome to my company, for product b press 1, for product a press 2, for product c press 3
I feel like I am close, I am just struggling to figure out how to build out the menu tree.
I was messing with something like this but couldn't figure it out. I am going to keep trying:
AudioPlaybackOptions(Append(FindUserPrompt("Press" + toString(Task.treeLoop + 1)), ToAudioBlank(500)), true)
------------------------------
Jeremy
Original Message:
Sent: 11-15-2019 21:13
From: Mario Sanchez
Subject: Dynamic Audio prompts based on data actions data
Jeremy,
Almost there. What we usually do is inside the loop include a Collect Input where the input audio define the audio sequence using the collection array index.
REgards,
Mario
------------------------------
Mario Sanchez
Servicios en Tecnología de la Informacion SETEINFO del Ecuador C.A.
Original Message:
Sent: 11-15-2019 17:00
From: Jeremy Lee
Subject: Dynamic Audio prompts based on data actions data
I am making progress, slowly but surely, I want to put this out there in case what I am doing is going down the wrong path.
Example data integration return value:
"Imp__r.ProductA__c": 2,
"Imp__r.ProductB__c": 1,
"Impl__r.ProductC__c": 3,
I assign each one of those to a flow variable:
Flow.ProductA - Flow.ProductC
I have an Update Data function that adds each item to a string collection set list (seems dirty):
Variable Name - Flow.PhoneTreeItemsString
Expression:
AddItemAt(AddItemAt(AddItemAt(MakeEmptyList(ToString(NOT_SET)),
ToInt(Flow.ProductA )-1, "ProdA"),
ToInt(Flow.ProductB )-1, "ProdB"),
ToInt(Flow.ProductC )-1, "ProdC")
I need to add null/0 checks to the items above to ensure they have a value before trying to add them.
Right now I am ToAudioTTS ToString(Flow.PhoneTreeItemsString) to test if when I reorder the variables, they reorder in the collection set and it is working.
The next bit I need to figure out is how to parse through that Flow.PhoneTreeItemsString collection and build out the dynamic audio prompts. It sill go something like this (for the values above):
Prompt(welcome audio, PhoneTreeItemsString[0], (press 1), PhoneTreeItemsString[1], (press 2), PhoneTreeItemsString[2], (press 3))
Welcome, For ProductB press 1, For ProductA press2, For ProductC press 3.
I will go fetch the recorded clips of "Welcome", "For ProductB" and "press n" based on name values if I am reading the documentation right.
------------------------------
Jeremy
Original Message:
Sent: 11-15-2019 14:06
From: Mario Sanchez
Subject: Dynamic Audio prompts based on data actions data
Jeremy,
Lete my ask that to my dev team and will share with you as soon as they can.
Regards,
Mario
------------------------------
Mario Sanchez
Servicios en Tecnología de la Informacion SETEINFO del Ecuador C.A.
Original Message:
Sent: 11-15-2019 12:18
From: Jeremy Lee
Subject: Dynamic Audio prompts based on data actions data
Do you happen to have a loop function and task that builds the ivr prompts example? Screenshots and or formulas would be nice. I think once I see one I can sort it out. I feel like passing multiple fields/variables with values to loop through is a mistake but maybe not.
------------------------------
Jeremy
Original Message:
Sent: 11-15-2019 08:59
From: Mario Sanchez
Subject: Dynamic Audio prompts based on data actions data
Jeremy,
This is possible if you deign your flow as a task instead of basic menu. Within the task what you need to do is to create a collection with your result set then you should process ever collection object to assemble an audio sequence step using expressions to play the menu dinamically. So in this case you have to use a loop starting at 0 to the index of the result set -1 to play the menu.
We have designed and deployed a bunch of IVR's with this scenario.
Regards,
Mario
------------------------------
Mario Sanchez
Servicios en Tecnología de la Informacion SETEINFO del Ecuador C.A.