Email: The sequence of rules
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2016 03:21 AM
I would like to know the sequence in which service now processes incoming emails, and by that I mean, in what order are rules applied?
This is how I expected the process went:
An email is offered to SN:
1) The System Properties - Email take effect, which identify mail or ignore mail via different rules
2) Something triggers watermarks to effect the inbound email
3) The Inbound Actions are processed, since the mail is identified @ step 1 as reply or forward or new and @ step 2 it somehow connected the correct watermark, after which different inbound rules go off
4) The Businessrules on the email table take effect
But then I started logging from the Businessrule and from Inbound Actions, which showed me different results...
Most of the times the loglines from the Businessrule came before those from the Inbound actions, which make it seem as if both are executed at the same time?
So now I needed to check from both sides if either 1 step was already processed...
The Business Rule we use adds the Target Table and Target Document to the email record, in case the Watermark step fails to find it.
After we implemented that Business Rule, we started getting 'Undeliverable'- emails in the ServiceNow mailbox?
This was completely unexpected, because those are filtered out by step 1 System Properties! Or so we thought...
Now to prevent mail-loops from happening I added the System Properties filters to the Business Rule Filter Conditions.
Which defeats the purpose of having those System Properties filters in the first place imho...
But this doesn't prevent those emails from being stored in the Mail-table, be it with status Ignored, but it seems that's how its supposed to work.
So as you can understand we are completely in the dark as how mail is exactly processed, could anyone bring us into the light?
Cheers Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2016 03:51 AM
Hi Chris,
Below link might help you to understand the execution order.
Execution Order of Scripts and Engines - ServiceNow Wiki
Mark Correct if it solved your issue or hit Like and Helpful if you find my response worthy.
Thanks,
Deepa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2016 04:25 AM
Hi Deepa,
Thanks for your (swift!) reaction!
This might just explain why the BR comes first in the logging, I adjusted its order to 1005 now, perhaps the Inbound Actions will go first now.
Unfortunately the link doesn't provide information on the Watermarks, Inbound Actions or the System Property Email settings so that part still remains a mystery, but I can feel some warmth from the light already!