Incoming email - prioritizing to critical

mautry
Kilo Contributor

I took out the default on the Urgency/Impact fields to force my technicians to think about the priority and set it properly. Since this has been done, we are having an issue with inbound emails setting the priority to Critical somehow. It doesn't happen with all emails and I haven't discovered what is triggering this. Keep in mind Priority is a calculated field and when this happens, the Urgency and Impact are still set at 'none'. Ideas?

8 REPLIES 8

Hi again.

You had this in your script



if (email.body.priority != undefined)
current.priority = email.body.priority;


This is saying if there is a line in the email that starts with "Priority:" and has a number after it (ie: Priority: 1), it will create a P1 incident. The script is allowing anyone to use that tag to change the priority to anything they want.


mautry
Kilo Contributor

Weird because I looked at the email and nothing said priority. Only thing was it was flagged as High Importance but I had changed it to prioritize to HIGH not CRITICAL in the code:

if(email.importance != undefined)
if (email.importance == "High")
current.priority = 3;

Where the 3 is above there was a 1. I tested with flagging as High in emails afterward and they had a P3 as wanted. How can I comment out the lines that check body of the email? Is there any issue with doing this?


You can comment out any line of code when you prefix it with //.

Ie:



if(email.importance != undefined)
if (email.importance == "High")
{
current.priority = 3;
// gs.log("test");
}


I modified your code a bit to add a commented out gs.log line. Anything that starts with // will not be ran as code.


randrews
Tera Guru

i am betting it comes from the person setting the red critical flag in outlook.