Mission 5 : Deliver fulfillment results to the caller
Mission Details
In the previous Mission 4, you configured a fulfillment flow that executes an API call in the WxCC Voice flow based on the order number and parses the order status. In this mission, you will configure the flow to return this status to AI Studio so that the Scripted AI agent can deliver the result back to the caller.
Build
Task 1. Add VirtualAgentV2 block to bring data back to AI Studio.
Note: To deliver the call back to AI Studio, you need to add an additional VirtualAgentV2 block to the flow.
-
Open
Autonomous_Scripted_Flow_2000_ . Click on Edit the flow. -
Delete the Disconnect Contact node and add VirtualAgentV2 node. Connect HttpRequest block to VirtualAgentV2 block.
-
Click on VirtualAgentV2. In the Contact Center AI Config search for scripted and select Webex AI Agent (Scripted). Under the Virtual Agent option, search for the Scripted AI Agent with name
._Scripted_AI_Agent -
Connect Escalated output from the VirtualAgentV2 node to the Queue node.
-
Add Disconnect Contact node and connect Handled output to the Disconnect Contact node.
Task 2. Configure State Event in the VirtualAgentV2 block
Note: We need to configure the VirtualAgentV2 block to send the order status to AI Studio, which will be retrieved in the specific response. For this, we will utilize the State Event.
-
Select the VirtualAgentV2 block that you have added in the previous Task and click on State Event.
-
Configure the State Event with the following:
Event Name: order_status
Event Data: {"status":"{{order_status}}"} -
Understand the State Event configuration. See the picture below.
Task 3. Review the order_status Response configuration.
-
Go to AI Studio and open your Scripted Agent. If you followed all the steps the name of the Scripted Agent should be
_Scripted_AI_Agent -
Go to Script > Responses and search for the Response with the name order_status. This response is preconfigured in this lab for you. Go to Voice channel and review the configurations.
-
Understand the order_status configuration. Please see the picture below.
Task 4. Test Scripted AI agent order status flow.
-
Dial the number that is assosiated with
Channel._2000_Channel -
During IVR, press 2 to and say "I want to track my order". Provide the order details that you created earlier, or use the order with number 22 for the example.
Congratulations, you have officially completed this mission! 🎉🎉