Hello team,
I have a requirement to fetch all the conversations in a queue through API. the queue is a test queue and has not been is use for quite a while. there are 170 interactions waiting which we want to disconnect. However the code is returning all interactions. Could anyone please shed some light on the filtering or any metric that will return only the waiting conversation Id list.
-----------------------------------------Code Used------------------------
const platformClient = require('purecloud-platform-client-v2');
const client = platformClient.ApiClient.instance;
// Set environment
client.setEnvironment();
// Login using Client Credentials Grant
client.loginClientCredentialsGrant(Client ID, Client secret)
.then(() => {
// Initialize Analytics API
let apiInstance = new platformClient.AnalyticsApi();
You should add conversationFilters array with the conversationEnd dimension set to notExists.
This will keep only the waiting interactions, as there is no conversationEnd set while they are waiting.
I want to fetch the conversation list waiting in the queue right now. but the code is not working properly. (code below). It is producing 0 hits. If I change the interval, lets say to january it produces result but lot more than what we have in waiting. Hence i believe that is not what we are actually looking for.
It seems the interval specified in your code is incorrect. The correct interval format should be from the start date to today’s date and must not exceed 31 days.
Since today is June 30, 2024, the correct interval should be :
2024-05-31T21:59:59.999Z/2024-06-30T21:59:59.999Z
This interval spans from May 31, 2024, to June 30, 2024, inclusive of today's date, and does not exceed the 31-day limit.
This should resolve the issue. Let me know if that works