Disable the agent ability to change the their status state in Advance Work Assignment (AWA)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
Hello everyone,
I have this requirement where I was to make it that the agent shouldn't have the ability to change their state:
Currently, I have resorted to using a BR where if the agent interact with the UI, the user has the agent role and they are part of a specific group then if the agent changes their state, the state will be change the status back.
But is there a more efficient way to do it?
Thank you you all in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
Hi @trangdan106
1)Using a BR is an efficient method to update awa_agent_presence when specific conditions are met.
Refer: Advanced Work Assignment: (Un)Set Agent's Availability automatically
2) Can I automatically set the presence of agents to unavailable?
Yes – you can set the timeout for agent presence using the system property com.glide.awa.agent_inactivity_threshold_seconds. You may have to create it within your instance, with the value set to the number of seconds before the agent is marked as inactive.
Refer: Advanced Work Assignment (AWA) FAQs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Not quite what I had in mind, I will be using the BR method to check whether a user part of said group performed any actions on the UI that involves the AWA state.
However, I thank you for your supports, those links helped.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Hey @trangdan106
A better approach is to prevent the update at the source instead of correcting it afterward.
1. Use ACL on Presence Table
Agent availability/status is stored in the sys_user_presence table.
You can create a Write ACL on this table (or specifically on the state field):
Script:
// Deny agents in specific group from changing state
if (gs.hasRole('sn_omnichannel_agent') && gs.getUser().isMemberOf('YOUR_GROUP_NAME')) {
answer = false;
} else {
answer = true;
}This ensures:
- The change is blocked before it happens
- No need for rollback logic
- Better performance and cleaner design
2. Hide the UI Control in Workspace (Optional)
Since this is in Service Operations Workspace, you can also improve UX by hiding the presence toggle:
- Go to UI Builder
- Locate the Agent Presence component
- Apply conditional visibility based on role/group
This avoids confusion for agents since they won’t even see the option.
*********************************************************************************************************
If this response helps, please mark it as Accept as Solution and Helpful.
Doing so helps others in the community and encourages me to keep contributing.
Regards
Vaishali Singh
Servicenow Developer
Linkedin - https://www.linkedin.com/in/vaishali-singh-2273361bb
