Inbound action is not working

tGhadage
Tera Contributor

Hello Guys, 

 

I have written a script in inbound action where if the subject contains " Escalation: High " and if the mail is coming from for eg.

"tushar.ghadage@test.com" (have changed the mail-Id) then it should create a p2 incidents. 
 
But it's creating an incident for all the subject lines. 
 
Here is the Inbound script:
 if (email.subject.contains("Escalation: High") && email.recipients.toLowerCase().indexOf('tushar.ghadag@test.com') > -1) {
            current.impact = 2;
            current.urgency = 2;
            current.priority = 2;
            current.insert();
        }  
 
Here is the screenshot for incident that it created: 
Screenshot (181).png
Here subject does not contain "Escalation: High" still it created an incident for it.
 
Any help or answer would be really appreciated. 
 
Thank You!!
 
 
 
5 REPLIES 5

I believe your notification is not triggering. " Incident opened for me " this notification is triggering
please change the weight value of your notification and check


***Mark Correct or Helpful if it helps.***