- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2020 11:18 PM
Hi All,
How to set incident priority from email subject (Inbound Action - Create Incident)?
Please find the below email subject :
Detailed Notification - XXXX- Priority - 2 - High - Moderate- Ticket number - INC00001- Offense ID - 11111
OR Do we need to use use colon separate as like below
Company: XXXX - Priority : 2 - High - Moderate - Ticket number: INC00001 - Offense ID:11111
Please help me to get the subject line format and how to set it priority from subject line also?
Regards,
sruthi
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2020 11:32 PM
Priority is a calculated field. So based on the priority from the email, you should set the Impact and Urgency on the incident. You can do this using the following format. Add this to your existing inbound action script:
You can add as many else if statements as you have priorities
if (email.subject != undefined) {
if (email.subject.indexOf('priority - 2') != -1){
//OOTB impact 1 and urgency 2 = priority 2
current.impact = 1;
current.urgency = 2;
}
else if (email.subject.indexOf('priority - 3') != -1){
//OOTB impact 1 and urgency 3 = priority 3
current.impact = 1;
current.urgency = 3;
}
else if(){
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2020 11:23 PM
Hi Sruthi,
please try to use the code described in the below thread:
Hope this can fit your need.
If I have answered your question, please mark my response as correct and/or helpful.
Thank you very much
Cheers
Alberto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2020 11:32 PM
Hi Alberto,
Thank you for the response.
I have to set priority field from Subject line of an email not from body or email importance of the email.
Regards,
sruthi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2020 11:32 PM
Priority is a calculated field. So based on the priority from the email, you should set the Impact and Urgency on the incident. You can do this using the following format. Add this to your existing inbound action script:
You can add as many else if statements as you have priorities
if (email.subject != undefined) {
if (email.subject.indexOf('priority - 2') != -1){
//OOTB impact 1 and urgency 2 = priority 2
current.impact = 1;
current.urgency = 2;
}
else if (email.subject.indexOf('priority - 3') != -1){
//OOTB impact 1 and urgency 3 = priority 3
current.impact = 1;
current.urgency = 3;
}
else if(){
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2020 01:01 AM
Hi Willem,
Thanks for the response.
I had used below condition in my inbound action. It's working as expected.
if (email.subject.indexOf("Priority - 1") >= 0)
{
current.impact = 1;
current.urgency = 1;
}
else if (email.subject.indexOf("Priority - 2") >= 0)
{
current.impact = 1;
current.urgency = 2;
}
Thanks
Sruthi