Applying 'Employee notification template' to Notifications that already use a template
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2024 09:56 AM
We're currently moving from /sp to /esc and are doing a review of email notifications. We want to apply the 'Employee notification template' to as many Notifications as possible to be consistent in branding and make things look nicer. Something I've run into are that many Notifications - namely those on sc_task and change_request - are using templates to populate the email body, instead of using mail scripts or variables directly within the Notification configuration.
I'm wondering what the best approach to updating these kinds of Notifications is? We want to stay OOB as much as possible in terms of the population of the email itself, but we want to apply the pretty template. Should we deactivate the OOB Notification and create a custom one for each conditional scenario that can use the Employee notification template? Or should edit the OOB Notification to use a custom mail script/variables within the Notification itself?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2024 10:49 AM
It's generally advisable to stay as close to out-of-box (OOB) functionality as possible for easier upgrades and maintenance.
There are many ways in handling this issue, we had faced similar issue and had given multiple thoughts and went to use custom approach as below,
- Deactivate the OOB notification (active false)
- Create a copy OOB notification
- Use the Employee notification template
- Pros: Clean implementation, full control
Modifying OOB objects can complicate during upgrades.
There is also another way using hybrid approach as below,
- Keep OOB notifications active
- Create a custom "wrapper" notification
- Use the Employee notification template in the wrapper
- Include the content from the OOB template within the wrapper
Please mark if this is helpful.
Thanks
Sravani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @Oliver Anderson,
Great question. This is a common challenge when standardising notifications. The best practice is to use an Email Layout for branding while dynamically inserting the OOB content via a Mail Script.
This approach avoids disabling OOB notifications and ensures your instance remains upgrade-friendly.
Key Takeaways
* Layout vs. Template: Use Email Layouts (sys_email_layout) for your branding (header/footer) and Email Templates (sys_template) for the body content. You can't apply both directly in the notification form.
The Solution:
* On the OOB notification record, clear the Email template field.
* Apply your branded "Employee notification template" in the Email layout field.
* In the Message HTML body, use a <mail_script> to query and print the content from the original OOB template. This keeps the OOB content logic intact.
* Why it's Best Practice: This method is highly upgrade-safe. If ServiceNow updates the OOB content template in the future, your notification will automatically inherit the changes. It also prevents the technical debt that comes from deactivating OOB records.
This strategy will give you the consistent branding you want while aligning with platform best practices for maintainability.
Thanks,
Divya Shah.