Get queue name and wrapupname with /api/v2/analytics/conversations/details/query

Hi Team,

I'm using the following API:

/api/v2/analytics/conversations/details/query

It's the same one used by the interactions report.

I need to retrieve for each interaction the queue associated with its name and the wrapup associated with its name.

Can you tell me how to do it?

For the queue I see several queueids and I don't know which one to take since depending on the interaction (incoming, outgoing) it shows it in one way or another and also appears with the queue id and I need the real name.
The same thing happens to me with the wrapup.

Regards.

Hello,

You can use this endpoint to get the name from a queueId:
GET /api/v2/routing/queues/{queueId}
or this endpoint to get a list of queues (you can define a list of queueIds as input parameter as well):
GET /api/v2/routing/queues

And these for the wrapup codes:
GET /api/v2/routing/wrapupcodes/{codeId}
or:
GET /api/v2/routing/wrapupcodes

Regards,

Hi Jerome,

And what queueId should I enter since I see that it is different for manual outgoing calls, campaign calls or incoming calls and this is not unified in a single field?

Thanks for the help,

Regards.

I don't understand your question.

If a Queue is involved in a conversation flow (or multiple queues if the call was transferred), it will appear as a participant with purpose=acd (or multiple participants with purpose=acd if the call was transferred to queues during the conversation flow)).

You can have a look at this page on the Resource Center which provides information on conversations and participants: Conversations Overview

Regards,

Hi Jerome,

I mean in this api [/api/v2/analytics/conversations/details/query]
For an incoming call I can get the queue name from:
"participantName": "6_Entrantes",
"purpose": "acd",

image
But for a manual outgoing call, for example, it appears in several segments and in this case the queue name no longer appears but the queue ID::

"segments": [
{
"conference": false,
"queueId": "bc70989f-ef19-427f-881a-61aa1d3f9b92",
"segmentEnd": "2025-01-14T12:07:40.103Z",
"segmentStart": "2025-01-14T12:07:40.053Z",
"segmentType": "contacting"
},
{
"conference": false,
"disconnectType": "client",
"queueId": "bc70989f-ef19-427f-881a-61aa1d3f9b92",
"segmentEnd": "2025-01-14T12:07:49.162Z",
"segmentStart": "2025-01-14T12:07:40.103Z",
"segmentType": "dialing"
},
{
"conference": false,
"disconnectType": "client",
"queueId": "bc70989f-ef19-427f-881a-61aa1d3f9b92",
"segmentEnd": "2025-01-14T12:07:54.401Z",
"segmentStart": "2025-01-14T12:07:49.162Z",
"segmentType": "wrapup",
"wrapUpCode": "ef6e52ec-6f8b-43d1-b21a-28dbe4ad4d9c"

In a campaign call it also appears with the queue id in various segments of the purpose=outbound:
"segments": [
{
"conference": false,
"queueId": "02a4d5f7-d686-4adc-99df-6fedf8b2d8ef",
"segmentEnd": "2025-01-15T12:15:24.557Z",
"segmentStart": "2025-01-15T12:15:24.557Z",
"segmentType": "system"
},
{
"conference": false,
"queueId": "02a4d5f7-d686-4adc-99df-6fedf8b2d8ef",
"segmentEnd": "2025-01-15T12:15:46.669Z",
"segmentStart": "2025-01-15T12:15:46.669Z",
"segmentType": "wrapup",
"wrapUpCode": "ININ-OUTBOUND-NO-ANSWER"

My question is, where should I retrieve the queue if it appears in different places depending on the call?
Isn't there a single field where the queue can be retrieved for any type of interaction?

Regards.

You can take the queueId which is in the segments for the session of this acd participant.
As it appears in the extract you have posted above, the queueId is the same in all segments of a acd participant session. Just pick the one in the first segment when participantName is not provided.

Hi Jerome,

Now I understand, thank you very much for your help and promptness.

Kind Regards.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.