Assigned Catalog task to assignment group user forcefully after few days
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2024 08:40 AM
Currently, our catalog tasks are automatically assigned to an assignment group in the workflow, and their initial state is "New."
I need to add a condition: if a task remains in the "New" state for more than 3 days, it should be automatically reassigned to one of the group members. Additionally, the assignment group owner should be notified.
Could you please advise on the best way to implement this?
Thanks in advance!
- Labels:
-
Request Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2024 09:42 AM
Hi @surajsukuma ,
You can do the following
1. In your workflow add "Wait for condition" activity and the condition like
and state is "New".
2. Add run script activity and get the member of assignment group.
var assignTo ='';
var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('group','group sys id');
gr.query();
if(gr.next()) {
assignTo = gr.user;
}
var gr = new GlideRecord('sc_task');
gr.addQuery('sys_id', 'sc task sys id');
gr.query();
if(gr.next()) {
gr.assigned_to= assignTo;
gr.update();
}
3. cerate a simple notification to send email to assignment group manager. "assigned to changes" add in when to send condition.
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
LinkedIn: https://www.linkedin.com/in/runjay
YouTube: https://www.youtube.com/@RunjayP
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2024 04:06 AM
Thanks, let me try this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2024 05:03 AM
Where should I place the Wait condition and Run Script? after task.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2024 05:25 AM
I will suggest to use Flow designer for this with low-code, no-code
Something like this
Something like this
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader