Round robin ticket assignment

107 Comments

  • Rob Baker
    Comment actions Permalink

    Michael, this is quite possibly the coolest thing I have come across so far on the Community to date.  This is perfect for our use case to round robin assign aging tickets in our Unassigned queue.  I made a number of changes to the script to compensate for this use case as well as stuffing the global vars in Properties so each function could be called independently.  Finally, I changed the scope of the search to only look for tickets with tags of interest and limit the number that can be assigned to 10 per pass to avoid a situation where a huge number of tickets could be auto-assigned all at once and when only a small number of agents are active.  This saved a TON of effort writing a full blown we app and front-end to get us out of a tight spot operationally.  Thanks so much for sharing with the Community!

     

     

     

    3
  • Michael Stone
    Comment actions Permalink

    Hey all, 

    Rob Baker was kind enough to share his version of the Zendesk Round Robin Script titled 'Zendesk Roulette (ZDR)'. Here is a list of the new features and a link to the updated script:

      * Added Properties so that each function could be called independently
      * Added a main function so script can be manually run
      * Added search filter changes to limit results to only tags of interest and oldest tickets first
      to avoid hitting script processing time limits
      * Limited assignment to a maximum of 10 tickets per pass to avoid the entire queue from being assigned at once
      * Fixed an issue where the last agent assigned would continue to be pushed tickets if there were no active agents
      including the previously assigned agent
       
      Variables that need to be populated prior to use
      * [YourSheetID]
      * [YourSubDomain]
      * [YourUserName]
      * [YourToken]
     

    * [YourTags]

    https://github.com/grnhse/zdr/blob/master/zendeskMakeAssignments.gs

     

    Let me (or Rob) know if you have any questions.

    -Mike

    3
  • Michael Stone
    Comment actions Permalink

    Hi Melissa/Mark,

    The document does not need to be open in order for the script to run. Step 5 in this guide will run this script every minute in the background and ensure that your tickets are assigned.

    Please let me know if you have any other questions.

    Thanks!

    1
  • Eollivro
    Comment actions Permalink

    Hi, 

    I'm trying to set up the script but I'm facing some authentication issue.

    the exact error message is : Request failed for  https://smartadserver.zendesk.com/api/v2/search.json?query=status:new%20assignee:none returned code 401. Truncated server response: {"error":"Couldn't authenticate you"} (use muteHttpExceptions option to examine full response) (line 154, file "zendeskMakeAssignments")

     

    I've followed each step of the documentation and I can't figured where I got something wrong.

    I've posted a message here : https://support.zendesk.com/entries/41277273 but no solutions came up from here.

    Am I the only one facing this kind of problem?

    Thx

    Edouard

    1
  • Nadia Esteves
    Comment actions Permalink

    Hoping someone could assist I am getting the below error and our calls are not being assigned to anyone

     

    Bad request: https://fctsa.zendesk.com/api/v2/tickets/102497.json (line 193, file "zendeskMakeAssignments")

    1
  • Michael Stone
    Comment actions Permalink

    Hey all,

    Figured it out -- you will need to:

    1) Head into your script (Tools > Script Editor)

    2) Replace lines 182-190 with the following:

    https://gist.github.com/anonymous/179b6b18b28afc2351d3

    I've updated the template file attached to this post as well.

    Let me know if you have any questions on this.

    Mike

     

    1
  • Eva Keyes
    Comment actions Permalink

    @michael, looks like the URL format for the spreadsheet may have changed again. Can you confirm what information I need to be putting in line 10? I've tried all kindsa combos, no dice.

    Thanks!

    1
  • Jennifer Rowe
    Comment actions Permalink

    Wow, that's awesome. Thanks for the update Mike and Rob! 

    Mike, thanks for adding info about the update to the body of the post as well!

    This tip is such an oldie but a goodie. Glad to see it's still so popular and useful to the community!

    1
  • Wes Drury
    Comment actions Permalink

    Great tip Michael - thanks for sharing.

    0
  • Melissa Mitchell
    Comment actions Permalink

    Does this process run even if the Google Docs is closed or do I need to keep the document open in order for this to work?

    0
  • Mark Stubbins
    Comment actions Permalink

    Same question as Melissa, does the Google Doc need to be open for this process to work ?

    Zendesk - Any chance that ticket round robin assignment may become a standard feature ?

    0
  • Christopher Louie
    Comment actions Permalink

    Hi Michael,

    Thanks for the tip!

    I'm having a problem with this; the script seems to running even when the Active is set to "No".

    It even ran with all agents set to "No"

    Thanks!

    Christopher

    0
  • Christopher Louie
    Comment actions Permalink

    Hi all,

    Anyone else here experiencing time lags when running the minutes trigger. This started after Zendesk's latest updates on Sunday morning, 6/1/2014

    Christopher

    0
  • Gareth Bristow
    Comment actions Permalink

    I am receiving an SSL error:

    SSL Error https://{domain omitted}.zendesk.<?>/api/v2/search.json?query=type:ticket%20status:new%20assignee:none (line 160, file "zendeskMakeAssignments")

    The API query looks fine so I'm not sure what's going wrong.

    0
  • Elisa Mougey
    Comment actions Permalink

    Hi all,

    I would be really interested in using this application as follow:

    All tickets coming from a specific channel are assigned to 4 agents.

    Could someone help me understand how to create the proper trigger to achieve this using the Round Robin application?

    Thanks a lot in advance!

    0
  • Michael Stone
    Comment actions Permalink

    @Christopher Louie -- are you still experiencing issues with the Active field? Feel free to share your sheet with me and I'll take a look (mike@bettercloud.com)

    @Gareth -- Interesting, have you made any changes to the original code?

    @Elisa -- In order to achieve this you would create a Trigger that would automatically assign a tag to tickets open via that specific channel. Once you have done this, add the specific tag to the column header so the tickets can be assigned properly.

    Thanks!

    0
  • Elisa Mougey
    Comment actions Permalink

    Hi Michael,

    Thanks a lot for your help, this is really appreciated (especially as I am struggling a bit with the process).

     

    The tickets I want to assign all come from a mail channel, say GMAIL.

    Every single ticket submitted through this channel is automatically assigned to the view UNASSIGNED GMAIL TICKETS with the tag "gmail_elisa".

    Now, I want all these tickets to be assigned evenly among 4 agents (all 4 agents are constantly active).

    I have created my Zendesk Round-Robin app as shown in the screenshot.

    I have then created a trigger to add the tag "Mail_Tag" to all Tickets coming from my GMAIL channel as below:

    Meet ALL of the following:

    Ticket is created

    Ticket channel is GMAIL

     

    Is this in anyway correct?

    I really, really do appreciate your advice with this and I thank you in advance for your precious help.

    Perform these actions:

    Ticket: Add Tags Mail_Tag

    0
  • Gareth Bristow
    Comment actions Permalink

    @Michael: No, I have only configured the required sections.

    0
  • Christopher Louie
    Comment actions Permalink

    @Michael Stone - Great, I've just shared the sheet to you with comments privileges. Let me know if you see anything.

    Thanks! Christopher

    0
  • Michael Stone
    Comment actions Permalink

    @Gareth @Christopher @Elisa I'd love to schedule a call with each of you to discuss these problems. Feel free to shoot me an email at mike@bettercloud.com and we can schedule some time to chat.

    Thanks!

    0
  • Eollivro
    Comment actions Permalink

    please, just ignore my previous message, I got it right :)

    Ed

    0
  • Justin Graves
    Comment actions Permalink

    For any other n00bs out there, here are some tips where I initially screwed this up but eventually got it working:

    Tip 1 (related to step 4, bullet 2) - Google spreadsheets have a new URL format

    There isn't any ampersand (&) symbol in the Google Docs / now Google Drive URL.  Instead, just grab the info after https://docs.google.com/spreadsheet/ccc?key= and before #gid=0. (see attached screenshot - I obscured my spreadsheet ID)

    Tip 2 (related to step 4, bullet 5) - Save the API setting

    If you don't already have Token Access enabled in Manage > Channels > API, you need to check that box AND CLICK THE SAVE BUTTON.  I checked the box, copied the API token and went on my merry way only to find out that nothing was happening... until I went back and double-checked everything and figured out that I hadn't clicked the save button on that settings page.  Also note that Zendesk issues a new API token if and when you enable it for the second time.

    Hope this saves someone a headache.  Happy Zendesking!

    0
  • Jennifer Rowe
    Comment actions Permalink

    Justin, thanks so much for sharing your tips! I will add these to the article--I don't think Michael will object. I'm sure this info will save some headaches.

    0
  • Gareth Bristow
    Comment actions Permalink

    @Michael Stone: Thanks again! It's working perfectly now.

    0
  • Michael Stone
    Comment actions Permalink

    Hey all,

    @Justin @Jennifer -- thanks for the additional tips! Please feel free to add these to the article, no objections on my end :)

    @Ed -- Happy you were able to sort this out! If anything else pops up feel free to shoot me an email -- mike@bettercloud.com 

    @Gareth -- Awesome! It was great speaking with you. Happy I was able to help.

     

     

    0
  • Justin Graves
    Comment actions Permalink

    @Christopher - I ran into the same issue you did, where we set every agent to "No" but tickets were still getting assigned.  What happens, just so everyone knows, is that every New ticket with the specified tag will get assigned to whichever agent has the "x" in the queue column of the Google Docs/Drive spreadsheet.  Not a great time for that agent...

    I emailed Michael for a fix and it was so simple I had to palm my forehead-- just remove the "x" from the queue column. Knowing this, we can now effectively turn off the round robin system altogether if needed from time to time.

    Thanks for a great app Michael!  You made me a rockstar with my boss today :)

    0
  • Christopher Louie
    Comment actions Permalink

    @Justin, interesting. That hasn't been our experience. I just repro'd the problem again. With all agents toggled to "No" the agent at the top of the queue repeatedly gets assigned tickets. For now, we make sure at least one agent is set to "Yes". I wonder what's different about your setup. For now, it works well enough and it certainly is an enhancement (we all wish Zendesk would incorporate).

    0
  • Eric Fung
    Comment actions Permalink

    I can vouch for this document's effectiveness, so thanks, Michael. However, I did notice that after about a month of running it, the assignment log had grown so large that it started pushing on the maximum size of a Google doc. I made a new copy to start fresh, but it may make sense to have more options to prune the assignment log after X days have passed or after it gets to be a certain size.

    0
  • Justin Graves
    Comment actions Permalink

    Just a heads up-- the Round Robin won't work if you disable the setting for "Enable tags on tickets".

     

    I wanted to (and did) disable tags on tickets when I realized it would hide the tags from our agents and free up that screen real estate. I did this only after doing some testing and seeing that doing this actually doesn't stop ZD from tagging the tickets, it just stops presenting those tags to the agents.

     

    Unfortunately, even though Zendesk continues to tag your tickets in the background, apparently the tags need to be in the foreground (for lack of a better term) in order for the Round Robin to function.

     

    See screenshot for location of this setting.  ....and yes, I can screw up almost anything :)

     

    PS- Re-enabling this setting in ZD, waiting 10 minutes, and re-running the round robin processed the backlog of unassigned tickets.

    0
  • Ravi Kant Verma
    Comment actions Permalink

    Request failed for  https://arcserve.zendesk.com/api/v2/search.json?query=type:ticket%20status:new%20assignee:none returned code 401. Truncated server response: {"error":"Couldn't authenticate you"} (use muteHttpExceptions option to examine full response) (line 160, file "zendeskMakeAssignments")

    getting the above error

    0

Please sign in to leave a comment.

Powered by Zendesk