Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

I need to create a POC for Advanced work assignment using Agent schedule without Agent workspace.

divyadhanda
Giga Guru

I need to implement a POC using incidents for Advanced work assignment using Agent schedule without Agent workspace.

Is that possible OOB without any customization. 

 

Customer doesn't want to use the agent workspace and set their availability; they wanted to achieve this using agent schedule. If the agent is available within the work schedule he should be assigned to the incident else the agent shouldn't be assigned.

4 REPLIES 4

Naveen20
ServiceNow Employee

Try this option: Skip AWA. Use a BR + Script Include with GlideSchedule.isInSchedule().


Matches the customer's ask (assign if in schedule, else don't), no workspace, minimal customization.

Business Rule on incident, before insert/update, when assignment_group changes and assigned_to is emptycall the Script Include and set assigned_to (leave empty if null returned).

Script Include:

assignFromGroup: function(groupSysId) {
var members = [];
var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('group', groupSysId);
gr.addQuery('user.active', true);
gr.query();
var now = new GlideDateTime();
while (gr.next()) {
var schedId = gr.user.schedule.toString();
if (!schedId) continue;
if (new GlideSchedule(schedId).isInSchedule(now)) {
members.push(gr.user.toString());
}
}
if (members.length === 0) return null;
return members[0]; // swap for round-robin/least-loaded as needed
}

divyadhanda
Giga Guru

No, I wanted to implement this using AWA along with some customization. 

 

JackieErickson
Tera Expert

I don't think using awa outside of a workspace is supported. Have you thought about shifting your agents to service operations workspace? You can enable awa and omni channel support for things like phone calls (openframe configuration) and chat all in a single interface for the agents. 

The customer doesn't use agent workspace or service operations workspace. They simply wanted to assign the work to the agent if the agent is available inside the working schedule. 

 

Can we implement this AWA OOB or can we customize this? Please share if you have any insights on this.