I came across a number of requests for creating a task so that an analyst can e-mail the “affected user” directly from the console in the context of an incident. This blog post demonstrates how easy it is do so.
You’ll need to be at least an Author or an Admin to create the task described in this post.
1. Click on the Library workspace in the Service Manager console
2. Select Tasks in the navigation pane
3. Click Create Task in the Tasks Pane
4. This should open up the Task Wizard
5. First page is just brief overview
6. In the second step you’ll need to enter the Task name, Description. Target Class and select an MP where you want the Task to be stored
a. For the class name, select Incident from the class picker. Now the task will only show up in context of an incident.
b. For MP it is recommended that you store custom tasks in your own MP. This makes the tasks portable, i.e. all you need to do is import the MP in another environment to create the same task in that environment.
7. You can ignore the next page i.e. the Categories page, because in this case the task only makes sense when you select an incident
8. For the command line page there are two sections:
a. Full path to the command: This is pretty straightforward, you just need to type in the full path to the IE browser “c:\Program Files (x86)\Internet Explorer\iexplore.exe”
b. Parameters: This gets tricky since this contains text and contextual parameters. We need this string mailto:<usernmae>&subject=<Title>&body=<Descripton> with the <strings> replaced with contextual parameters. Here is a step-step on how to do it
i. In the Parameters’ box Type mailto:
ii. Click on Insert Property.
1. This should bring up a property picker. On the left-nav pane, click on the expander before Incident
2. This should show all the relationships on Incident
3. Scroll down and select Affected User
4. Now on the right half type user in the search box
5. This should narrow down the list of properties
6. select User Name
iii. Type &subject=
iv. Click on Insert Property.
1. This time just type Title in search box on right
2. Select Title
v. Type &body=
vi. Click on Insert Property.
1. This time just type desc in search box on right
2. Select Description
c. You are almost done. You should have something like this (you can copy and paste the text below if you wish):
d. Checking the box for Action Log, records that you actually launched the task
9. Finish up the wizard and create the task
Now this task should appear whenever you select an incident.
On clicking the task, browser should open up, but then it should open up your e-mail client with username as addressee, title of incident as the subject of email and description of incident as the body of the email. Just one caveat, if the affected user, title or description is blank, the task form opens an input dialog as it’s expecting a value.
As always comments / suggestions welcome.
What if I would like to use another program for sending emails, like blat or telnet; how would I be able to pass the affected end users e-mail address as an argument when creating the task? I can't find this property in the affected end user class.
Ty for good blog-posts :)
Some suggestions to enhance this:
1. The parameter separator after the username should be a '?' not '&'.
2. The body may not be picked up unless you put the whole mailto tag in quotes
3. You can avoid the "not so cool looking" IE window by using rundll32.exe instead as follows :
Command line: c:\windows\system32\rundll32.exe
Parameters: url.dll,FileProtocolHandler "mailto:<username>?subject=<Title>&body=<Description>"
Note 1: The entire mailto tag and all its parameters are in quotes
Note 2: Each time you edit the task, the editor will escape the '&' parameter separator after the username to '&' and continue to and 'amp;' every time you edit. This will cause problems with the e-mail body. You need to clean these up before saving, so you have just the '&'
Note 3: The "[To user@domain]" entry at the top of the description of e-mail incidents seems to cause problems in my environment. If you get an outlook error saying the command line parameters are not valid, try stripping that line from your incident description.