Genesys Cloud - Main

 View Only

Sign Up

Is there an in-built variable which can identify when a call is on-hold (hold initiated by agent) ?

  • 1.  Is there an in-built variable which can identify when a call is on-hold (hold initiated by agent) ?

    Posted 7 hours ago

    We are trying to implement a solution -  To play an audio hold alert for agent, after an agent places the caller on hold for 2 mins, for a particular hold segment.

    Trying to set this up through Secure flow since it will be active during an active call. 

    Is there an in-built variable which can identify when a call is on-hold (hold initiated by agent), which can be used to design the flow in secure flow ? 

    General Implementation Suggestion

    Here's a high-level overview of how this could work:

    // Required Variables

    DateTime holdStartTime

    DateTime holdEndTime

    Number totalHoldTime

    Boolean isOnHold

     

    // When agent puts call on hold

    function trackHoldStart() {

    holdStartTime = System.CurrentDateTime

    isOnHold = true

    }

     

    // When agent resumes call

    function trackHoldEnd() {

    holdEndTime = System.CurrentDateTime

    totalHoldTime += (holdEndTime - holdStartTime)

    isOnHold = false

    }

     

    // Hold duration monitoring

    function checkHoldDuration() {

    if (isOnHold) {

    currentHoldTime = System.CurrentDateTime - holdStartTime

    if (currentHoldTime > 120) {

    notifyAgent("Call has been on hold for " + currentHoldTime + " seconds")

    }

    }

    }

     


    #ArchitectandDesign

    ------------------------------
    Lalit Gupta
    Consultant
    ------------------------------