- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2022 10:27 PM
Hi All,
Actually i have a requirement that we have two fields caller and logged user, So whenever i request a incident on behalf of someone i need to sent email to caller?
1.And here two conditions are there like if caller and logged user same then we need to send email only caller
body contans like
incident opened
short description
descrition
portal link
2.second condition was like if caller and logged user different need to sent email to caller?
body
incident was opened on behalf by (created by name)
short description
descrition
portal link
need to check the condition and then sent a mail?
This was achieve in only one notification , please help me to achieve this?
Thanks
Deepika
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2022 11:58 PM
You can write email script
like
if (current.caller == current.u_logged_user){
template.print("incident was opened on behalf by "+current.u_logged_user.getDisplayValue());
}
else {
template.print("incident opened "+current.caller_id.getDisplayValue());
}
In the notification email body you can use
${mail_script:<name of the email script>}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2022 11:35 PM
Hello,
In notification, you can add condition like below
For 1st scenario
For 2nd Scenario
I have used Opened by field so you can replace with your field, Rest of the content you can add easily
Mark my answer as correct if that helps
Regards
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2022 11:49 PM
Hi Rasheed,
Thanks for the response,
Actually basically i need to check the both the condition and then send a single email notification only for both senarios
As i thought may we can do it by check the condition in email script ?
So please provide those script to validate the conditions
Thanks
Deepika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2022 11:58 PM
You can write email script
like
if (current.caller == current.u_logged_user){
template.print("incident was opened on behalf by "+current.u_logged_user.getDisplayValue());
}
else {
template.print("incident opened "+current.caller_id.getDisplayValue());
}
In the notification email body you can use
${mail_script:<name of the email script>}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2022 12:19 AM
Hi Survo,
Thanks for the code, its work for me.