Genesys Cloud - Main

 View Only

Sign Up

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

    Posted 01-20-2026 14:16

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


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

    Posted 24 days ago

    Hi Lalit,

    I do not believe there is a built in variable for this.  You could use the Genesys Cloud WebSocket notifications to potentially trigger this (much like the inbuilt Alert Rules)



    ------------------------------
    Sam Jillard
    Online Community Manager/Moderator
    Genesys - Employees
    ------------------------------



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

    Posted 24 days ago

    Hi Lalit,

    I have also not seen a hold variable that will tell you these values. You will need to use API like /api/v2/conversations/{conversationId} to get this information, and the information is found under participant-->purpose=agent-->calls -->segments. it has both start and end time.

    As you need to do this using secure flow, using a combination of trigger, workflow, API, you may be able to do this.

    I am also not sure how you will send the audio to the agent. If there is a way to do this, can you please post it here as it is something I would like to learn too.

    Regards



    ------------------------------
    Vineet Kakroo
    Senior Technical Consultant
    ------------------------------