Muhammad_Ahmed | 2021-04-11 16:37:32 UTC | #1
Hi,
We want to identify if a callback request from a particular number (callback number) is waiting in a particular queue.
Scenario: if there is already a callback request waiting already waiting in the queue then we should not create another Callback Request. We are using the below code but it is not working in case if the callback request is transferred to some other queue:
{ "interval": "${input.interval}", "order": "desc", "orderBy": "segmentStart", "paging": { "pageSize": 1, "pageNumber": 1 }, "segmentFilters": [ { "type": "and", "predicates": [ { "type": "dimension", "dimension": "callbackNumber", "operator": "matches", "value": "${input.callbackNumber}" }, { "type": "dimension", "dimension": "queueId", "operator": "matches", "value": "${input.queueId}" }, { "type": "dimension", "dimension": "segmentEnd", "operator": "notExists", "value": null }, { "type": "dimension", "dimension": "mediaType", "operator": "matches", "value": "callback" } ] } ], "conversationFilters": [ { "type": "and", "predicates": [ { "type": "dimension", "dimension": "conversationEnd", "operator": "notExists", "value": null } ] } ] }
Jerome.Saint-Marc | 2021-04-21 16:00:42 UTC | #2
Hello,
I am not totally sure I understand your callback conversation flow and what queue you would use for the query.
So, let's say you request/schedule a callback for Queue1.
What do you mean by "transferred to some other queue"? Do you mean that your callback conversation is delivered to a Contact Center Agent (via Queue1) and that the Agent performs a Blind Transfer to Queue2 (via the Genesys Desktop) - without initiating a call to the customer?
If so, which Queue are you planning to use in your request? I mean would you make a query based on Queue1, or on Queue2?
Regards,
Muhammad_Ahmed | 2021-04-22 04:15:53 UTC | #3
Jerome.Saint-Marc, post:2, topic:10583
What do you mean by "transferred to some other queue"? Do you mean that your callback conversation is delivered to a Contact Center Agent (via Queue1) and that the Agent performs a Blind Transfer to Queue2 (via the Genesys Desktop) - without initiating a call to the customer?
If so, which Queue are you planning to use in your request? I mean would you make a query based on Queue1, or on Queue2?
Dear Jerome,
Thank you for your response. Please consider the below:
Callback request is created on Queue1 > Agent received the callback request, but without making a call to caller, the agent blind transfer the call to other Queue, lets say Queue2 > But no agent is available in Queue2 so, callback is waiting there. > Meanwhile, Caller requested a callback for Queue1. At this stage we want to know that whether if already any callback exists with same number in Queue1, we called API with filters: on callbackNumber, mediaType=Callback, Queue=Queue1, ConversationEnd=NoExists and SegmentEnd=NoExists. But API returns segments for previous callback which was transferred to Queue2, without segmentEnd for Queue1.
Hope above clarifies the situation. In a nutshell, is there any API through which I can query a Queue and find out if there is any Active callback request exists for the same number. Active Callback = Still waiting, not calledback nor transferred to other Queue.
Looking forward to hear back from you.
Thanks for your help.
Jerome.Saint-Marc | 2021-04-22 09:44:21 UTC | #4
Hello,
I think the following should work for you. I just added one more segment filter to focus on the Queue participant (purpose = acd).
{ "interval": "${input.interval}", "order": "desc", "orderBy": "segmentStart", "paging": { "pageSize": 1, "pageNumber": 1 }, "segmentFilters": [ { "type": "and", "predicates": [ { "type": "dimension", "dimension": "callbackNumber", "operator": "matches", "value": "${input.callbackNumber}" }, { "type": "dimension", "dimension": "purpose", "operator": "matches", "value": "acd" }, { "type": "dimension", "dimension": "queueId", "operator": "matches", "value": "${input.queueId}" }, { "type": "dimension", "dimension": "segmentEnd", "operator": "notExists" }, { "type": "dimension", "dimension": "mediaType", "operator": "matches", "value": "callback" } ] } ], "conversationFilters": [ { "type": "and", "predicates": [ { "type": "dimension", "dimension": "conversationEnd", "operator": "notExists" } ] } ] }
I have tried the following scenario and it seems that it does what you are looking for. Callbacks were submitted to Queue1. And the above query was performed using Queue1 in the filters.
Callback submitted to Queue1 but still in scheduled stage - (i.e. analytics query before the request scheduled callback time): returns the callback conversation
Callback submitted to Queue1 and waiting in Queue1 - (i.e. analytics query before the request scheduled callback time): returns the callback conversation
Callback submitted to Queue1 and connected to an agent: returns empty
Callback submitted to Queue1, delivered to an agent who initiates a blind transfer to Queue2: returns empty
Callback submitted to Queue1, delivered to an agent who initiates a blind transfer to Queue1 (just tried this one to be sure of the request): returns the callback conversation
Hope this will work for you.
Regards,
Muhammad_Ahmed | 2021-04-22 11:56:00 UTC | #5
Dear Jerome,
Thank you for your response and efforts.
When we run our code (mentioned in the link above), in above case API returns that callback request still exists in the original queue, although callback is transferred to other Queue. When we checked in detail then we found that the JSON has 1 segment without segmentEnd for original queue even after the callback is transferred. Please check the attached example, in Line #40 and below are screenshots and details:
Queues with their GIUDS: Demo=0727d4ac-8b50-405c-a827-82ef094d5bc7 Demo2=5f0cca85-bcc5-45c0-b15f-6db6df7d4ac2 { "conversationId": "379655f6-c8bf-45a3-bc4b-5daee19da1bc", "conversationStart": "2021-04-11T13:06:04.405Z", "originatingDirection": "outbound", "divisionIds": [ "b3710cb8-c3fd-42e2-8369-c878a0e61b8e" ], "participants": [ { "participantId": "341061ee-3bb3-4336-a898-7349b8ec1546", "participantName": "Dubai, United Arab Emirates", "purpose": "customer", "sessions": [ { "mediaType": "callback", "sessionId": "8467379f-b1bd-4afa-ab92-a0b92218328e", "direction": "outbound", "callbackUserName": "Dubai, United Arab Emirates", "callbackNumbers": [ "+97147654321" ], "callbackScheduledTime": "2021-04-11T13:07:04Z", "scriptId": "ffde0662-8395-9b04-7dcb-b90172109065", "skipEnabled": true, "timeoutSeconds": 0, "segments": [ { "segmentStart": "2021-04-11T13:06:04.405Z", "segmentEnd": "2021-04-11T13:07:04.444Z", "queueId": "0727d4ac-8b50-405c-a827-82ef094d5bc7", "segmentType": "scheduled", "conference": false }, { "segmentStart": "2021-04-11T13:07:04.444Z", "queueId": "0727d4ac-8b50-405c-a827-82ef094d5bc7", "segmentType": "interact", "conference": false } ], "metrics": [ { "name": "nConnected", "value": 1, "emitDate": "2021-04-11T13:07:04.444Z" } ], "provider": "PureCloud Callback" } ] }, { "participantId": "7e655e6f-95b6-4663-8bae-7be10d75da10", "purpose": "acd", "sessions": [ { "mediaType": "callback", "sessionId": "248c661c-8964-4a69-8011-032968bb09a0", "direction": "outbound", "callbackUserName": "Dubai, United Arab Emirates", "callbackNumbers": [ "+97147654321" ], "callbackScheduledTime": "2021-04-11T13:07:04Z", "scriptId": "ffde0662-8395-9b04-7dcb-b90172109065", "peerId": "8467379f-b1bd-4afa-ab92-a0b92218328e", "skipEnabled": true, "timeoutSeconds": 0, "segments": [ { "segmentStart": "2021-04-11T13:06:04.406Z", "segmentEnd": "2021-04-11T13:07:04.445Z", "queueId": "0727d4ac-8b50-405c-a827-82ef094d5bc7", "segmentType": "scheduled", "conference": false }, { "segmentStart": "2021-04-11T13:07:04.445Z", "segmentEnd": "2021-04-11T13:07:56.495Z", "queueId": "0727d4ac-8b50-405c-a827-82ef094d5bc7", "disconnectType": "transfer", "segmentType": "interact", "conference": false } ], "metrics": [ { "name": "nOffered", "value": 1, "emitDate": "2021-04-11T13:07:04.445Z" }, { "name": "tAcd", "value": 52050, "emitDate": "2021-04-11T13:07:56.495Z" } ], "provider": "PureCloud Callback", "remote": "Dubai, United Arab Emirates", "requestedRoutings": [ "Standard" ], "selectedAgentId": "5923627d-d9d8-4a4d-9eac-544c7bda355e" } ] }, { "participantId": "fdadda90-26a5-45f0-88bd-96b38dcf768a", "userId": "5923627d-d9d8-4a4d-9eac-544c7bda355e", "purpose": "agent", "sessions": [ { "mediaType": "callback", "sessionId": "8baf5aa3-3105-4bd0-a047-9d07fc944a4f", "direction": "outbound", "callbackUserName": "Dubai, United Arab Emirates", "callbackNumbers": [ "+97147654321" ], "callbackScheduledTime": "2021-04-11T13:07:04Z", "scriptId": "ffde0662-8395-9b04-7dcb-b90172109065", "peerId": "8467379f-b1bd-4afa-ab92-a0b92218328e", "skipEnabled": true, "timeoutSeconds": 0, "segments": [ { "segmentStart": "2021-04-11T13:07:47.549Z", "segmentEnd": "2021-04-11T13:07:56.495Z", "queueId": "0727d4ac-8b50-405c-a827-82ef094d5bc7", "segmentType": "alert", "conference": false }, { "segmentStart": "2021-04-11T13:07:56.495Z", "segmentEnd": "2021-04-11T13:08:09.026Z", "queueId": "0727d4ac-8b50-405c-a827-82ef094d5bc7", "disconnectType": "transfer", "segmentType": "interact", "conference": false }, { "segmentStart": "2021-04-11T13:08:09.485Z", "segmentEnd": "2021-04-11T13:08:14.485Z", "queueId": "0727d4ac-8b50-405c-a827-82ef094d5bc7", "wrapUpCode": "1cd2bb00-47b5-4853-b99f-13a3182654eb", "disconnectType": "transfer", "segmentType": "wrapup", "conference": false } ], "metrics": [ { "name": "nOverSla", "value": 1, "emitDate": "2021-04-11T13:07:56.495Z" }, { "name": "tAlert", "value": 8946, "emitDate": "2021-04-11T13:07:56.495Z" }, { "name": "tAnswered", "value": 52050, "emitDate": "2021-04-11T13:07:56.495Z" }, { "name": "nBlindTransferred", "value": 1, "emitDate": "2021-04-11T13:08:09.026Z" }, { "name": "nTransferred", "value": 1, "emitDate": "2021-04-11T13:08:09.026Z" }, { "name": "tHandle", "value": 12531, "emitDate": "2021-04-11T13:08:09.026Z" }, { "name": "tTalk", "value": 12531, "emitDate": "2021-04-11T13:08:09.026Z" }, { "name": "tTalkComplete", "value": 12531, "emitDate": "2021-04-11T13:08:09.026Z" } ], "provider": "PureCloud Callback", "remote": "Dubai, United Arab Emirates", "requestedRoutings": [ "Standard" ], "usedRouting": "Standard", "selectedAgentId": "5923627d-d9d8-4a4d-9eac-544c7bda355e" } ] }, { "participantId": "b5bd4962-c5a9-45a9-8244-31cddb62d46d", "purpose": "acd", "sessions": [ { "mediaType": "callback", "sessionId": "bc223467-76fb-4b65-90c5-2983615e177e", "direction": "outbound", "callbackUserName": "Dubai, United Arab Emirates", "callbackNumbers": [ "+97147654321" ], "callbackScheduledTime": "2021-04-11T13:07:04Z", "scriptId": "ffde0662-8395-9b04-7dcb-b90172109065", "peerId": "8467379f-b1bd-4afa-ab92-a0b92218328e", "skipEnabled": true, "timeoutSeconds": 0, "segments": [ { "segmentStart": "2021-04-11T13:08:09.036Z", "queueId": "5f0cca85-bcc5-45c0-b15f-6db6df7d4ac2", "segmentType": "interact", "conference": false } ], "metrics": [ { "name": "nOffered", "value": 1, "emitDate": "2021-04-11T13:08:09.036Z" } ], "provider": "PureCloud Callback", "remote": "Dubai, United Arab Emirates" } ] } ] }
So, I doubt that provided code will filter it. What do you think?
Thanks, Muhammad Ahmed
Jerome.Saint-Marc | 2021-04-22 13:18:31 UTC | #6
Muhammad_Ahmed, post:5, topic:10583
When we run our code (mentioned in the link above)
What do you mean? Have you tried with the code I proposed in my previous post (adding a filter on purpose dimension, equal to "acd")? Or still with the code you included in your first/original post?
If you have not tried my code, please try it (from the Developer Tools - API Explorer). I have the same structure of conversation and it works (making the query on my equivalent of the Demo Queue).
In the response you have just posted, this is my analysis. You have 4 participants:
- the first one is the customer participant (purpose = customer). There is a segment with no segmentEnd - which is normal as your callback conversation is still in progress.
- the second one is your original queue participant (purpose = acd - corresponding to your Demo Queue). All segments have a segmentEnd.
- the third one is your Contact Center Agent (purpose = agent). All segments have a segmentEnd.
- the fourth one is your second queue participant (purpose = acd - corresponding to your Demo2 Queue). There is a segment with no segmentEnd.
If you perform the query I posted on your Demo Queue (that also uses a filter on purpose = acd), it should not return a result/conversation. I generated a callback conversation with the same structure (the 4 participants) and my query works fine. The goal of adding this additional segment filter on "purpose" dimension (value "acd") is to focus the search/filter on the participants corresponding to a queue.
Regards,
Muhammad_Ahmed | 2021-04-22 13:23:02 UTC | #7
Jerome.Saint-Marc, post:6, topic:10583
The goal of adding this additional segment filter on "purpose" dimension (value "acd") is to focus the search/filter on the participants corresponding to a queue.
I think you have a point; the purpose filter in the segment will solve my issue. Sorry I missed in your first response. Let me check your query completely as now I think it will solve my problem. I will update you.
Thanks,
system | 2021-05-23 13:23:06 UTC | #8
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 10583