Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Conversation API - Translation Mapping help

    Posted 8 hours ago

    Hi,

    I am looking to create a data action which could return an array of queues it traversed through and the agents who answered the call in the respective queues. The GET /api/v2/analytics/conversations/{conversationId}/details API returns this information. But I am unable to workout the translation map that could return the above details. The response should not include the details of agents that might have been alerted but not answered the call.

    I have queried the queueIds using this translation mapping.

    "queueIds": "$.participants[?(@.purpose == 'agent')].sessions[*].segments[?(@.segmentType == 'interact'].queueId"
    But I am unable to obtain the details of agents who interacted on the call.

    Also, I do not want to go down the path of returning the whole json response to a callflow and parsing it there.

    Thanks in advance for your responses.


    #DataActions
    #PlatformAPI

    ------------------------------
    Dhanalakshmi Vasudevan
    ------------------------------


  • 2.  RE: Conversation API - Translation Mapping help

    Posted 6 hours ago
    Edited by Phaneendra Avatapalli 6 hours ago

    Hi Dhanalakshmi,

    You could try filtering both values from the same interact segment path, for example:

    {
      "translationMap": {
        "queueIds": "$.participants[?(@.purpose == 'agent')].sessions[*].segments[?(@.segmentType == 'interact')].queueId",
        "agentNames": "$.participants[?(@.purpose == 'agent' && @.sessions[*].segments[?(@.segmentType == 'interact')])].name"
      },
      "translationMapDefaults": {
        "queueIds": "[]",
        "agentNames": "[]"
      },
      "successTemplate": "{ \"queueIds\": ${queueIds}, \"agentNames\": ${agentNames} }"
    }


    A couple of notes:

    • Your current queueIds JSONPath looks to be missing a closing bracket/parenthesis around the interact filter.
    • Filtering on segmentType == 'interact' should help exclude agents who were only alerted and never actually handled the call.
    • I would still be a little cautious in transfer/bounce scenarios, because the conversation details payload is split across participants, sessions, and segments, so keeping the queue and agent arrays perfectly aligned may still be tricky.
    • A related thread that may help with flattening nested values in a data action response:

    https://community.genesys.com/discussion/nested-array-translation-map-issue-conversation-details

    And this thread also helps explain why more complex call paths can be harder to map cleanly:
    https://community.genesys.com/discussion/identifying-calls-and-connecting-segments

    Hope this helps. Following this thread as well, as it would be great to see if anyone has been able to achieve this reliably.
    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------