Email should be triggered when there is no assigne for 24 hours

James_9
Giga Contributor

Hello. Can someone please help me with the below requirement

 

Whenever an Incident or SCTASK is being reassigned and if there is no assignce for more than 24 hours an automated SNOW email is to be triggered to the support manager, the support group email of the reassigned group.

1 ACCEPTED SOLUTION

Akshay Gupta2
Kilo Sage

HI @James_9 

 

You can accomplish this in no of ways. Either with Business Rule or Flow/Workflow.

 

With Business Rule - 

 

  1. Create a Business Rule: You'll need to create a business rule in ServiceNow that triggers whenever an Incident or SCTASK is reassigned.

  2. Define the Condition: Within the business rule, define the condition that checks if the assignment group has changed and if there's no assignee for more than 24 hours.

  3. Send Email Action: Implement an action within the business rule to send an email notification. This email should be sent to the support manager and the support group email of the reassigned group.

  4. Set a Timer: Additionally, you can set a timer within the business rule to check if there's no assignee for more than 24 hours. If the condition is met, trigger the email action.

  5. Testing: Ensure to thoroughly test the business rule to verify that it behaves as expected.

 

Flow/WorkFlow - 

 

  1. Create a Flow/Workflow: Depending on the version of ServiceNow you're using, create a flow (for newer versions) or a workflow (for older versions).

  2. Trigger: Define the trigger point for the flow/workflow. This should be when an Incident or SCTASK is reassigned.

  3. Condition: Implement a condition in the flow/workflow that checks if there's no assignee for more than 24 hours.

  4. Send Email Action: If the condition is met, add an action to send an email notification to the support manager and the support group email of the reassigned group.

  5. Testing: Thoroughly test the flow/workflow to ensure it functions correctly and meets the specified requirements.

Remember to consider any specific configurations or nuances within your ServiceNow instance while implementing this solution. Additionally, ensure that proper permissions are set for accessing and executing the flow/workflow.

 

Do give thumbsup if this works for you!

 

Thanks

Akshay

View solution in original post

11 REPLIES 11

Hi @James_9 ,

 

You can run the scheduled Job periodically after every minute. 

 

Thanks,

Danish

Try gs.eventqueuescheduled method on Scheduled Job

 

Please find the below script:

 

var gr = new GlideRecord('incident');
gr.addQuery('active','true');
gr.query();
if(gr.next()){
var when = new GlideDateTime(reassigned date&time);
when.addDaysLocalTime(1);
gs.eventQueueScheduled("24hour.incident", gr, '', '', when);
}
 
please mark it helpful if it was.
 
 
Regards,
Deborah
 

Sohail Khilji
Kilo Patron
Kilo Patron

Hi @James_9 

 

You would need to set the notification Send When field to Event is fired.  Then use a scheduled job to check if the field is assigned at whatever interval you need, and if it is empty, fire the event which will trigger the notification. i hope this helps...

 


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

Akshay Gupta2
Kilo Sage

HI @James_9 

 

You can accomplish this in no of ways. Either with Business Rule or Flow/Workflow.

 

With Business Rule - 

 

  1. Create a Business Rule: You'll need to create a business rule in ServiceNow that triggers whenever an Incident or SCTASK is reassigned.

  2. Define the Condition: Within the business rule, define the condition that checks if the assignment group has changed and if there's no assignee for more than 24 hours.

  3. Send Email Action: Implement an action within the business rule to send an email notification. This email should be sent to the support manager and the support group email of the reassigned group.

  4. Set a Timer: Additionally, you can set a timer within the business rule to check if there's no assignee for more than 24 hours. If the condition is met, trigger the email action.

  5. Testing: Ensure to thoroughly test the business rule to verify that it behaves as expected.

 

Flow/WorkFlow - 

 

  1. Create a Flow/Workflow: Depending on the version of ServiceNow you're using, create a flow (for newer versions) or a workflow (for older versions).

  2. Trigger: Define the trigger point for the flow/workflow. This should be when an Incident or SCTASK is reassigned.

  3. Condition: Implement a condition in the flow/workflow that checks if there's no assignee for more than 24 hours.

  4. Send Email Action: If the condition is met, add an action to send an email notification to the support manager and the support group email of the reassigned group.

  5. Testing: Thoroughly test the flow/workflow to ensure it functions correctly and meets the specified requirements.

Remember to consider any specific configurations or nuances within your ServiceNow instance while implementing this solution. Additionally, ensure that proper permissions are set for accessing and executing the flow/workflow.

 

Do give thumbsup if this works for you!

 

Thanks

Akshay

James Chun
Kilo Patron

Hi @James_9,

 

This sounds like a job for SLA, you should create a 'Response' SLA Definition, and within its workflow, you can trigger an email notification.

 

Thanks