09-20-2016 09:12 AM - edited 03-14-2019 04:33 PM
I have a script where calls are transferred to a subflow. The subflow script checks Holiday status and Time of Day - Day of Week. If the Office is Open, then callers are sent to a Call Redirect step that sends them to a phone DN. If the status is Closed, then the call gets returned to the main script.
What is the best way to terminate calls that exit the subflow script?
What happens when a caller hangs up when a call is in a subflow script, does the Main script know to terminate the contact?
Should I put a Terminate (-Triggering Contact-) step in the subflow script in the Call Redirect > Successful step, or rely on the Terminate step at the end of the Main script?
Take a look at the attached subflow script. These steps are repeated 30-40 times in all of my IVR scripts which is why I want to put them in a subflow. The "deptNumber" string variable is the input from the main IVR script.
Thanks, Randy
Solved! Go to Solution.
09-20-2016 01:13 PM
I have done something very similar. How I would handle that is return some variable from the sub-flow to the calling script indicating what the calling script should do. You may not be able to terminate the call in the sub-flow unless you pass the Contact variable to the sub-flow. TriggeringContact is set in the parent script, but may not be inherited by the sub-flow unless you explicitly pass it down.
09-20-2016 01:13 PM
I have done something very similar. How I would handle that is return some variable from the sub-flow to the calling script indicating what the calling script should do. You may not be able to terminate the call in the sub-flow unless you pass the Contact variable to the sub-flow. TriggeringContact is set in the parent script, but may not be inherited by the sub-flow unless you explicitly pass it down.
09-21-2016 09:45 AM
That makes sense. I didn't think about passing the Triggering Contact info to the subflow.
I added a boolean variable named "callHandled" to the subflow script that defaults to false. Under the Call Redirect > Successful step, I added a "Set callHandled = true" step.
In the Main script, I made sure the Call Subflow step has the callHandled in the Output mappings. I added a "If (callHandled==true)" step right under the Call Subflow step. If the callHandled step is true, then it goes to the END label which has the usual Terminate and Set Contact Info (handled) steps.
Works great!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide