Advanced Work Assignment True Auto Assignment?

ctsmith
Mega Sage

I've set up an Advance Work Assignment scenario--queue, service channel, etc for incoming incidents.  Works fine.  Looks pretty cool.  But, I find the auto assignment misleading in the documentation.  Yes, it automatically assigns the incident to a given agents queue, but they still have to actually accept it before the incident is truly assigned to them.  Yep, you can remove the option to reject.  I get that.  But, I want it to run through available agents and automatically assign the actual incident instead of just assigning the accept card to their inbox.  Is this possible?  I know there's another post about a script for round robin assignment of incidents via a script, but I was thinking there's a more sustainable, out of the box solution with Advanced Work Assignment. 

 

Thanks!

1 ACCEPTED SOLUTION

ctsmith
Mega Sage

Ah, got it.  Just need to add a BR to awa_work_item table and anytime a new record is inserted and Pending Accept state just change the state to Accepted.

View solution in original post

14 REPLIES 14

I purposely skipped the chats just in case they're assigned to someone who's not necessarily watching the queue since it's a live interaction.  In my job that runs every 5 minutes to assign any outstanding items in the AWA queue, it assigns only incidents and catalog tasks but I could include the chat queue:

var workItem, setAssignedTo;
workItem = new GlideRecord('awa_work_item');
workItem.addEncodedQuery('state=pending_accept^queue=[incident queue sys id]^ORqueue=[task queue sys id]^ORqueue=[could add chat queue sys id here]^sys_created_onRELATIVELE@minute@ago@5');
workItem.query();
while (workItem.next()) {
    setAssignedTo = new GlideRecord(workItem.document_table);
    setAssignedTo.addQuery('sys_id', workItem.document_id);
    setAssignedTo.query();
    if (setAssignedTo.next()) {
        setAssignedTo.setValue('assigned_to', workItem.assigned_to);
        setAssignedTo.update();
    }
    workItem.setValue('state', 'accepted');
    workItem.update();
}

FYI, I have not found this to be sufficient.  The UI action appears to do more than just update the aws_work_item table, and we're having an issue with synching the INC values as well as proper reassignment (i.e. when an agent goes offline).    I set up a second Business rule for the INC values, but have not resolved the complexity of auto-reassignment/accept).  If anyone has any insight, it would be appreciated.

Eric Merkle
ServiceNow Employee
ServiceNow Employee

Hi all, we are currently planning this to be a OOB feature. I would love to speak to either of you to see how this functioned for you for the last few years and what gaps you had. reach out and I'll send you an email to connect. 

Best, 

Eric Merkle

Eric, my company is also trying to enable "auto-accept" but running into problems with work assignment and keeping awa_task and INC in sync (i.e. the ui action does things that aren't replicated by this single business rule).    I would be very interested in discussing an OOB feature.

Howard Baker
Tera Expert

I tried the business rule, but found that new work items kept being generated for the incident.

I solved that by using an async business rule, and setting the incident's assignment_group and assigned_to after setting the work item state to accepted. The sys_id of the group is the first item in the 'claim_data' field, and the user is in the 'claimed_for' field on the work item.