cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
655
Views
0
Helpful
2
Replies

Terminating calls to Subflow - best practices

Randall White
Level 3
Level 3

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

1 Accepted Solution

Accepted Solutions

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.

View solution in original post

2 Replies 2

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.

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!