/build/static/layout/Breadcrumb_cap_w.png

randomly assign to different owners in kace

Hello,

here is the update portion of a ticket rule we use to randomly assign to two different owners:

Would be easy to pull a random 1-10 and then based on ranges assign to different owners as well.

We use this in conjunction with a select statement that forces our student workers to only be able to assign tickets to unassigned, themselves, or the two professional staff below. For example, if they try to assign a ticket directly to our CIO, the rule automatically randomly assigns the ticket to one of the professional staff below for review and escalation from there if needed.

Best, Tim

UPDATE HD_TICKET, USER as T5

    set HD_TICKET.OWNER_ID = T5.ID

WHERE

(HD_TICKET.ID in (<TICKET_IDS>)) AND

T5.USER_NAME = CASE ROUND(RAND()) /*returns 1 or 0*/

WHEN 0 THEN 'FirstOwnerName'

ELSE 'SecondOwnerName'

END



Comments

  • Here's a new version which seems to distribute more evenly when only 2x owners are in consideration.

    UPDATE HD_TICKET, USER as T5
    set HD_TICKET.OWNER_ID = T5.ID
    WHERE
    (HD_TICKET.ID in (<TICKET_IDS>)) AND
    T5.USER_NAME =
    CASE MOD(right((UNIX_TIMESTAMP(now())),1),2)+1 /*returns 1 or 2 based off timestamp*/
    WHEN 1 THEN 'username1'
    WHEN 2 THEN 'username2'
    ELSE 'username2'
    END - tholmes 7 years ago
This post is locked
 
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