π¨ 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.
Mission 1: HTTP API POST to Control Hub (Emergency config change)
Story
Consider a scenario where a supervisor needs ability to change routing decision during an emergency without accessing admin portal. It can be done by changing the Default Value of a Global Variable via API PUT call from False to True and use Condition in main IVR script to do routing decision. In this mission we are going to create a control script for Supervisors that changes default value of Global Variable from True to False
Prerequisites:
- In this mission, we will modify the behavior of the main flow by adjusting the value of a Global Variable through a separate management flow.
- The management flow will be created within the scope of this mission below.
- [Important!] The creation of the main flow Main_Flow_Your_Attendee_ID is outlined in the first part of the Mission 1 of CORE TRACK (Steps #1-12). Please complete that part to continue with this mission.
Call Flow Overview
- Supervisor calls to management flow and provide its PIN code.
- If the PIN correct, a PUT API request will be triggered to change a Global Variable default setting from False to True.
- A caller makes a call to contact center where Main_Flow_Your_Attendee_ID checks the global variable and transfer the call further based on settings.
Mission Details
Your mission is to:
- Create a management flow which will trigger a global variable default value change.
- Modify your Main_Flow_Your_Attendee_ID to check the global variable default value.
Build
-
In Control Hub Flows page open Global Variables tab at the top and create new Global Variable:
-
Name: EmergencyGV_Your_Attendee_ID
-
Type: Boolean
-
Default Value: False
[Important] Copy your new created Global Variable ID and save to a notepad. We are going to use them in API request in further steps.
-
-
Create a new flow by navigating to Flows, click on Manage Flows dropdown list and select Create Flows.
-
Select Start Fresh and give it a name EmergencyGV_Your_Attendee_ID. Then click Create Flow.
The flow canvas with the initial NewPhoneContact node will load when a flow is created.
-
Add a Collect Digits node:
-
Click on it, navigate to the node settings on the right and rename the Activity Label of the node to CollectPIN
-
Connect the New Phone Contact output node edge to this Collect Digits node
-
Loop No-Input Timeout and Unmatched Entry to the input of the Collect Digits node
-
Turn on Enable Text-To-Speech toggle
-
Select the Connector: Cisco Cloud Text-to-Speech
-
Click the Add Text-to-Speech Message button
-
Text-to-Speech Message: Please enter 4 digits pin code to activate emergency flow.
-
Delete the Audio File element above Text-to-Speech Message field
-
Set checkbox in Make Prompt Interruptible
-
-
Add Condition node:
-
Activity Label: PIN_Check
-
Connect the output node edge from the Collect Digits node to this node
-
In the Expression section write an expression {{CollectPIN.DigitsEntered == '1111'}}
[Optional] You can verify the expression result by clicking on Test Expression icon in the Expression section
-
-
Add HTTP Request node. We are going to use Update Global Variable API PUT request in the node configuration.
-
Activity Label: HTTP_PUT
-
Connect the TRUE output edge from the PIN_Check node to this node
-
Connector: WxCC_API
-
Request Path: /organization/e56f00d4-98d8-4b62-a165-d05a41243d98/cad-variable/{ID} - change {ID} with Global Variable ID you created in Step 1 of this mission.
-
Method: PUT
-
Content Type: Application/JSON
-
Request Body ([Important!] Replace the value of id and name parameters below by the proper ones created in step 1 above):
{ "active": true, "agentEditable": false, "agentViewable": false, "variableType": "Boolean", "defaultValue": "true", "desktopLabel": "", "id": "Your Global Variable ID created in step 1", "name": "Your Global Variable Name created in step 1", "organizationId": "e56f00d4-98d8-4b62-a165-d05a41243d98", "reportable": false, "version": 1 }
Note
In Request body we are going to change Default Value of Global Variable EmergencyGV_Your_Attendee_ID from false to true
-
-
Add one more Condition Node. In this node we are going to check the status of our API PUT request. If it is 200 OK the output will be True and if other than 200 then False.
-
Activity Label: HTTPStatusCode
-
Connect the output node edge from the HTTP_PUT node to this node
-
In the Expression section write an expression {{HTTP_PUT.httpStatusCode == 200}}
-
-
Add a Play Message node
-
Connect the HTTPStatusCode TRUE output node edge to this Play Message node
-
Turn on Enable Text-To-Speech toggle
-
Select the Connector: Cisco Cloud Text-to-Speech
-
Click the Add Text-to-Speech Message button
-
Delete the selection for Audio File
-
Text-to-Speech Message: You have successfully modified your emergency configuration.
-
-
Add another Play Message node
-
Connect the HTTPStatusCode FALSE output node edge to this Play Message node
-
Connect the PIN_Check FALSE output node edge you created in Step 5 to this Play Message node
-
Enable Text-To-Speech
-
Select the Connector: Cisco Cloud Text-to-Speech
-
Click the Add Text-to-Speech Message button
-
Delete the selection for Audio File
-
Text-to-Speech Message: Something went wrong. Please check your configuration and try again.
-
-
Add Disconnect Contact node at the end of the flow and connect both Play Message nodes created in Steps 8 and 9 to that node.
-
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.
-
-
Map your flow to your inbound channel
-
Navigate to Control Hub > Contact Center > Channels
-
Locate your Inbound Channel (you can use the search): Your_Attendee_ID_Channel
-
Select the Routing Flow: EmergencyGV_Your_Attendee_ID
-
Select the Version Label: Latest
-
Click Save in the lower right corner of the screen
-
Testing
-
Open your Global Variable EmergencyGV_Your_Attendee_ID and make sure Default Value is set to False
-
Make a call to your Support Number, when asked provide a pin code 1111# and listen the next message:
a. If "You have successfully modified your emergency configuration." you're good to proceed with step 3.
b. If "Something went wrong. Please check your configuration and try again." then before proceeding you need to fix your flow. Call the instructor for assistance.
-
Open your Global Variable EmergencyGV_Your_Attendee_ID again, refresh the page if it was opened and make sure Default Value is now set to True.
-
Now, letβs get to the fun part. Open the Main_Flow_Your_Attendee_ID we created in Mission 1 of Core track, make sure Edit toggle is ON.
-
Add Global Variable EmergencyGV_Your_Attendee_IDand make sure Default Value is set to True in General Settings of the flow as shown on the following picture.
-
Add Condition node:
-
Delete the connection between NewPhoneContact node and Set Variable node at the beginning of the flow
-
Connect the output node edge of the NewPhoneContact node to Condition node
-
Connect the output False node edge from the Condition node to Set Variable node
-
In the Expression section write an expression {{EmergencyGV_Your_Attendee_ID == true}}
Optional
You can Verify the expresion result by Clicking on Test Expression icon in the Expresion section.Note
Depending on which Track you have followed after the Core Track, you may have NewPhoneContact connected either to FeedbackSet node or to SetVariable node. Remove this connection and add a Condition node in between.
-
-
Add a Play Message node and Disconnect Contact node.
-
Connect the TRUE output node edge of the Condition node to Play Message node
-
Connect the output node edge of Play Message node to Disconnect Contact node.
Click on Play Message node and configure it in the following way:
-
Turn on Enable Text-To-Speech toggle
-
Select the Connector: Cisco Cloud Text-to-Speech
-
Click the Add Text-to-Speech Message button
-
Delete the selection for Audio File
-
Text-to-Speech Message: Sorry, Emergency flow has been enabled. All operators have been evacuated. Please call later.
-
-
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.
-
-
Because we are using only one number to make calls we need to map your Your_Attendee_ID_Channel back to the Main_Flow_Your_Attendee_ID
-
Navigate to Control Hub > Contact Center > Channels
-
Locate your Inbound Channel (you can use the search): Your_Attendee_ID_Channel
-
Select the Routing Flow: Main_Flow_Your_Attendee_ID
-
Select the Version Label: Latest
-
Click Save in the lower right corner of the screen
-
-
Make a call and you should hear the message we configured on Step 7.
-
Revert the Global Variable value from True to False in Control Hub and click Save.
-
Name: EmergencyGV_Your_Attendee_ID
-
Type: Boolean
-
Default Value: False
-
-
Make a test call again and you should hear the Welcome Prompt.
Congratulations, you have succesfully completed Emergency Config mission! ππ












