How to get conversation details for abandoned calls

I have a request to be able to get the details of calls which were abandoned during a certain timeframe. I need to be able to provide a list of phone numbers (ANI's) of callers who abandoned while in queue.

I have tried several different methods of querying the conversations details API, but I cannot see any field that gives me an indication that the call is abandoned. Below is my latest POST to the conversation details API.

Can anyone provide insight on how to do this?

{
"interval": "2016-06-01T00:00:00.000Z/2016-06-08T00:00:00.000Z",
"metrics": ["tAbandon"],
"flattenMultivaluedDimensions": true
}

On a conversation, look for a participant with purpose acd and a segment with "disconnectType":"peer". Here's an example participant:

{
  "participantId": "34c98978-9988-4510-b511-a5f76afec699",
  "participantName": "Queue 1",
  "purpose": "acd",
  "sessions": [
    {
      "mediaType": "voice",
      "sessionId": "4862b57b-6c4f-434d-b342-e45d33ac70ac",
      "ani": "tel:+13177158561",
      "direction": "inbound",
      "segments": [
        {
          "segmentStart": "2016-08-08T20:06:40.358Z",
          "segmentEnd": "2016-08-08T20:06:40.362Z",
          "queueId": "636f60d4-04d9-4715-9350-7125b9b553db",
          "segmentType": "delay",
          "conference": false
        },
        {
          "segmentStart": "2016-08-08T20:06:40.362Z",
          "segmentEnd": "2016-08-08T20:07:02.130Z",
          "queueId": "636f60d4-04d9-4715-9350-7125b9b553db",
          "disconnectType": "peer",
          "segmentType": "interact",
          "conference": false
        }
      ]
    }
  ]
}

You would get this data from the Conversation Detail Query

You are correct though that currently, the only path to metrics is through the conversation aggregate endpoint as they are not explicitly included in the conversation detail records. That is an enhancement for the detail records that we agree would be a great improvement to help bridge the data exposed through both endpoints and something we intend to add.

Tim,

Thanks for the quick response. Is there a way I could create a filter for the conversation query so that in addition to the timeframe I am specifying, I could also specify that I only want to bring back conversations with a segment that has a purpose of ACD and a disconnecttype of peer?

Hal.

Check out the Analytics Query Builder to help you build queries. Here's what I came up with:

{
 "interval": "2016-07-27T19:21:36.000Z/2016-08-10T19:21:36.350Z",
 "order": "asc",
 "orderBy": "conversationStart",
 "paging": {
  "pageSize": 25,
  "pageNumber": 1
 },
 "segmentFilters": [
  {
   "type": "or",
   "clauses": [
    {
     "type": "and",
     "predicates": [
      {
       "type": "dimension",
       "dimension": "disconnectType",
       "operator": "matches",
       "value": "peer"
      },
      {
       "type": "dimension",
       "dimension": "purpose",
       "operator": "matches",
       "value": "acd"
      }
     ]
    }
   ]
  }
 ]
}

Super, that seems to be filtering out the conversations that I don't want to see.

One more follow-up question. Is it possible to filter what segments get returned? For example, I only want to show the ACD segment that had the Peer disconnect type. Is that possible in the query or do I need to do post-processing on the response?

No, that is not possible. The reason is that this resource is for retrieving conversations. Segments are one part of a conversation that can be used for filtering, but the purpose of this resource is to return conversation objects.

Hello,

I have the same problem but it seems that your method is not maching all cases. Take a look to the coming JSON please:

{
"conversationId": "d3907678-d816-444f-8971-3ccf4de2253b",
"conversationStart": "2017-05-23T12:49:33.621Z",
"conversationEnd": "2017-05-23T12:57:28.206Z",
"participants": [
{
"participantId": "bc279c2b-3b9c-4338-a122-5acbbffb5b1b",
"participantName": "+33695826383",
"purpose": "customer",
"sessions": [
{
"mediaType": "voice",
"sessionId": "5a9cbc05-a753-4387-99a1-74be3721f828",
"ani": "tel:+33695826383",
"direction": "inbound",
"dnis": "tel:+33971166646",
"edgeId": "a1727ac9-032d-4b1b-8165-c9bd28f901b4",
"segments": [
{
"segmentStart": "2017-05-23T12:49:33.621Z",
"segmentEnd": "2017-05-23T12:49:33.709Z",
"segmentType": "system",
"conference": false
},
{
"segmentStart": "2017-05-23T12:49:33.709Z",
"segmentEnd": "2017-05-23T12:53:06.530Z",
"segmentType": "interact",
"conference": false
}
]
}
]
},
{
"participantId": "073bdfe6-4b3b-4918-8f42-4b64c6181cc5",
"participantName": "France",
"purpose": "ivr",
"sessions": [
{
"mediaType": "voice",
"sessionId": "232f8152-f162-494a-ba3b-cc831f39d623",
"ani": "tel:+33695826383",
"direction": "inbound",
"edgeId": "a1727ac9-032d-4b1b-8165-c9bd28f901b4",
"segments": [
{
"segmentStart": "2017-05-23T12:49:33.665Z",
"segmentEnd": "2017-05-23T12:49:33.693Z",
"segmentType": "system",
"conference": false
},
{
"segmentStart": "2017-05-23T12:49:33.693Z",
"segmentEnd": "2017-05-23T12:50:02.394Z",
"segmentType": "ivr",
"conference": false
}
]
}
]
},
{
"participantId": "1123b889-10f3-4faf-8df6-08c4ffcc3229",
"participantName": "GS - O1",
"purpose": "acd",
"sessions": [
{
"mediaType": "voice",
"sessionId": "191a2d51-422d-429b-bdaf-bc410523de81",
"ani": "tel:+33695826383",
"direction": "inbound",
"edgeId": "a1727ac9-032d-4b1b-8165-c9bd28f901b4",
"segments": [
{
"segmentStart": "2017-05-23T12:50:02.334Z",
"segmentEnd": "2017-05-23T12:50:02.366Z",
"queueId": "e475a3df-63f7-4681-967a-36cd32b58828",
"segmentType": "delay",
"requestedRoutingSkillIds": [
"ddf0b4b1-91ed-4e0b-b1f4-a63b2c5f412c",
"1f7a487b-9ba5-44c4-b351-d59282939b39"
],
"conference": false
},
{
"segmentStart": "2017-05-23T12:50:02.366Z",
"segmentEnd": "2017-05-23T12:50:05.755Z",
"queueId": "e475a3df-63f7-4681-967a-36cd32b58828",
"disconnectType": "peer",
"segmentType": "interact",
"requestedRoutingSkillIds": [
"ddf0b4b1-91ed-4e0b-b1f4-a63b2c5f412c",
"1f7a487b-9ba5-44c4-b351-d59282939b39"
],
"conference": false
}
]
}
]
},
{
"participantId": "f42235f4-26dc-47dd-a967-e119a15fdf11",
"userId": "81896cff-5991-4384-ba69-7fc9fc37ed45",
"purpose": "agent",
"sessions": [
{
"mediaType": "voice",
"sessionId": "2a3a36dc-45ea-404b-bd2e-f0948225712d",
"ani": "sip:855c9b3a-5077-4a11-afaa-cd34c55b0443@127.0.0.1;src=https://edge-proxy.eu-west-1.mypurecloud.ie/connector/v1/organizations/c520342c-d94c-4e1c-ac6f-6a3a8d6e0d21/defaults/ivr/270de030-9da4-4a57-a9bd-edaa3f4594ab/defaultentrypoint.vxml;user=acd",
"direction": "inbound",
"dnis": "sip:5873414147f53c1cbab159b9+homeserve.orgspan.com@localhost",
"edgeId": "a1727ac9-032d-4b1b-8165-c9bd28f901b4",
"segments": [
{
"segmentStart": "2017-05-23T12:50:02.982Z",
"segmentEnd": "2017-05-23T12:50:05.751Z",
"queueId": "e475a3df-63f7-4681-967a-36cd32b58828",
"segmentType": "alert",
"conference": false
},
{
"segmentStart": "2017-05-23T12:50:05.751Z",
"segmentEnd": "2017-05-23T12:50:22.118Z",
"queueId": "e475a3df-63f7-4681-967a-36cd32b58828",
"disconnectType": "transfer",
"segmentType": "interact",
"conference": false
},
{
"segmentStart": "2017-05-23T12:50:23.206Z",
"segmentEnd": "2017-05-23T12:57:28.206Z",
"queueId": "e475a3df-63f7-4681-967a-36cd32b58828",
"wrapUpCode": "7fb334b0-0e9e-11e4-9191-0800200c9a66",
"wrapUpNote": "",
"disconnectType": "transfer",
"segmentType": "wrapup",
"conference": false
}
]
}
]
},
{
"participantId": "7cadd739-358a-4f28-abd6-2d4f3d28ee23",
"participantName": "TRF-ASSISTANCE->VENTE",
"purpose": "acd",
"sessions": [
{
"mediaType": "voice",
"sessionId": "fccfdc0a-d433-41cf-9140-efb39c2b3c54",
"ani": "sip:homeserve.agent%40overbox.net@localhost",
"direction": "inbound",
"edgeId": "a1727ac9-032d-4b1b-8165-c9bd28f901b4",
"segments": [
{
"segmentStart": "2017-05-23T12:50:19.554Z",
"segmentEnd": "2017-05-23T12:50:19.570Z",
"queueId": "855c9b3a-5077-4a11-afaa-cd34c55b0443",
"segmentType": "delay",
"conference": false
},
{
"segmentStart": "2017-05-23T12:50:19.570Z",
"segmentEnd": "2017-05-23T12:53:00.793Z",
"queueId": "855c9b3a-5077-4a11-afaa-cd34c55b0443",
"disconnectType": "transfer",
"segmentType": "interact",
"conference": false
}
]
}
]
},
{
"participantId": "3372e954-8d96-48de-9c01-d0c34b2a9635",
"userId": "2a5df3c7-d1b9-4de8-884f-6dc49574de39",
"purpose": "agent",
"sessions": [
{
"mediaType": "voice",
"sessionId": "22945fbc-adbf-452f-9472-755ea4f3e825",
"ani": "sip:+33695826383@169.254.190.135;user=phone",
"direction": "inbound",
"dnis": "sip:58dba3df749da51b129f5507+homeserve.orgspan.com@localhost",
"edgeId": "a1727ac9-032d-4b1b-8165-c9bd28f901b4",
"segments": [
{
"segmentStart": "2017-05-23T12:52:50.203Z",
"segmentEnd": "2017-05-23T12:52:58.809Z",
"queueId": "855c9b3a-5077-4a11-afaa-cd34c55b0443",
"disconnectType": "client",
"segmentType": "alert",
"conference": false
}
]
}
]
},
{
"participantId": "b1e18c0a-48de-499b-b0ca-c2345eb270b8",
"userId": "6d10d654-a7c5-4b4d-844a-f25c62feed27",
"purpose": "agent",
"sessions": [
{
"mediaType": "voice",
"sessionId": "ecd5fc0d-6bfe-4bdb-b844-aa073c1112b5",
"ani": "sip:+33695826383@169.254.190.135;user=phone",
"direction": "inbound",
"dnis": "sip:58dba3ed9f08601af90b0fe1+homeserve.orgspan.com@localhost",
"edgeId": "a1727ac9-032d-4b1b-8165-c9bd28f901b4",
"segments": [
{
"segmentStart": "2017-05-23T12:52:59.305Z",
"segmentEnd": "2017-05-23T12:53:00.789Z",
"queueId": "855c9b3a-5077-4a11-afaa-cd34c55b0443",
"segmentType": "alert",
"conference": false
},
{
"segmentStart": "2017-05-23T12:53:00.789Z",
"segmentEnd": "2017-05-23T12:53:06.526Z",
"queueId": "855c9b3a-5077-4a11-afaa-cd34c55b0443",
"disconnectType": "client",
"segmentType": "interact",
"conference": false
},
{
"segmentStart": "2017-05-23T12:53:07.330Z",
"segmentEnd": "2017-05-23T12:53:25.330Z",
"queueId": "855c9b3a-5077-4a11-afaa-cd34c55b0443",
"wrapUpCode": "7fb334b0-0e9e-11e4-9191-0800200c9a66",
"wrapUpNote": "",
"disconnectType": "client",
"segmentType": "wrapup",
"conference": false
}
]
}
]
}
]
}

Is there another way to find abandonned calls please ?

Thank you.

Malick