Notify Assigned to when the Affected User updates an incident from the SSP in SCSM 2012

March 30, 2012 Posted by Stefan Allansson

There are already some great blogs about how to notify the “assigned to” user when an incident is updated by the affected user. Those explains how to do this with the Exchange connector or with the SSP for SCSM 2010.

The solution for the Exchange connector also works in SCSM 2012, but since there are a new SSP in 2012 we have to find another way to do it for the SSP.

In SCSM 2012 there is a field for user input and a button “Update request” for the affected user of an incident on the SSP. If the user updates the incident from the SSP, an entry will be added in the action log for that incident.

So to be able to notify the assigned to user that the incident is updated, we need to trigger on when a new End-User comment is added in the action log. To do that we have to create a relationship subscription in XML.
Thanks to Travis that has wrote this blog that describes how to do that:

To get this to work for the SSP I used the management pack that Travis have created and made some changes.
In the subscription I changed RelType from WorkItem!System.WorkItem.TroubleTicketHasAnalystComment to WorkItem!System.WorkItem.TroubleTicketHasUserComment and for TargetType I changed from WorkItem!System.WorkItem.TroubleTicket.AnalystCommentLog to System.WorkItem.TroubleTicket.UserCommentLog

I also made changes to the WriteActions. Instead of adding a notification template and a user to notify directly in the XML, I add an incident template that I have created. The only thing my template does is that it sets the UpdatedByEndUser to true.
There is a great blog from my colleague Anders Asp “A smarter way to notify the assignee when the affected user updates his incident” that describes the UpdatedByEndUser solution.

So when we add a template that changes the UpdatedByEndUser to true, and have configured the rest in Anders solution it will send an e-mail to the assigned to user.

Below is the management pack that I have used.
You need to change the GUID (A035C6E5-2ADA-334A-3D01-24F4398A5BB1) for the incident template to the GUID of the template that you want to use.
To get the GUID for your template, login in to your SQL Server and run this query against the ServiceManager database.(put in the display name of your template)

“select Objecttemplateid from ObjectTemplate where ObjectTemplateName=’DisplayNameOfYourTemplate’

<ManagementPack ContentReadable=”true” SchemaVersion=”2.0″ OriginalSchemaVersion=”1.1″ xmlns:xsd=”” xmlns:xsl=””>

<Name>Action Log Add Relationship Subscription</Name>
<Reference Alias=”Console”>
<Reference Alias=”NotificationsLibrary”>
<Reference Alias=”WorkItem”>
<Reference Alias=”ServiceManager.IncidentLibrary”>
<Reference Alias=”System”>
<Reference Alias=”IncidentLibrary”>
<Reference Alias=”Subscriptions”>
<Reference Alias=”Administration”>
<Category ID=”Category.ActionLogAddRelationshipSubscriptions.ManagementPack” Value=”Console!Microsoft.EnterpriseManagement.ServiceManager.ManagementPack”>
<Category ID=”Category.ActionLogAddRelationshipSubscriptionRule” Target=”ActionLogAddRelationshipSubscriptionRule” Value=”Administration!Microsoft.EnterpriseManagement.ServiceManager.Rules.WorkflowSubscriptions” />
<Rule ID=”ActionLogAddRelationshipSubscriptionRule” Enabled=”true” Target=”ServiceManager.IncidentLibrary!System.WorkItem.Incident.WorkflowTarget” ConfirmDelivery=”true” Remotable=”true” Priority=”Normal” DiscardLevel=”100″>
<DataSource ID=”DS” TypeID=”Subscriptions!Microsoft.SystemCenter.CmdbInstanceSubscription.DataSourceModule”>
<RelationshipSubscription RelType=”$MPElement[Name=’WorkItem!System.WorkItem.TroubleTicketHasUserComment’]$” SourceType=”$MPElement[Name=’WorkItem!System.WorkItem.TroubleTicket’]$” TargetType=”$MPElement[Name=’WorkItem!System.WorkItem.TroubleTicket.UserCommentLog’]$”>
<AddRelationship />
<WriteAction ID=”WA” TypeID=”Subscriptions!Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowTaskWriteAction”>
<WindowsWorkflowConfiguration>                <AssemblyName>Microsoft.EnterpriseManagement.ServiceManager.Incident.Workflows</AssemblyName>
<WorkflowArrayParameter Name=”InstanceIds” Type=”guid”>
<WorkflowParameter Name=”IncidentTemplate” Type=”guid”>A035C6E5-2ADA-334A-3D01-24F4398A5BB1</WorkflowParameter>
<WorkflowParameter Name=”NotificationRulesEnabled” Type=”boolean”>False</WorkflowParameter>
<RetryExceptions />
<LanguagePack ID=”ENU” IsDefault=”true”>
<DisplayString ElementID=”ActionLogAddRelationshipSubscription”>
<Name>Action Log Add Relationship Subscription</Name>
<DisplayString ElementID=”ActionLogAddRelationshipSubscriptionRule”>
<Name>Action log entry added to action log</Name>


Here is a summarize of the steps that is needed for this: (since I use Anders solution for templates and workflows, there is a more detailed description how to do that in his blog

  1. Create an Incident Template with settings that you want to apply for an updated incident. This is the template that we adds in the management pack with a GUID. My template just changes the UpdatedByEndUser to true. I think this is a great solution to use, but you can also have a template that for example just change the status to updated.(read Anders blog to see the advantages with his solution)
  2. Create a workflow that triggers on when your template is added that will send an e-mail to the Affected User. (see more information in Anders blog)
  3. Copy my mp and change the GUID to match your incident template.
  4. Import the mp

In step 3 in Anders article where he adds a template for the Exchange Connector I use a template that doesn´t do any change at all. We don´t need to set the UpdatedByEndUser to true since that will be done by our mp when an End-User comment is aded to the action log )

Step 5 in Anders description where you creates two workflows is little special in 2012 or at least in my environment. I don´t know if it´s a bug or if it´s unique in my environment.
I can´t create the criteria changed from NOT EQUAL true for the UpdatedByEndUser.
I have to set criteria EQUAL and then change it to NOT EQUAL in XML after I have exported the mp.
If I then import the mp again it work as expected but when you look at the workflow in the console it still says EQUAL. If I export the management pack again I can see that it says NOT EQUAL in XML as it also should do in the console.

This solution doesn´t send a notify if the Affected User resolves the incident on the SSP by clicking “cancel request”. Because when they do that it doesn´t creates an End-User comment in the Action log, it will create a “Record Resolved” entry instead. If I find a good solution for how to cover that I will create a new blog post.



To do the same for a service request you need to use a different relationship type. I haven´t created that mp yet but will create a blog for that also when I´m done with that.

6 Responses to Notify Assigned to when the Affected User updates an incident from the SSP in SCSM 2012

  1. Geert says:

    Hi Stefan

    Great post. I’ll be back when you post your Service Request Mgt Pack. Will be a great addition!

  2. Gabriel says:

    Hi Stefan,

    I’m wondering if you made any progress on the Service Request version of this yet? I’ve been looking over it as well, but the problem I’m having is that the Service Request class doesn’t contain the TroubleTicketHasUserComment or TroubleTicketHasAnalystComment relationships, rather, it only has WorkItemHasCommentLog to relate to the Work Item Comments Log class which then connects to the TroubleTicketUserComment and TroubleTicketAnalystComment classes storing the user and analyst comments. I’m not aware of how to structure the relationship subscription, or even if it is possible (which I am feeling is probably the answer), in order to fire notifications off whenever an end user or analyst updates the ticket. Is there another way you know of or have found which can be used?

    Thanks for any advice you can give.

  3. David Buchta says:

    What about the other way around? Notifying the affected user when the assigned analyst updates the incident via e-mail? I can easily see an instance where the analyst is out and has only his smartphone, it would be very handy to be able to reply via e-mail and request more info, etc, and have SCSM e-mail the affected user just as if he used the console.


  4. Pingback: SCSM.SE » Blog Archive » Notify Assigned to when the Affected User updates a Service Request from the SSP in SCSM 2012

Leave a Reply

Your email address will not be published. Required fields are marked *