Playing Audio With New Interactions In Media Bar

Learn how to use PopFlow to make Audible Alerts within Media Bar

Last published on: January 24th, 2023

Here is a "Tip" for which we've received a few feature requests and wanted to help our users understand how you can achieve it today! 

 

Goal: How you can use PopFlow to play audible alerts when new interaction enters the Harmony Media Bar or your CRM.

 

In the example below, we will alert the agent with an audible noise when a new Voice/Phone call reaches the Media Bar. However, you'll see the use is not subject to only Voice. You can use this same method on email and chat!

 

Step 1. Creating Event Trigger

Creating the event trigger.

 

In our example we are going to create an audible sound when a new phone call reaches the Media Bar. To do this, we need to create the PopFlow event via On Ring

The following filter is showing all "On Ring" events.  


Example of Creating the  "Telephony On Ring Event" and Workflow.

Simply name your event, give it a description, and ensure the trigger is set to "On Ring" as shown to the left.

 

Expanding Outside Of Voice

We have selected "Telephony" as this event is related to Voice Calls. If you wanted to use Chat and or Email, you could do the same by selecting the appropriate event and using the Chat or Email "Ring" event.

 
 
 

Step 2. Add the "Run JavaScript"

Once you have created your new PopFlow, select the PopFlow, and select design to create the JavaScript for playing an alert.

JavaScript Example On Initial Activity 

Create A New Initial Activity

  • The Initial Activity should run a JavaScript.
    • Name the activity: In this example we choose "Play Sound On Ring"

       
  • There are two ways you can play audio in PopFlow.  Either you can play an audio file that is hosted on the internet, or you can play a generated beep based on a tone specified in hertz and time. 

     

In the code editor, place the following example JavaScript.

var myAudio = new Audio('https://www.freesoundslibrary.com/wp-content/uploads/2022/07/small-hand-bell-ding-sound-effect.mp3');

myAudio.play();

The URL above is an example. Your network team can host the media/audio file within your network or the internet, as long as the agent/user has appropriate access to retrieve the file.


 

The examples above will either a sound file or tone sound effect when a new call enters the Harmony Media Bar.

 
 

Step 3. Stop Workflow

Stop The Workflow Execution

  • Create a "Then" action.
    • Select "Stop Workflow"
      • This activity will stop the workflow for doing anything else.
 
 

 

Seeing it built out

Seeing it all together 
 

Ready to Save, Publish, or Test

Now give it a test! Every new phone call into your Harmony Media Bar should now play an audible alert via the browser.

 

 

Furthering the example!

The great thing about PopFlow is how you can extend further into the power of creating automated workflows based on trigger events. 

 

The example here will only work and run once per new call entering the Harmony Media Bar. However, you could expand on the example for "selected" calls or even add a new Initial Step to existing and already created workflows.