I was working at a client site this past week who had quite a unique requirement in terms of Incident and Service Request notifications. They wanted the ability, from within a ticket, to email any user or group a message and then add that message to the Action Log. Basically they wanted similar functionality that is in the SendEmail task, but have the ability to choose any user or group to send the message to on the fly.
In this first post, I'll show you how it works. Then in the next post, I'll show you how to build it. For demonstration purposes, I will just show an IR but this solution can be extended to work with other Work Items like Service Requests and Problems.
When you open an IR, there is a new tab that contains our new controls. The first section is the Message section. Here we have a textbox where we can enter in our message and a Private checkbox to indicate if we want the message to be private or not. Since our client plans to use this feature as a way to communicate internally within their IT organization, this box is checked by default.
The second section is called Watchers. This ListView can serve multiple purposes. The first is if you want to configure some users or groups that always get notified when anything is updated on the IR. This can come in handy when analysts go on vacation or if you want to make sure when an IR is opened for the VPs, their Admin Assistants get notified as well when their ticket is updated.
For our scenario, this section acts as the To field for our message. We have the ability to add or remove people from this list depending on who we want to receive the message.
So let's test! We add a message into the field and configure a user to receive the message and click the Send button.
What this does is add the message to the Action Log and then blanks out the Message field, much like how the out-of-box Action Log works.
NOTE: Just like the out-of-box Action Log, the comment will not be committed to the database until you click the Apply or OK button. You can configure your custom buttons to also apply your changes but I wanted to stay consistent with how the out-of-box form functions.
So this gets the message into the Action Log, but what about the email? Using the wonderful Orchestrator notification technique built by Nate, our Orchestrator guru, as our base, we can send the email to all of our Watchers. We can also configure it to send the email to any user/group related to the IR, like the Assigned To User.
In the next post I will get into the specifics of the different activities in this Runbook, but the last piece I want to point out is the Update Comment activity. As the Runbook processes each user/group to send the email to, it writes the email address to a text file. We then can update the Action Log comment with who was notified for a particular message. This can be helpful when we want to go back and see who was notified on a particular message.
Now that our Runbook has processed, we can go back into the IR and see the updated comment (My email is listed twice since I was on the Watchers list and am the Assigned To User, which is also configured to automatically receive these emails).
And we also received our email.
Stay tuned for the next post where we'll dive into how all of this gets put together.
Until the Whole World Hears,