How to trigger an event for outgoing emails
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2016 06:02 AM
Notifications to a watch list can be set up for incident.commented and incident.updated (events defined in the OOB business rule) but emails sent from within an incident are not treated as comments or updates so do not trigger either event and their associated notification. What I am struggling to find is what to put into the business rule to cause an outgoing email added to the activity stream of an incident to fire an event. Has anyone else managed to do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2016 10:01 AM
Hi Anne,
Do you mean that emails sent form email client of incident form, does not get attached to activity logs?
If i remember correctly, even these emails gets attached to the activity log as well.
Or do you require that emails sent from email client should also be sent to watch list or work note list users?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2016 10:12 AM
Hi Deepak,
Emails sent from an incident either to the caller or to a third party are being added to the activity stream correctly. However, staff who put themselves on the watch list for an incident are not receiving a notification to tell them that the incident has been updated when such an email is being sent.
In testing this, I have found that even though the outgoing email is written to the activity stream in the incident, it does not fire the 'incident.commented' event (presumably because it is not being written to the activity stream as a comment but as formatted html) nor does it fire the 'incident.upated' event (this appears to be because the 'udpated' date/time field of the incident is not being updated when the email is sent).
So I am trying to find out how to define an event to add to the 'incident events' business rule in order to ensure an event is fired when an email is sent from an incident so that I can create a notification to be sent to the watch list.
Regards,
Anne.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2016 05:49 AM
Hi Anne,
The easiest way I can think of without modifying business rule is with following method.
1) Create a new email client template using "Client Templates" module on incident table.
2) Add below mail script tag inside the body section.
<mail_script>
current.comments = "Email has been sent using email client on form, please check incident for updates";
current.update(); // update the additional comments whenever email is sent using email client template so it sends notification to watch list as well
</mail_script>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2018 12:38 PM
Did you ever find a solution to this? I am trying to do something similar.
When an agent uses the email client, I want to detect if the "Requested for" user was a recipient, and then update a field "Last User Update Provided Date".
Thanks,
- James