Genesys Cloud - Main

 View Only
Discussion Thread View
  • 1.  Identifying Calls and Connecting Segments

    NEW MEMBER
    Posted 07-15-2024 07:15

    Hi all,

    We're pulling data using the Conversations API but struggling to identify the individual calls within it and then piecing the segments together to get the wrap up code, connected time, answer time, etc 

    Hypothetical Scenario

    1. Customer calls, goes through the IVR and is routed to Queue 1 (Triggering an ACD 1)
    2. Agent 1 alerts but does not answer resulting in the call bouncing to Agent 2. Agent 2 Answers. 
    3. During the call Agent 2 places the customer on hold while they call Queue 2 for advice (Triggering ACD 2)
    4. No one answers the Queue 2 so the agent goes back to the customer and tries Queue 2 again (Triggering ACD 2) this time with Agent 3 answering.
    5. They converse with Agent 3 and then return to the customer - Agent 3 wraps up their call with outcome B.
    6. Agent 2 transfers the Customer to Queue 3 (Triggering ACD 3)
    7. Agent 4 answers.
    8. Agent 2 wraps up their call with outcome A.
    9. Agent 4 completes the call with Outcome C.


    Within that scenario there's 1 Customer Call but 5 calls that we want to report on.
    Call 1 - Queue 1, ACD 1, Agent 1, Outcome = Bounced, No WrapUp
    Call 2 - Queue 1, ACD 1, Agent 2, Outcome = Answered, WrapUp = A 
    Call 3 - Queue 2, ACD 2, No Agent, Outcome = No Answer, No WrapUp
    Call 3 - Queue 2, ACD 2, Agent 3, Outcome = Answered, WrapUp = B 
    Call 4 - Queue 3, ACD 3, Agent 4, Outcome = Answered, WrapUp = C


    All Participants in this call will have the same Conversation ID and Session ID. How do you identify the individual calls and then connect them to the relevant segments?

    I appreciate this is complex but welcome support!

    Many thanks,


    #Reporting/Analytics

    ------------------------------
    Sam Merrey
    National Accident Helpline Ltd.
    ------------------------------


  • 2.  RE: Identifying Calls and Connecting Segments

    GENESYS
    Posted 07-16-2024 07:49

    Hi Sam,

    Welcome to the community and a great first question.

    Firstly I am going to provide a couple of articles form the developer center that help breakdown the Conversation Data Model and the Conversation Detail query.

    Secondly, I am going to recommend pulling a conversation via https://developer.genesys.cloud/devapps/api-explorer#get-api-v2-analytics-conversations-details and comparing the response to the timeline for the interaction in the Genesys Cloud UI.  You will see in the response that you will get separate participant data for each row within the timeline along with the metrics and the segments  for each participant. (This is how I learnt it and found having a visual representation alongside the data helped me understand it).

    I would also like to clarify your last question "All Participants in this call will have the same Conversation ID and Session ID. How do you identify the individual calls and then connect them to the relevant segments?".  Overall it is one ConversationID, but each Participant should have a unique sessionID.  It is these sessions that are then broken up further into segments and the corresponding metrics.

    I hope this helps, but let me know if you have any further questions or want further clarification.



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



  • 3.  RE: Identifying Calls and Connecting Segments

    NEW MEMBER
    Posted 07-16-2024 12:11

    Hi Samuel,

    Thank you so much for the response.

    Sadly I'm struggling to see any difference between that API we're using vs the one suggested, though I may be misunderstanding what you're saying. The API we're using is "/api/v2/analytics/conversations/details/query". We're using this because our processes run overnight and retrieves all conversations for the previous day from Genesys. We're then trying breakdown this data to get each individual call line by line highlighting what time the customer first called, when it allocated to an agent, when agent answered, when agent started wrap, when agent ended the call, which agent, which queue, wrap outcome, AHT's, etc. 

    I also need to clarify what what I mean when I say the Sessions are the same, I'm talking about the PeerID they link to. They all seem to be linked to the same SessionID which doesn't give the individual calls within the business but rather the 1 call from the customer.

    Identifying a call is difficult to do via Sessions as not every call has an ACD participant and not all ACD participant pass to an Agent Participant. 

    It feels like it must be possible as the audio logs are at the level we need but cannot identify them in the API data.

    Many thanks,
    Sam



    ------------------------------
    Sam Merrey
    National Accident Helpline Ltd.
    ------------------------------



  • 4.  RE: Identifying Calls and Connecting Segments
    Best Answer

    GENESYS
    Posted 07-17-2024 05:12

    Hi Sam,

    The difference between the conversations/details and conversations/details/query is just that the query is looking at matching conversations to a time range and filters, where as the conversations/details is looking for specific conversations, so that should be fine and contains the same information.

    All the information you want should be returned in the query, I'll provide some examples from the details query:

    what time the customer first called - "conversationStart": "2024-07-16T14:30:14.546Z" (for an inbound customer call)

    when it allocated to an agent - Alert segmentStart
    when agent answered - Interact segmentStart
    when agent started wrap - wrapsegmentStart
    when agent ended the call - wrapsegmentEnd if you mean the end of their part of the interaction as a whole or Interact segmentEnd when they disconnected from the customer, but may still complete wrap.

    "segments": [
                                    {
                                        "conference": false,
                                        "queueId": "28e96a73-2776-43c1-82d2-03fd956cd653",
                                        "segmentEnd": "2024-07-16T14:30:34.265Z",
                                        "segmentStart": "2024-07-16T14:30:27.700Z",
                                        "segmentType": "alert"
                                    },
                                    {
                                        "conference": false,
                                        "disconnectType": "client",
                                        "queueId": "28e96a73-2776-43c1-82d2-03fd956cd653",
                                        "segmentEnd": "2024-07-16T14:30:41.076Z",
                                        "segmentStart": "2024-07-16T14:30:34.265Z",
                                        "segmentType": "interact"
                                    },
                                    {
                                        "conference": false,
                                        "disconnectType": "client",
                                        "queueId": "28e96a73-2776-43c1-82d2-03fd956cd653",
                                        "segmentEnd": "2024-07-16T14:30:51.076Z",
                                        "segmentStart": "2024-07-16T14:30:41.076Z",
                                        "segmentType": "wrapup",
                                        "wrapUpCode": "ININ-WRAP-UP-TIMEOUT"
                                    }

    which agent - Under the participants with purpose "agent" and the userId.

    which queue - is shown in the segments above where the segments are recorded or under the participant with purpose "acd".

    wrap outcome - wrapUpCode in the wrapup segment (in my example above it timed out, but would display the selected wrap code).

    AHT's - You can't get an AHT from this query, but you can get the Total Handle for the agent from the metric tHandle
                                   {
                                        "emitDate": "2024-07-16T14:30:51.076Z",
                                        "name": "tHandle",
                                        "value": 16811
                                    }

    With regards to your question about the peerId, this links the sessions back to the original session, which on an inbound customer call, will be the customers sessionId, but each separate participant will have a unique sessionId.
    The Description for peerId is "This identifies pairs of related sessions on a conversation. E.g. an external session's peerId will be the session that the call originally connected to, e.g. if an IVR was dialed, the IVR session, which will also have the external session's ID as its peer. After that point, any transfers of that session to other internal components (acd, agent, etc.) will all spawn new sessions whose peerIds point back to that original external session." 

    From the below, you can see that the Agent participants peerId is the same as the customers sessionId, but the agent has a separate sessionId:


    Customer Participant:
     "participants": [
                    {
                        "externalContactId": ,
                        "participantId": ,
                        "participantName": ,
                        "purpose": "customer",
                        "sessions": [
                            {
                                "ani": "tel:+44redacted",
                                "direction": "inbound",
                                "dnis": "tel:+44redacted",
                                "edgeId": ,
                                "mediaType": "voice",
                                "protocolCallId": ,
                                "provider": "Edge",
                                "recording": true,
                                "remoteNameDisplayable": ,
                                "requestedRoutings": [
                                    "Standard"
                                ],
                                "selectedAgentId": ,
                                "sessionDnis": "redacted",
                                "sessionId": "8b5220cf-f7c1-4aa3-ad83-3262a78d5fa8",
                                "usedRouting": "Standard",

    Agent Participant:

                        "participantId": ,
                        "purpose": "agent",
                        "teamId": "",
                        "userId": "",
                        "sessions": [
                            {
                                "ani": "tel:+44redacted",
                                "direction": "inbound",
                                "dnis": "tel:+44redacted",
                                "edgeId": ,
                                "mediaType": "voice",
                                "peerId": "8b5220cf-f7c1-4aa3-ad83-3262a78d5fa8",
                                "protocolCallId": "",
                                "provider": "Edge",
                                "remote": "0",
                                "requestedRoutings": [
                                    "Standard"
                                ],
                                "selectedAgentId": "",
                                "sessionDnis": "",
                                "sessionId": "b1b20e81-fb48-4372-a4b9-661997adb8ec",
                                "usedRouting": "Standard",
                               

    I hope this helps clarify further, but maybe someone else has a better way of getting the information you are looking



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



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources