Skip to content

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.

  1. From the Control Hub login to Webex Connect. Profiles

  2. Create new service with name _Service Profiles

  3. Creat new flow. Name it Track_Order_Flowers. Profiles

  4. 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. Profiles

Task 2. Configure Action in AI Studio portal.

  1. Go to the AI Studio portal. Profiles

  2. Select AI Dashboard and find the Skill that you created earlier - _Suggested_Responses_Skill. Profiles

  3. Select Actions and create new Action. Profiles

  4. 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. Profiles

  5. 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 Profiles

  6. For the fulfillment flow select the Service _Service and the flow Track_Order_Flowers, that you have created in the previous Tasks. Then click Add. Profiles

  7. Publish the recent changes of the Skill. Profiles

Task 3. Configure Fulfillment flow in Webex Connect.

  1. Open up Webex Connect. Findthe the service _Service and open up flow: Track_Order_Flowers. Click on Edit the flow. Profiles

  2. Add HTTP Request node to the flow and connect Configure AI Agent Event node to this HTTP Reqeust node. Profiles

  3. 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. Profiles

    {
      "orderNumber": "numbr"
    }
    
  4. 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

    Profiles

  5. Save changies and click on Make Live. Profiles

Task 4. Deliver data from Webex Connect to AI studio for the response to the customer.

  1. 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. Profiles

  2. 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. Profiles

Task 5. Test the Suggested Responses feature with fulfillment.

  1. Login to Agent Deskop.

  2. Please the call to the number that is related to you Channel - _2000_Channel

  3. Ask the AI Agent to transfer the call to the human agent.

  4. Once the call is connected to the Agent Desktop, select the AI widget and then click on Get suggestions. Profiles

  5. 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. Profiles

  6. 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." Profiles

  7. (Optional) To see all order infomations you can by placing this URL in your browser.
    https://67e9aa0bbdcaa2b7f5b9ed62.mockapi.io/customerOrder
    Profiles