Skip to content

Mission 4: Work with Event Flow

🚨 Important Lab Dependency

This mission requires configuration created in the following missions:

  1. Core Track: Mission 1 - Basic Call Routing (Flow Template, TTS, Language)

If this mission was not completed, some steps in current mission will not function correctly.

Story

An Event Flow in Webex Contact Center is a workflow triggered by specific events in the customer interaction process, such as call arrival, agent assignment, call disconnection or actions within the IVR.

Event flows enable a wide range of scenarios, with one common use case being the ability to update an external database with data collected during a call—either from the IVR or through interaction with a live agent.

Call Flow Overview

  1. A new call enters the flow.
  2. The flow executes the logic configured in previous steps.
  3. When the agent answers the call, they receive a screen pop and can adjust call details on the interaction panel.
  4. The flow triggers an event when the agent disconnects from the call.

Mission Details

  1. Continue to use same flow Main_Flow_Your_Attendee_ID
  2. Configure a screen pop in your flow.
  3. Configure an API call to trigger on the AgentDisconnect event.

Note

In this mission, we’ll utilize UseWebhook site, a free online tool that generates a temporary, unique URL for capturing and inspecting HTTP requests. It’s widely used by developers and testers for debugging and testing webhooks or other HTTP-based APIs.

Build

Note

The Global Variable with name WhoIsCalling that we are going to use in this mission has been already created. Switch to Control Hub and navigate to Flows under Customer Experience section. Select Global Variables on top and search for WhoIsCalling to observe it's configuration. Please DO NOT modify it here.

  1. Open you your Main_Flow_Your_Attendee_ID or refresh the Flow Designer page to make sure new created Global Variables are being populated. Make sure Edit toggle is ON

  2. Add WhoIsCalling Global Variable to the flow.

    profiles

  3. Open New Browser tab and paste the following URL UseWebhook site. Then click on Copy URL button next to the webhook URL at the top of the page to make a copy of URL. Please keep this browser tab open to avoid changing your unique Webhook URL.

    profiles

  4. Go back to your flow and navigate to Event Flows tab, delete EndFlow node connected to AgentDisconnect event.

  5. Add HTTPRequest and DisconnectContact node in between these nodes.

    • Connect AgentDisconnect to HTTPRequest node.

    • Connect HTTPRequest to DisconnectContact.

  6. Modify HTTPRequest node settings:

    • Use Authenticated Endpoint: Off

    • Request URL: Paste your unique URL copied on Step 3 from https://usewebhook.com/

    • Method: POST

    • Content Type: Application/JSON

    Request Body:

    {
        "DNIS": "{{NewPhoneContact.DNIS}}",
        "ANI": "{{NewPhoneContact.ANI}}",
        "InteractionId": "{{NewPhoneContact.InteractionId}}",
        "Language": "{{Global_Language}}",
        "WhoCalls": "{{WhoIsCalling}}"
    }
    

    Note

    We are building a dictionary with values generated by flow, language we set in main lab and also WhoIsCalling value which will be provided by agent in agent desktop.

    profiles

  7. Modify the settings of ScreenPop node connected to the AgentAnswered event in the same flow:

  8. 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.

    profiles

Testing

  1. Your Agent Desktop session should still be active. If it is not, launch Desktop using the cross-launch link in Control Hub.

    See how to run Agent Desktop from the Control Hub

    Profiles

  2. On your Agent Desktop, make your agent Available and you're ready to make a call. Profiles

  3. Make a call to the Support Number and if success you should hear Welcome message and then accept the call by agent.

  4. Upon accepting the call, a new browser tab will be opened with the Screen Pop URL configured in Step 4.
  5. Switch back to the Agent Desktop. In agent interaction panel change Who Is Calling? to any name you like then click Save and end the call in the agent desktop.
  6. Switch to the UseWebhook site tab in your browser - you should see the request which came right after Agent dropped the call with all the needed data.

profiles

Post Testing Steps

We recommend removing the ScreenPop node after testing. Otherwise, every time you make a new call to the Main Flow, a pop-up will appear, which may be distracting.

  1. Open your flow Main_Flow_Your_Attendee_ID. Make sure Edit toggle is ON.

  2. Navigate to Event Flows and delete ScreenPop node connected to the AgentAnswered event node.

  3. Connect AgentAnswered event node to the corresponding EndFlow node.

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

profiles


Congratulations, you have succesfully completed Work with Event Flow mission! 🎉🎉