Mission 2: Configure Fulfillment.
Mission overview
Your mission is to:
Configure the fulfillment flow to track the status of existing orders. This functionality will allow the system to track the status of an order after the customer provides the order number, so the agent does not have to do any manual work and can simply deliver the order status to the customer.
Build
Task 1. Create flow in Webex Connect.
-
Select Integration as AI Agent. Parse the values in the AI Agent block Save and Make Live the flow. We will configure it in a later Task. For now, we just need to create the flow that will be used to complete the Action Configuration on the AI Studio side.
Task 2. Configure Action in AI Studio portal.
-
Select AI Dashboard and find the Skill that you created earlier -
._Suggested_Responses_Skill -
Name the Action as
track_order .
In the Action description provide the following:If the customer want to track and order, collect the order number. With the order number execute the fulfillment and return the customer the order status. .
Select the Action scope as Slot filling and fulfillment. -
Add New input entity. Configure it with the following:
Name:orderNumber .
Entity type: String.
Entiry description:If the customer wants to track an order, collect the order number to this entity. .
Entity example:17 .
Required: Yes -
For the fulfillment flow select the Service
and the flow_Service Track_Order_Flowers , that you have created in the previous Tasks. Then click Add.
Task 3. Configure Fulfillment flow in Webex Connect.
-
Open up Webex Connect. Findthe the service
_Service and open up flow: Track_Order_Flowers. Click on Edit the flow. -
Add HTTP Request node to the flow and connect Configure AI Agent Event node to this HTTP Reqeust node.
-
Open up Configure AI Agent Event node and replace the Sample JSON body with the following. Then click on Parse and Save the changies of the node.
{ "orderNumber": "numbr" }
-
Open up HTTP Request node and configure it with the following:
Method: GET
Endpoint URL:https://67e9aa0bbdcaa2b7f5b9ed62.mockapi.io/customerOrder?id=$(n2.aiAgent.orderNumber)
Header:Content-Type :application/json Output Variable Type: JSON
Click on +Add Variable
Output Variable Name:orderStatus
Response Entity:Body
Response Path$[0].status
Task 4. Deliver data from Webex Connect to AI studio for the response to the customer.
-
While on your Webex Connect flow, click on Edit the flow then click on the Settings and on the top select Flow Outcomes and expand Last Execution Status. In the Define key-value pairs to be sent to the AI Agent select Enter JSON.
-
You need to add the key-value pair to the existing JSON body. Add the comma after the last pair and insert "orderStatus": "$(n3.orderStatus)". Make sure there is no comma after the pair that you inserted. Then click on Save. Then click on Make Live option to publish the flow.
Task 5. Test the Suggested Responses feature with fulfillment.
-
Login to Agent Deskop.
-
Please the call to the number that is related to you Channel -
_2000_Channel -
Ask the AI Agent to transfer the call to the human agent.
-
Once the call is connected to the Agent Desktop, select the AI widget and then click on Get suggestions.
-
As the caller say that you would like to track an order. You will see the suggestion will come up to ask for the order number.
-
As the caller, provide your order number, and you should see the AI execute the fulfillment to place an API call to the third-party application to retrieve the response. For this lab, all order statuses are "new," so you should see that the AI responds that the order status is "new."
-
(Optional) To see all order infomations you can by placing this URL in your browser.
https://67e9aa0bbdcaa2b7f5b9ed62.mockapi.io/customerOrder