HR Case Email Templates showing if different Application

Rob Sestito
Mega Sage

HR Email Templates

 

Hello SN Comm,

I have been going through email notifications and their templates as I am in the middle of an upgrade/migration from non-scoped to scoped applications. When looking at email notification 'HR Case Opened' it is using the email template, 'sn_hr_core_case.ess.general'. When I open that email template record, it shows the following message:

find_real_file.png

Can anyone tell me if this is normal or not? I am confused as to why an email template for an HR Case - would show its record as being under the SP application. If anyone is able to answer, that would be great!

Thanks,

-Rob

1 ACCEPTED SOLUTION

hollysnyder
Mega Guru

Hi Rob!

You'll notice that there are two similar baseline email templates: sn_hr_core_case.hr.general and sn_hr_core_case.ess.general

The sn_hr_core_case.ess.general email template is in the Service Portal application, because this is the template you would want to use on emails that direct the user to the Service Portal. In the email template, the mail script get_hr_uri is used which generates the URL for the case view on the portal. In the specific example you use, the HR Case Opened email would go to the user who opened the case or the user the case is opened for. They would typically access cases via Service Portal.

The sn_hr_core_case.hr.general email template is in the Core application, because this is the template you would want to use on emails that direct the user to the native UI case view. HR Case Worknoted would be an example of an email notification using this email template. That email would go to the case assigned_to who would access the case via the native UI.

Hope this helps! 🙂

View solution in original post

5 REPLIES 5

hollysnyder
Mega Guru

Hi Rob!

You'll notice that there are two similar baseline email templates: sn_hr_core_case.hr.general and sn_hr_core_case.ess.general

The sn_hr_core_case.ess.general email template is in the Service Portal application, because this is the template you would want to use on emails that direct the user to the Service Portal. In the email template, the mail script get_hr_uri is used which generates the URL for the case view on the portal. In the specific example you use, the HR Case Opened email would go to the user who opened the case or the user the case is opened for. They would typically access cases via Service Portal.

The sn_hr_core_case.hr.general email template is in the Core application, because this is the template you would want to use on emails that direct the user to the native UI case view. HR Case Worknoted would be an example of an email notification using this email template. That email would go to the case assigned_to who would access the case via the native UI.

Hope this helps! 🙂

Hi Holly,

 

I have played around with the details, and have found that the sn_hr_core_case.ess.general mail script in our instance as well as my PDI does not take the user to the portal, but rather the native UI

I have created my own mailscript for hr_portal links, in case anyone else stumbles across this post:

(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
          /* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
          /* Optional GlideRecord */ event) {
	
	var url = gs.getProperty('glide.servlet.uri') + 'hrportal?id=hrj_ticket_page&sys_id=' + current.sys_id;
	template.print('<strong> <a href="' + url + '">' + current.number + '</a> </strong>\n');

})(current, template, email, email_action, event);

would you happen to know how to get access from the notification record to the scoped email template?

 

I made a copy of 'sn_hr_core_case.ess.general' template to make some tweaks to it specific to our customer but when I go to an OOB notification record such as 'Empl Relations Case opened' and attempt to select the new template it says its an invalid record and the only templates availble for selection as the following:

I made a copy of 'sn_hr_core_case.ess.general' template to make some tweaks to it specific to our customer but when I go to an OOB notification record such as 'Empl Relations Case opened' and attempt to select the new template it says its an invalid record and the only templates available for selection as the following: