Mission 6: Subflow and Variable Override
🚨 Important Lab Dependency
This mission requires configuration created in the following missions:
If this mission was not completed, some steps in current mission will not function correctly.
Story
In Webex Contact Center, subflows modularize complex workflows by packaging reusable, independent functions (like business hour checks, queue treatment callback collection, error handling, etc.) into separate mini-flows, which are then called from main flows. Their purpose is to simplify development, reduce main flow size, improve organization, and ensure consistency by promoting code reuse for common tasks, making flows cleaner and easier to manage. In the scope of this mission you will use a subflow template to automate queue treatment in the Webex Contact Center environment. You will configure and test two ways of how to define parameters necessary to call the sublow - define them at the main flow level and override at the channel level. The main goal is to improve the customer experience while waiting in a queue by playing music, delivering messages, and looping until a predefined condition is met.
Call Flow Overview
- A new call enters the flow.
- The flow executes the logic and places the call into a queue.
- Once the call is placed in the queue, the main flow calls the Subflow sending few parameters to it.
- The Subflow executes the following logic two times based on the received parameters:
- Plays a music in queue. The duration is defined by the parameter.
- Plays a Text-To-Speech message. The text is fetched from the parameter.
- Plays a music in queue of the same duration again.
- Plays a music in queue. The duration is defined by the parameter.
Mission Details
Your mission is to:
- Create a Subflow from the template.
- Call the Subflow from the main flow with proper parameters.
- Override the Subflow calling parameters at the Channel level.
- Make test calls and verify queue treatment done by the Subflow.
Part 1 - Integrate a Subflow with your Main Flow
Build
- Switch to Webex Control Hub. Look for the contact center option in the left pane under SERVICES – Contact Center and click on it.
- Navigate to Flows in the left pane and click on Subflows tab at the top of the main window. Then click on Manage Subflows dropdown list at the top-right part of the main window and select Create Subflows.
- Create a new subflow tab will be opened. Navigate to Subflow Templates.
-
Choose Queue Treatment Subflow template and click Next.
Note
You can press View Details link under the template name to observe flow structure and read flow description before proceeding with the template.
-
Name your subflow as Subflow_Your_Attendee_ID Then click on Create Subflow.
Note
Edit should be set to On when you create new flow, but if not switch it from Edit: Off mode to Edit: On at the top of the page.
-
In the bottom right corner toggle Validation from Off to On to check for any potential flow errors and recommendations.
Note
You can ignore recommendations but cannot skip errors.
-
Click Publish Subflow. In popped-up window, make sure the Latest label is selected in the Add Version Label(s) list, then click Publish Subflow.
-
Switch to the Flow Designer tab with your Main_Flow_Your_Attendee_ID opened and make sure Edit toggle is ON.
Note
If you closed browser tab with Flow Designer before, switch to Webex Control Hub. Look for the contact center option in the left pane under SERVICES – Contact Center and click on it. Then navigate to Flows, search for your flow Main_Flow_Your_Attendee_ID and click on it to open it in the flow designer.
-
Click on any empty place at flow canvas and make sure you see General Settings appeared on the right pane. The scroll down to the Variable Definition section and add the following two Flow Variables by pressing Add Flow Variable button:
- Name: subflowDuration
- Variable Type: Integer
- Default Value: 5
- Turn on the toggle Enable External Override. Make sure Resource Type is set as None (default)
- Name: subflowMessage
- Variable Type: String
- Default Value: Thanks for your patience. Please hold on while we find an expert for you.
- Turn on the toggle Enable External Override. Make sure Resource Type is set as None (default)
-
Delete the Music node connected to the Queue node. The EndFlow node which was connected to the Music node becomes unconnected at this step.
- Go to the activity library pane on the left, scroll up to the top and click on the Subflow tab.
-
Find your subflow Subflow_Your_Attendee_ID, drag it to flow canvas and place right after your Queue node. Connect it to the other nodes in the following way:
- The output of the Queue node to the input of the Subflow_Your_Attendee_ID.
- The main (aka, top) output of the Subflow_Your_Attendee_ID node to the input of PlayMessage node.
- The Undefined Error (aka, bottom) output of the Subflow_Your_Attendee_ID node to the input of unconnected EndFlow node.
- The output of the PlayMessage node to the input of the Subflow_Your_Attendee_ID node.
-
Click on the Subflow_Your_Attendee_ID node. Go to the node settings pane on the right and set the following parameters:
- Subflow Label: Latest
Scroll down to the Subflow Input Variables section and configure the following mapping:
-
Current flow variable: subflowDuration
-
Subflow Input Variable: musicDuration
Press Add New button to configure the mapping for the second variable:
-
Current flow variable: subflowMessage
-
Subflow Input Variable: queueMessage
-
Click on the PlayMessage node. Go to the node settings pane on the right and paste the following message into the Text-to-Speech Message field:
- We apologize, but all our agents are currently busy. Your waiting time may be longer than expected.
-
Validate and publish the flow:
-
Enable the Validation toggle in the bottom right corner of the flow designer window to check for any potential flow errors and recommendations.
-
If there are no Flow Errors after validation is complete, click on Publish Flow next to it.
-
In the pop-up window, ensure that the Latest label is selected in the Add Version Label(s) list, then click Publish Flow.
-
Checkpoint Test
Note
Since we called the Subflow_Your_Attendee_ID with our custom parameters the caller should hear the following:
-
Repeated two times: 5 seconds of music in queue + our custom message for the subflow Thanks for your patience. Please hold on while we find an expert for you. + 5 more seconds of music in queue.
-
The message in the main flow: We apologize, but all our agents are currently busy. Your waiting time may be longer than expected.
-
Then the subflow should be called again and start playing 5 seconds of music in queue again.
Let's test this.
- [IMPORTANT] Please keep in mind that the agent does not need to take call during this mission. Thus, if you logged in to Webex CC Desktop, please select any Idle state there before making test calls. For example, Busy.
- Make a test call to the Support Number, ensure that the caller hears all voice prompts described in the note above.
- Finish the call.
Part 2 - Override flow variables at the Channel level
Build
- Switch back to Contact Center settings on Webex Control Hub.
- Navigate to Channels in the left pane. Search for your channel Your_Attendee_ID_Channel and click on it.
-
Scroll down to the Entry point settings section and look at Override flow settings part of it. You should see two variables there:
-
subDuration
-
subMessage
-
-
Modify these variables in the following way and save changes.
Variable subflowDuration:
-
Turn on Override value toggle in the Value column.
-
Set new value as 10.
Variable subflowMessage:
-
Turn on Override value toggle in the Value column.
-
Set new value as Thanks for staying with us. Your call will be answered by the next available agent..
Note
Please keep in mind that there is no need to validate and publish your flow one more time after you have overridden flow variables at the channel level.
-
Checkpoint Test
Note
Since we have overridden subDuration and subMessage variables at the channel level the Subflow_Your_Attendee_ID is now being called with these new values. Thus, the caller should hear updated music duration and new message:
-
Repeated two times: 10 seconds of music in queue + our overrided custom message for the subflow Thanks for staying with us. Your call will be answered by the next available agent. + 10 more seconds of music in queue.
-
The same message in the main flow: We apologize, but all our agents are currently busy. Your waiting time may be longer than expected.
-
Then the subflow should be called again and start playing 15 seconds of music in queue again.
Let's test this.
- [IMPORTANT] Please keep in mind that the agent does not need to take call during this mission. Thus if you logged in to Webex CC Desktop, please select any Idle state there before making test calls. For example, Busy.
- Make a test call to the Support Number, ensure that the caller hears all voice prompts described in the note above.
- Finish the call.
Congratulations, you have succesfully completed Subflow and Variable Override mission! 🎉🎉






