Genesys Cloud (formerly PureCloud)

Discussion Thread View
Expand all | Collapse all

Clear emails in the queue.

Jump to Best Answer
  • 1.  Clear emails in the queue.

    Posted 12-23-2019 03:37

    Hello All

    I want to know if there is any way to clear the emails in the queue, i.e., there is a customer with multiple flows and multiple queues and each queue is handled by different agent.
    Now, these were set up long back and have been inactive for long time. Today if i add some one the queue, he is seeing all the emails in the queue which were waiting since may be 1000+ hours. i know this behavior is correct and normal.

    Is there any way i could clear the emails waiting in the queue. or what i have done is i created another queue and changed the email routing to this flow. In this case i cannot delete the old queue  with an error message - Error deleting the queue( i guess because there are so many emails waiting in this queue)

    Is there any way to overcome this or any workaround solution to just clear the interactions in queue.

    Thanks in advance



    #emails #queue #Routing #purecloudemails #PureCloudACD #Contactcenteradministration

    ​​​​​​​​
    #ArchitectureandDesign
    #DigitalChannels
    #Implementation
    #PlatformAdministration
    #Roadmap/NewFeatures
    #Routing(ACD/IVR)

    ------------------------------
    Teja Darbha
    Jathwa Technology Solutions
    teja.darbha@jathwa.com
    Riyadh Saudi Arabia
    ------------------------------


  • 2.  RE: Clear emails in the queue.

    Top 25 Contributor
    Posted 12-23-2019 15:40
    I looked through the interface and API and came up with nothing.  The only possibility is to use the queue observation in the Analytics API to get a listing of all the conversations and then use PostMan to individually or in bulk 100 at a time.


    ------------------------------
    Robert Wakefield-Carl
    Avtex Solutions, LLC
    Contact Center Innovation Architect
    robertwc@avtex.com
    https://www.Avtex.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 3.  RE: Clear emails in the queue.

    Posted 12-25-2019 00:48
    Edited by Paulo Mesquita 12-25-2019 00:50
    I am not sure if the PureCloud support can help with this.

    Maybe they have an app or a script like this one to disconnect email interactions:

    https://developer.mypurecloud.com/blog/2018-02-07-disconnecting-queued-interactions/

    ------------------------------
    Paulo Mesquita
    Spark NZ Trading
    ------------------------------



  • 4.  RE: Clear emails in the queue.

    Posted 12-25-2019 08:29
    Thank you for the suggestions. I'll look in to them.

    ------------------------------
    Teja Darbha
    Jathwa Technology Solution
    teja.darbha@jathwa.com
    Riyadh Saudi Arabia
    ------------------------------



  • 5.  RE: Clear emails in the queue.

    GENESYS
    Posted 12-26-2019 10:49
    I doubt Care/Support can help with it. I was going to suggest you take a look at the thread on the Developer forum as well. That was something a former internal employee created, but using GO. I started to create my own version of the script in Node.js, but never got around to much. Nothing useful..

    ------------------------------
    George Ganahl GCP (PureCloud) ICCE
    Principal Technology Consultant
    Genesys
    ------------------------------



  • 6.  RE: Clear emails in the queue.
    Best Answer

    GENESYS
    Posted 12-27-2019 11:24
    Edited by Jim Crespino 12-29-2019 02:44
    Teja,

    This is not anything "official" but I have written a script that will run in the Code Edit of PureCloud's Developer Tools (https://developer.mypurecloud.com/developer-tools/#/codeeditor)  that will "disconnect" (a.k.a. delete) conversations in a queue.  You can get the code from my personal GitHub repository here: https://github.com/crespino4/PureCloudScripts/blob/master/DeleteQueuedInteractions.js

    There are a few caveats to using it and your mileage may vary:

    1. At the top of the script are two variables, 'queueName' and 'dateRange' which are really the only two things in the code you will have to change.  You should change the values between the quotes to match your need.  The currently checked in script deletes from a queue named 'AppFoundry' and a date range between December 1 2019 and January 1 2020.
    2. It performs an analytics query to get a batch of 100 queued conversations at a time, so if you have more than a 100 you will have to manually press the 'run' button to run the script until there are no more conversations for that date range.
    3. This deletes ALL conversations in a given queue.  The analytics query could be modified to delete certain media types, etc.  You can use the Analytics Query Builder in the Developer Tools to generate a new query body for your needs.
    4. There isn't much in the way of error handling as I just use this for quick and dirty clean-up of interactions that I generate when testing use cases.

    Here is a screenshot of what it looks like in the Developer Tools (click on the image to see it in a better resolution):


    Good luck.


    ------------------------------
    Jim Crespino
    Senior Director, Developer Evangelism
    Genesys
    https://developer.genesys.com
    ------------------------------



  • 7.  RE: Clear emails in the queue.

    Posted 12-29-2019 04:00
    Hi Jim

    Good day!

    The solution was working great.

    Initially i faced a error but i have no idea why, kindly find the below image

    Later when i tried it with different email queues it was working fine.



    Thanks for the solution.


    Regards

    ------------------------------
    Teja Darbha
    Jathwa Technology Solution
    teja.darbha@jathwa.com
    Riyadh Saudi Arabia
    ------------------------------



  • 8.  RE: Clear emails in the queue.

    GENESYS
    Posted 12-30-2019 10:35
    Glad to hear that is worked on the "email_queue".  I will say that the queueName variable is case sensitive, so it has to match the exact spelling and case of the queue name that you see in PureCloud Admin.

    ------------------------------
    Jim Crespino
    Senior Director, Developer Evangelism
    Genesys
    https://developer.genesys.com
    ------------------------------



  • 9.  RE: Clear emails in the queue.

    GENESYS
    Posted 12-30-2019 10:43
    I received the same error initially. I think maybe due to a brief PureCloud outage that required me to log out, refresh the browser, and log back in to make sure I was logged in properly. Then it worked fine with the same settings that initially produced the error.

    ------------------------------
    George Ganahl GCP (PureCloud) ICCE
    Principal Technology Consultant
    Genesys
    ------------------------------



  • 10.  RE: Clear emails in the queue.

    Posted 12-31-2019 02:28
    Hello Jim,

    Thank you i guess it was due to case sensitiveness. and when i tried with other queues it was fine.

    Hello @George Ganahl,

    Yes, in my case the issue was solved after reloading the page.

    Once again thanks for your valuable time.

    Wish you a Happy New Year.

    Regards


    ​​

    ------------------------------
    Teja Darbha
    Jathwa Technology Solution
    teja.darbha@jathwa.com
    Riyadh Saudi Arabia
    ------------------------------



  • 11.  RE: Clear emails in the queue.

    Posted 06-03-2020 15:57
    is it possible to create a variable for email?
    It would be for example "null" (for everyone) or a specific email for delete

    ------------------------------
    Kaio Oliveira
    InvenIT Prestacoes de Servicos LTDA
    ------------------------------



  • 12.  RE: Clear emails in the queue.

    Posted 10 days ago
    Hi Jim,

    Is there anyway we can mass delete email contacts on a queue (just like this one) but only for a specific email address? Say a Spam email  already in the queue that need to be removed from it?

    ------------------------------
    Jay Sorrosa
    TechStyle Fashion Group (f/k/a Just Fabulous, Inc.)
    ------------------------------



  • 13.  RE: Clear emails in the queue.

    GCAP Member
    Posted 10 days ago
    Jay,
    I ran into a use case like this a few months back (25K+ invalid email notifications from the same sender...) so I thought I'd share what we did in case it helps.

    We used this API call to perform a bulk delete. The segmentFilters used were addressFrom = sender email address and mediaType = "email". (I'll note that the queue they were routed to was not considered, so if that matters this may or may not be a viable solution.)

     https://developer.mypurecloud.com/forum/t/remove-emails-from-queue/2037



    ------------------------------
    Emily Kammerer
    Ascendium Education Group, Inc.
    ------------------------------