I'm building an IVR flow leveraging Salesforce information, and I want to collect additional information from the caller based on what is retrieved. At the end, I want to verify what we collected before submitting the new data to Salesforce.
If the information is incorrect, we want to ask them again, which seems like the perfect opportunity for a reusable task. I can see the values that I set as Participant Data in the overall flow, but when I try to create the reusable task it doesn't appear that I have access to them anymore (and I want to make decisions within the task based on those values).
Here's the scenario:
Call.Ani is used to retrieve Salesforce Contact data
Contact.Id is used to retrieve add'l Salesforce data
The data is assigned to variables, converting text into dates used in TTS, for instance.
For Caller Type 1, we gather responses a, b, e, f, and g
For Caller Type 2, we gather responses a, c, d, and g; and for some of them, we also gather f
The response is verified with the caller; if it's incorrect, we ask again.
Once verified, we submit the information back to Salesforce
In the best scenario [A], the Caller input needed in steps 4 and 5 would be combined into a single task with all the necessary decisions built in. This task would be plugged into the Call Flow, and the data verified in step 6. If the verification fails, we plug the task in again.
Otherwise [B], if the Participant Data from steps 1, 2 or 3 are not available within a reusable task, then it would seem that three individual tasks would be needed: one for step 4, one for step 5 (part 1), and one for step 5 (part 2), and the decision points would all have to be in the containing flow.
I'll assume that [B] is the way that I need to go, creating tasks that do not in themselves rely on external data, but which can (hopefully) set Participant Data variables that can be used once the tasks have been completed.
In step 3 when you assigned the data to variables, did you make the variables accessible only with the current task (the variable name will be Task.X) or for the entire flow (the variable name will be Flow.X)? To make a variable accessible for the entire flow, open the edit variable dialog by clicking on the variable name and look for the Variable accessibility section.
One note: when making a variable accessible for the entire flow, pay particular attention to when & where you use it. It will be NOT_SET if you use it before executing the action that gives it a value. In general, unless there's only one path to get there, you'll want to use the IsNotSetOrEmpty function to make sure it has a value before using the variable.
I don't see an option to end a Task in a way that releases the call back into the loop, now that I've gone through the process of defining it. I could pass it out to a Menu (requiring interaction), or to a Flow, but I don't see a way to hand it back into the loop where the results can be evaluated, such as whether we're done with the loop, or need to go again.
Similarly, when I drop a loop node into my flow, there only seems to be space for a single entry in the loop, such that I can drop in a Collect Input, with Success / Failure branches, but if I want to 'fall through' and add another action irrespective of whether the input was successful or not, the next entry point is outside of the loop.
In my example, I want to gather input 'g' regardless of the caller type. If I want to maintain the sequence (a, b, c, d, etc. ) for each type, it looks as though I'll have to create two Collect Input nodes for 'g' - one as the last entry in my Type 1 branch, and one as the last entry in my Type 2 branch, and set my Loop evaluation variable in each branch as well.
Hoping there's an option I'm not seeing that will let me use a Task w/o breaking the Loop that contains it..?
What do you mean by ending a task by releasing it back into the loop? Do you mean an actual loop action, or do you mean another task or flow? You can upload images to help me understand what your flow looks like.
For the 2nd issue of adding multiple actions inside a loop: You can drop actions onto the lines connecting existing actions. If an item can be added to a line, it will become bolded.
Thank you for the clarification re: the lines - it appeared that only the 'Drag action here' option was available. Here ^ I have three questions / inputs that I want to ask for, and if they don't respond I'll just set the value = 0 or leave as 'IsNotSet...' and move on.
That said, a Reusable Task a) wouldn't do the job, and b) isn't necessary as long as I build out the steps inside the loop as you've indicated. Great!
If I set up my loop to have a count of 2, and set Current Index Data Name to 'InventoryCollected', and the caller confirms their entries at the end of the loop, do I use Set Participant Data to set the loop index (InventoryCollected) = 3 (or more) to kick out of the loop?