Conditional Logic on Email Notifications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
For email notifications, is it possible to use conditional logic for what the email will contain? For instance, if the short description contains "application related request" then add another piece of information like the long description?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
You can build the entire mail in the script if it satisfies a need. We wanted to send out a tailored report of a specific table but not just a list, a list divided into 3 sections dependent on the state of the record and each entry had links to take you to the record or submit catalog items against that record.
It was for managing system lifecycles so the links allowed you to look at the Computer CI, submit a decommission, cancel a decommission - that sort of thing. ...but that's just the example we had, you could put anything in there. All the mail script did was build the content of an HTML page (we wanted tables and links) with all that data and push it back as the mail body.
We had a scheduled task to trigger it based on certain conditions (we didn't want to send it to people with no relevant records). That scrip only had to pass the user to the mail notification and then the mail script worked from the user to all the data (CIs, RITMs, Change Requests) that needed to go in the "report" (the HTML).
Simple 🙂