How do I make an inbound action ignore something

johnfeist
Mega Sage
Mega Sage

We have a couple of services that are sending their logs to our ServiceNow instance.  At one point that was necessary.  We are having issues getting them to stop sending.

I have our inbound action for new set up with a typical if this then put it there type of logic.  At the end is a catch all for everything that didn't get assigned elsewhere.  If I have the last step logic trap everything but these logs and do nothing with the logs will they just drop off into never never land or will the system still try to create an incident? 

If that doesn't work, how can I have the logic ignore the logs? (I can't just block the sender.)

Thanks for any suggestions.

:{)

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster
1 ACCEPTED SOLUTION

Mike Patel
Tera Sage

If it's coming from specific user account or to specific email than you can create inbound action and set stop processing checkbox.

How can you identify it's another system sending logs? Do you have any standard short description or anything body?

View solution in original post

5 REPLIES 5

Mike Patel
Tera Sage

If it's coming from specific user account or to specific email than you can create inbound action and set stop processing checkbox.

How can you identify it's another system sending logs? Do you have any standard short description or anything body?

Thank you Mike.  Once I realized that I needed to change the order on my default action, this approach is doing exactly what I need.  For the moment, I also have Brian's suggestion about changing the event state in the script.  I'll do some more testing to see if that's really needed.

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster

Brian Dailey1
Kilo Sage

Hi John,

 

In your logic, you could add a check for the address being sent from, and have the action stop processing on a match.

 

e.g.,

if(email.origemail.indexOf("service_email@yourdomain.com") != -1){
   event.state="stop_processing";
}

 

I think I would add checks like this to the beginning of your IEA script rather than the end, why have it go through all that other processing if you're going to abort in this instance.  Another alternative would be to create a Business Rule on [sys_email] that catches the message record as it is being created, and sets the message Type to 'received-ignored'.  Then your inbound action won't process it at all.

 

Thanks,

-Brian

Thanks Brian.  Your suggestions are very interesting, especially using the business rule.  So far I haven't been able to make that work, but I'll keep experimenting with it because I really like the concept.

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster