- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 10:43 AM
Hello!
I am needing to change a variable in an incident based on the keywords of High or significant within the body of an email. If the email contains Severe then I would want to have the Priority changed to 1-High and if the body contains Warning I would want the Priority to be set to 2-Significant.
Any help with this would be great!
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 01:14 PM
So I was able to get Critical to work but not what I needed for Warning.
var emailBody = email.body;
if (emailBody.indexOf ("Critical") != -1) {
current.impact = 1;
current.urgency = 1;
} else if (emailBody.indexOf ("Warning") != -1) {
current.impact = 1;
current.urgency = 2;
}
current.insert();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 11:30 AM - edited 11-14-2023 11:35 AM
Hi @Justin Dirks1 ,
You can update the Inbound Email Action and read email body for keyword via email.body and apply indexOf for checking the keywork "Severe" or "Warning".
Make sure you update the impact & urgency because priority depends on these two fields value and "Priority Data Lookups" rule applied when incident form is saved.
-Thanks,
AshishKMishra
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 12:01 PM
Thank you! I am giving it a try now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 12:16 PM
Sure, let me know if it is working or not.
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 01:14 PM
So I was able to get Critical to work but not what I needed for Warning.
var emailBody = email.body;
if (emailBody.indexOf ("Critical") != -1) {
current.impact = 1;
current.urgency = 1;
} else if (emailBody.indexOf ("Warning") != -1) {
current.impact = 1;
current.urgency = 2;
}
current.insert();