- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2019 04:12 AM
Hiii,
I have requirement to create one notification and trigger multiple content mails based on some conditions.
ex: once request created there is a mail going with request has been created. so in same notification i want to change the content only for one catalog item, means for abc item, different content mail should trigger.
how can we achieve this.
Regards,
Roopa
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2019 09:14 AM
you can trigger the notification based on condition as well you can add the condition in email script .
adding sample Email script here.
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
// Add your code here
if(current.state==1){
email.setSubject('Hi Good Morning !!');
template.print('Welcome To Servicenow' + "<br/> State: " + current.state.getDisplayValue());
}
else{
email.setSubject('Hi Good Night !!');
template.print('Welcome To Servicenow Community' + "<br/> State: " + current.state.getDisplayValue());
}
})(current, template, email, email_action, event);
Note: here what i did, if my RITM state is open then notification will trigger with good morning subject else it will set the email subject good night. you can make some modification in email script based on your need.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2019 05:16 AM
Hello,
I think you can achieve this by email scripts. You can set different email content based on the catalog item in notification email scripts.
Regards,
Jagadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2019 05:23 AM
Thanks Jagadeesh for reply..
Not getting how to start with it. can u please help if u have done the same.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2019 05:29 AM
Sure.. Could you please confirm if you are using OOB notification which sends emails to all the requests raised? If the notification content has to be changed for one catalog item alone, we can find a much better solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2019 05:50 AM
yes ,OOB notification