Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Get Agent's Participant ID of Open Interaction

    Posted 06-04-2025 10:43

    Hi,
    I'm trying to implement flow that receives conversation id and queue id as input, and transferring that conversation to queue.
    I'm using it only on open interactions (interactions that currently in agent treatment).

    So the API call for that is:
    /api/v2/conversations/messages/${input.conversationId}/participants/${input.participantId}/replace
    body:
    {
    "queueId": "${input.queueDestinationId}"
    }

    And it works fine.

    The problem we are having is getting the participant id, which is the current handling agent.
    I tried using this API to filter it out and get the participant id:
    /api/v2/analytics/conversations/${input.conversationId}/details

    and the JSONPath to get the participant id is:
    $.participants[?(@.purpose=='agent' && @.sessions[*].segments[?(!@.segmentEnd)])].participantId
    Which filters only agent participants that doesn't have segmentEnd property.

    The problem is with writing this action, as from what I saw translationMap doesn't support such nested filtering.

    Is there any suggestions for this action?

    Thanks


    #API/Integrations

    ------------------------------
    Nati Kuzner
    ------------------------------


  • 2.  RE: Get Agent's Participant ID of Open Interaction

    Posted 06-04-2025 11:06

    Hello Nati,

    I am moving this thread to the developer community as this is specific about writing/developing actions. 

    Cheers, 



    ------------------------------
    Cameron
    Online Community Manager/Moderator
    ------------------------------