This project is read-only.

Version 1.0

Reminder: SendEmail 1.0 is not officially supported by Microsoft

SendEmail Overview

The purpose of the SendEmail solution is to allow the Service Desk console user to send email notifications to other users regarding a particular incident. The solution uses standard notification templates and workflow/notifications to send the emails. The way the solution works is by extending the incident class with two additional properties – Message Type and Message. As you will see later the Message Type determines which notification template will be used to send the Message.

The following steps outline a scenario to better understand the purpose and experience. The scenario is that an analyst is working on an incident and needs to request additional information from the affected user.

1) The analyst opens the incident (or selects it in a view without opening the form)

2) The analyst click the Send Email task link in the task pane

3) The analyst fills out the form by specifying the message to send to the user, selecting the message type, and optionally adding the message to the action log.

clip_image001[4]

4) If the analyst has the incident form open he can see that a new message type value has been selected and the message property is filled in.

clip_image002

clip_image003

The message is added to the action log.

clip_image005

5) A few seconds later the affected user should receive an email like this:

clip_image006

Deployment

1) Import the SendEmail.mpb file

Configuration

1) Customize the Message Type list to add whatever message types you like. Select Message Type in the Library\Lists view and click the Properties link in the action pane.

clip_image007

Click Add Item in the List Properties dialog.

clip_image009

When you click Add Item You will be prompted to select a management pack to store your customizations in. It is recommended to create a special management pack for all customizations related to the Send Email solution.

clip_image011

You can add as many message types as you like and they can be organized hierarchically if you want.

redeploy the SendEmail solution.

clip_image013

2) Create notification templates for whatever scenario makes sense. Example: Create a notification template to send a notification to the affected user whenever the Message Type is ‘Request Additional Info From Affected User’.

a. Go to the Administration/Notifications/Templates view

b. Click Create Email Template in the tasks pane on the right

c. Provide a name, target the Incident class, and put the template in the ‘SendEmail Customizations MP’ that you created above.

clip_image015

Click Next

d. Format the notification template something like this:

Make sure you use the Insert… button to insert the properties ($...$) and don’t just type them in.

clip_image017

Two notes:

· If you are going to use the Exchange Connector to process incident email replies make sure you include the Work Item ID in square brackets in the subject.

· Include the Message property value wherever you like in the message body.

Click Next

e. Click Create

f. Click Close

3) Create Incident Event Workflows for whatever scenarios make sense. Example: Create a notification to the affected user whenever the message type is ’Request Additional Info From Affected User’.

a. Go to the Administration/Workflows/Configuration view.

b. Select Incident Event Workflow Configuration. Click Properties.

c. Click Add.

d. Fill out the general properties something like this:

clip_image019

Note: Select the same SendEmail Customizations MP that you created above.

Click Next

e. Set the criteria to be:

Change From

Changed To

clip_image021

clip_image023

Click Next.

i. Choose Do not apply a template (unless you want to)

Click Next

ii. Check ‘Enable notification’, choose to send the email to the affected user (or the appropriate recipient depending on your scenario) with the new template you just created.

clip_image025

Click Next

iii. Click Create

iv. Click Close

v. Click OK

4) Now the MP XML needs to be manually edited to get the subscription criteria right. This is necessary because the UI doesn’t provide a way to create this kind of subscription criteria that the subscription infrastructure supports.

a. Go to the Administration\Management Packs view to export out this MP so the XML subscription criteria can be changed. Export out the MP XML file by selecting the ‘SendEmail Customizations’ MP and clicking the Export task.

b. Open the XML file in an XML editor.

c. At the top of the XML file increment the version number from 7.0.5826.0 to 7.0.5826.1

For example from:

clip_image026

To:

clip_image027

d. Search for <UpdateInstance> - you’ll see some XML that looks like below on the left.

e. Being very careful to get the nesting of the XML elements correct. Change the criteria to this:

Before

After

<Criteria>

<Expression>

<And>

<Expression>

<UnaryExpression>

<ValueExpression>

<Property State="Pre">$Context/Property[Type='SendEmail!IncidentSendMailExtension']/Message$</Property>

</ValueExpression>

<Operator>IsNull</Operator>

</UnaryExpression>

</Expression>

<Expression>

<And>

<Expression>

<SimpleExpression>

<ValueExpression>

<Property State="Post">$Context/Property[Type='SendEmail!IncidentSendMailExtension']/MessageType$</Property>

</ValueExpression>

<Operator>Equal</Operator>

<ValueExpression>

<Value>{9f6d72ad-1bff-ca89-f619-8d50cd876576}</Value>

</ValueExpression>

</SimpleExpression>

</Expression>

<Expression>

<UnaryExpression>

<ValueExpression>

<Property State="Post">$Context/Property[Type='SendEmail!IncidentSendMailExtension']/Message$</Property>

</ValueExpression>

<Operator>IsNotNull</Operator>

</UnaryExpression>

</Expression>

</And>

</Expression>

</And>

</Expression>

</Criteria>

<Criteria>

<Expression>

<Or>

<Expression>

<And>

<Expression>

<UnaryExpression>

<ValueExpression>

<Property State="Pre">$Context/Property[Type='SendEmail!IncidentSendMailExtension']/Message$</Property>

</ValueExpression>

<Operator>IsNull</Operator>

</UnaryExpression>

</Expression>

<Expression>

<And>

<Expression>

<SimpleExpression>

<ValueExpression>

<Property State="Post">$Context/Property[Type='SendEmail!IncidentSendMailExtension']/MessageType$</Property>

</ValueExpression>

<Operator>Equal</Operator>

<ValueExpression>

<Value>{9f6d72ad-1bff-ca89-f619-8d50cd876576}</Value>

</ValueExpression>

</SimpleExpression>

</Expression>

<Expression>

<UnaryExpression>

<ValueExpression>

<Property State="Post">$Context/Property[Type='SendEmail!IncidentSendMailExtension']/Message$</Property>

</ValueExpression>

<Operator>IsNotNull</Operator>

</UnaryExpression>

</Expression>

</And>

</Expression>

</And>

</Expression>

<Expression>

<And>

<Expression>

<SimpleExpression>

<ValueExpression>

<Property State="Pre">$Context/Property[Type='SendEmail!IncidentSendMailExtension']/Message$</Property>

</ValueExpression>

<Operator>NotEqual</Operator>

<ValueExpression>

<Property State="Post">$Context/Property[Type='SendEmail!IncidentSendMailExtension']/Message$</Property>

</ValueExpression>

</SimpleExpression>

</Expression>

<Expression>

<SimpleExpression>

<ValueExpression>

<Property State="Post">$Context/Property[Type='SendEmail!IncidentSendMailExtension']/MessageType$</Property>

</ValueExpression>

<Operator>Equal</Operator>

<ValueExpression>

<Value>{9f6d72ad-1bff-ca89-f619-8d50cd876576}</Value>

</ValueExpression>

</SimpleExpression>

</Expression>

</And>

</Expression>

</Or>

</Expression>

</Criteria>

Things changed:

· Added an Outer <Expression><Or>…. </Or></Expression>block to OR the following logical criteria together:

a. Message changes from IsNull to NotNull AND MessageType = some message type

OR

b. Message changes (Pre NotEqual Post) AND MessageType = some message type

· Added the highlighted Expression criteria above (just copy/paste)

· Notes: Replace the GUID with the same GUID as above in your XML. See the location in the example above, but make sure you use the GUID from your exported XML since it will be unique in each environment.

This will need to be done for each incident event workflow (aka “<Rule>”) you create.

!! Re-Import the Management Pack – ignore the message about losing data. !!

Upgrade

If you had a previous release of the SendEmail solution installed please follow these instructions to upgrade:

1) Delete the any unsealed management packs that depend on the sealed SendEmail management pack.

2) Delete the SendEmail sealed management pack.

Follow the deployment instructions above to redeploy the SendEmail solution

Last edited Jul 3, 2013 at 2:35 AM by chbooth, version 1

Comments

No comments yet.