- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi
Can any one please guide me on logic to trigger condition
In Request item any sla is attached - when sla is about to breach with in 48 hours I want to notify assigned to
I wrote flow but no luck
I can't add trigger condition task.table is Ritm
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @srikanthgun
You can do it by either using Flow Or Scheduled Job.
Option1: Using Flow
- Trigger: Record Updated on task_sla.
- Conditions: Stage changes to in progress AND Has Breached is false.
- Action: Use Wait For Duration to wait until 48 hours before Planned End Time.
- Action: Send Email to Task.Assigned to
Option2 : Using scheduled Job
- Navigate to: System Scheduler > Scheduled Jobs > Scheduled Jobs.
- Create New: "AutomaticallyTickle_SLAs_48hr".
- Run: Daily (Frequency set as per your requirement).
Sample code/Not tested:
var grSla = new GlideRecord('task_sla');
grSla.addQuery('has_breached', false);
grSla.addQuery('stage', 'IN_PROGRESS'); // Set query as per your requirement
grSla.addQuery('task.sys_class_name', 'sc_req_item');
// validate if planned end time is within 48 hours from now
grSla.addQuery('planned_end_time', '>=', gs.daysAgo(0));
grSla.addQuery('planned_end_time', '<=', gs.daysAgo(-2));
grSla.query();
while (grSla.next()) {
gs.eventQueue('sla.48hr.warning', grSla.task, grSla.task.assigned_to, gs.getUserID());
}
Associated Notification:
Register sla.48hr.warning in the sysevent_register table.
- Table: Request Item
- When to send: Event is sla.48hr.warning.
- Who to send to: Event parm 1 contains recipient (assigned_to).
- Content: Customize your email subject/body
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hello @srikanthgun, If you want to be specific to Requested Item then you can select as Task.Task Type (as below) in addition to your existing filter conditions:
Regards,
Nishant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @srikanthgun
You can do it by either using Flow Or Scheduled Job.
Option1: Using Flow
- Trigger: Record Updated on task_sla.
- Conditions: Stage changes to in progress AND Has Breached is false.
- Action: Use Wait For Duration to wait until 48 hours before Planned End Time.
- Action: Send Email to Task.Assigned to
Option2 : Using scheduled Job
- Navigate to: System Scheduler > Scheduled Jobs > Scheduled Jobs.
- Create New: "AutomaticallyTickle_SLAs_48hr".
- Run: Daily (Frequency set as per your requirement).
Sample code/Not tested:
var grSla = new GlideRecord('task_sla');
grSla.addQuery('has_breached', false);
grSla.addQuery('stage', 'IN_PROGRESS'); // Set query as per your requirement
grSla.addQuery('task.sys_class_name', 'sc_req_item');
// validate if planned end time is within 48 hours from now
grSla.addQuery('planned_end_time', '>=', gs.daysAgo(0));
grSla.addQuery('planned_end_time', '<=', gs.daysAgo(-2));
grSla.query();
while (grSla.next()) {
gs.eventQueue('sla.48hr.warning', grSla.task, grSla.task.assigned_to, gs.getUserID());
}
Associated Notification:
Register sla.48hr.warning in the sysevent_register table.
- Table: Request Item
- When to send: Event is sla.48hr.warning.
- Who to send to: Event parm 1 contains recipient (assigned_to).
- Content: Customize your email subject/body
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Tanushree Maiti
Thanks for the approach - the flow will trigger for all Tasks exp: Problem, Inc, RITM etc.
I want to trigger for only Request Item - Request type is XYZ.
any logic can you guide me to add condition
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hello @srikanthgun, If you want to be specific to Requested Item then you can select as Task.Task Type (as below) in addition to your existing filter conditions:
Regards,
Nishant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @srikanthgun
Refer: Create a flow with an SLA Task trigger
- Add an If flow logic block.
- Use the data pill picker to select Trigger -> Task SLA -> Task and dot-walk to find Catalog Item.
- Set the condition: [Task SLA -> Task -> Catalog Item] is [XYZ]