Scripting Question

Need Dell K1000 Round robin ticket assignment for new tickets

10/09/2020 275 views

Have a KACE label with 3 users, need the system to run a job that assigns the tickets to the next in line. I'd assume the SQL find out who hasn't been assigned a ticket in the longest period of time and assign it that way? Thank you.

0 Comments   [ + ] Show comments


All Answers


To achieve this you would need some pretty fancy SQL, the easiest way I have done it is to set all tickets ending 1,4,7 to analyst A 2,5,8 to Analyst B etc, but 3 does not go into 10 in this instance. 

To round robin assign, you would need to find a field value that is available from the database for every ticket and then get a ticket rule to switch from one to the other, not impossible, but pretty time consuming to setup.

Answered 10/09/2020 by: Hobbsy
Red Belt

  • Right, There is a tutorial where someone did it, but the code does not work, I do see the table names in the admin guide, but need the field names, is there a good tool I can use to access the DB so I can find the info to write the query? or has someone done this and can share?


So here's my thinking to set this up, first record the ID's of your analyst so we can use the in the field HD_TICKET.OWNER_ID, lets say they are ID's 59, 72 and 137.

Next I suggest you use a default value in a custom field as they are written in every ticket, so let's use custom field 15 (HD_TICKET.CUSTOM_FIELD_VALUE14) in the database, edit your queue and add in a default value of the first analyst ID (59)

Now we need to build a ticket rule that selects that default value.

You can find that data in HD_CUSTOM_FIELDS. I think you should find custom field 15 in the Queue you are using and find out what ID that field is in, so you should find your default value of 59 in the field HD_CUSTOM_FIELD.DEFAULT so record HD_CUSTOM_FIELD.ID for the line that is the custom field in your queue with your default value written.

So now build your custom ticket rule to update the field HD_CUSTOM_FIELD.DEFAULT with an update CASE statement that goes


                WHEN HD_CUSTOM_FIELD.DEFAULT = '59' THEN '72'

                WHEN HD_CUSTOM_FIELD.DEFAULT = '72' THEN '137'

                WHEN HD_CUSTOM_FIELD.DEFAULT = '137' THEN '59'


WHERE HD_CUSTOM_FIELD.ID = (whatever ID we recorded earlier)

That will provide the sequential round robin update of your analyst ID into the default custom field value.

You then need to build a simple ticket rule to set the analyst ID HD_TICKET.OWNER_ID with the value in HD_CUSTOM_FIELD.DEFAULT

Run these ticket rules one after the other before any other ticket rule and on ticket save.

How does that sound??

Answered 10/09/2020 by: Hobbsy
Red Belt

  • That seems like it would work, so long as I can find the owner ID for each user and can modify the ticket default with the rule, What tool can I run to view the DB so I can find this?
    • SQL Workbench, Flyspeed or Toad for MySQL is my tool of choice ;o)
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ