I want an ITIL user to be able to send their own automatic email

pa43
Tera Contributor

Hi,
the request is that, the call center team's manager wants to send Out Of Office emails whenever their team is on holiday. 
So whenever an incident is assigned to the call center team when they're on holiday, an OOO email needs to be sent to the requestor automatically.
We initially created hard code for this but, the manager wants to be able to set his own start date, end date and write his own email content. So that whenever an incident is assigned to their team during those dates, the OOO mail is triggered. 

can anyone help me with various possibilities to achieve this? 

2 REPLIES 2

Community Alums
Not applicable

Hi @pa43 ,

 

We have similar setup where if the assigned group is OOO the requestor gets a notification that the Group is OOO with the relevant message(Message is stored in the custom table). Please note that this is completely custom solution nothing to do with OOTB- Please follow the below process:

First you need to create a custom table to store the Out of Office (OOO) information and then event is fired from the notification

  • Step 1: Create a Custom Table for OOO
    Create a table - u_ooo_schedule with appropriate label
    Table Name: u_ooo_schedule
    Add below mandatory fields:
    Group (u_group): Reference field to sys_user_group
    Start Date (u_start_date): Date/Time
    End Date (u_end_date): Date/Time
    Message (u_message): String
    Active (u_active): Boolean
  • Step 2: Create a Event
    Name: incident.ooo_notification
    Table: Incident
  • Step 3: create BR on insert and update on Incident table
    Advanced Scriot to trigger the event:
var assignedGroup = current.assignment_group;
if (assignedGroup) {
var now = new GlideDateTime();
var grOOO = new GlideRecord('u_ooo_schedule');
grOOO.addQuery('u_group', assignedGroup);
grOOO.addQuery('u_start_date', '<=', now);
grOOO.addQuery('u_end_date', '>=', now);
grOOO.addQuery('u_active', true);
grOOO.query();
if (grOOO.next()) {
// Trigger the event
gs.eventQueue('incident.ooo_notification', current, grOOO.u_message, current.opened_by.email);
}
}
  • Step 4: Create a Notification
  • Name: OOO Notification
    Table: Incident
    When to send: Event is fired
    Event name: incident.ooo_notification
    Who will receive: Event Parm 2 (This will be the email address passed in the event)
    Subject: Out Of Office Notification
    Message HTML:
  • ${event.parm1}
    //OOO message that was passed in the event.

 

If my response has resolved your query, please consider giving it a thumbs up ‌‌ and marking it as the correct answer‌‌!

Thanks & Regards,

 

Sanjay Kumar

Mark Manders
Mega Patron

This will be a custom solution, no matter what. The use of a custom table because a manager wants something may be overdoing it, but with these requirements, it's the only thing you can do.

Why not change the requirement: put an auto reply on every email coming in, creating or updating an incident assigned to this team and put the OOO date/times in the signature? It's a more customer friendly approach in my eyes than an email stating 'thank you, we won't be picking this up until we're back'.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark