- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2023 01:42 PM
HI, in each notification you have the option to set 'From' and 'Reply to' via the 'What it will contain tab'; Although this would require sperate notifications for each message/email domain combination.
If you wish to maintain only 1 notification message across the platform, you could also deliver this via a notification email script and use javascript to set From/Reply To values in your emails
Scripting for email notifications (servicenow.com) - check the example scripts.
- I use notification email scripts in 1 platform I support for 10+ and growing separate email domains.
As notification email scripts have access to the 'current' object and most records have a relationship to company (If your user/email domain records are separated by company?), then I would consider adding from/reply to string fields to your company records and then utilizing these in any notification script as this would minimize admin overhead, and give you flexibility if you need to change existing values or add new email domains.
//Depending on use\platform configuration there are many ways to deliver this type of solution and you might need to dot.walk\test mapping for a number of paths to deliver a single script for all scenarios.
//A basic example for possible 'reply to' solution.
var defaultReplyTo = 'someone@somewhere.com';
if(typeof current.company.u_reply_to != 'undefined') {
defaultReplyTo = current.company.u_reply_to;
} else if(typeof current.task.company.u_reply_to != 'undefined') {
defaultReplyTo = current.task.company.u_reply_to;
} else if (typeof current.opened_for.company.u_reply_to != 'undefined') {
defaultReplyTo = current.opened_for.company.u_reply_to;
}
email.setFrom(defaultReplyTo);