Inbound Email Action - Conditions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2024 07:52 AM
I have an Inbound Email Action that creates an incident, if the email comes on Saturday or Sunday. The condition is specified as shown below - (note: I have included only the relevant part of the condition)
The above, works well and an incident is created if the email arrives on week-ends (Saturday/Sunday).
I want to include all holidays in the above condition, so that it would look some thing like -
But such an option does not exist.
We have a holiday calendar, used for computing the SLA durations and business hours to exclude week-ends and holidays. Is there any way I can use that calendar to check if my inbound Email arrives on a holiday? How may I write a script to check inbound email date against the holiday calendar?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2024 08:08 AM
I don't think you can add that condition in the condition builder.
You will need to add that logic in your script.
The key is to determine the schedule that holds your holidays (There should be one OOB, locate it in your cmn_schedule table). And then use a function called isInSchedule().
Checkout the script provided by Kamal here:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2024 09:52 PM - edited ‎08-21-2024 09:54 PM
AnirudhKumar, thanks for your suggestion.
But that won't work, simply because you can not use a script to specify 'When to run' condition(s) for inbound email action. You have to specify conditions by using the drop-down values for the available variables in the incoming email. The script you suggested would work in a Business Rule.
In my case, the email arrives from a remote smart device that monitors our network. And if it arrives on a week-end, I have to create an incident. Inbound Email Action does that job well. Now, I am looking for a solution whereby if the email arrives on any statutory holiday, it will still create an incident. I guess, the only solution is to enter all statutory holiday dates in 'When to run' condition.
Thanks, again.