locked
Send an email when an incident get assigned to a new analyst RRS feed

  • Question

  • Hi All,

     

    I am trying to find a way to configure SCSM to send an email to an analyst when an existing call gets reassigned to them.

     

    I have it working so that when an incident gets created, an email is sent to the analyst who the call is automatically assigned to, but when the call is assigned to someone else, no email gets sent.

     

    Thanks.

    JP.

    Monday, February 14, 2011 5:37 AM

Answers

  • It's not in the SP1 of SCSM 2010. The link/the blog post is still the "solution" to get this done.
    Andreas Baumgarten | H&D International Group
    Monday, March 7, 2011 8:58 PM
  • Hello again,
    sorry I thought this is about Incident , it was about activity
    I have edit the XML for incident for SP1 and it is working fine with me
    Thanks again
    here it is 


    <?xml version="1.0" encoding="utf-8"?>
    <ManagementPack ContentReadable="true" SchemaVersion="1.1" OriginalSchemaVersion="1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <Manifest>
        <Identity>
          <ID>Custom.IncidentWorkflows</ID>
          <Version>7.0.6555.0</Version>
        </Identity>
        <Name>Custom Incident Workflows</Name>
        <References>
          <Reference Alias="WorkItem">
            <ID>System.WorkItem.Library</ID>
            <Version>7.0.6555.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="IncidentManagement">
            <ID>ServiceManager.IncidentManagement.Library</ID>
            <Version>7.0.6555.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="EnterpriseManagement1">
            <ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Administration</ID>
            <Version>7.0.6555.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="EnterpriseManagement">
            <ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Console</ID>
            <Version>7.0.6555.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="System">
            <ID>System.Library</ID>
            <Version>7.0.6555.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="CoreIncident">
            <ID>System.WorkItem.Incident.Library</ID>
            <Version>7.0.6555.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="SystemCenter">
            <ID>Microsoft.SystemCenter.Subscriptions</ID>
            <Version>7.0.6555.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="CustomSystem_Notifications_Library">
            <ID>System.Notifications.Library</ID>
            <Version>7.0.6555.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
        </References>
      </Manifest>
      <Categories>
        <Category ID="Category.Custom.IncidentWorkflows.ManagementPack" Value="EnterpriseManagement!Microsoft.EnterpriseManagement.ServiceManager.ManagementPack">
          <ManagementPackName>Custom.IncidentWorkflows</ManagementPackName>
          <ManagementPackVersion>7.0.6555.0</ManagementPackVersion>
        </Category>
        <Category ID="Category.IncidentAssignedToUserAddRule" Target="IncidentAssignedToUserAddRule" Value="EnterpriseManagement1!Microsoft.EnterpriseManagement.ServiceManager.Rules.WorkflowSubscriptions" />
        <Category ID="ServiceManager.Console.NotificationManagement.NotificationTemplates.IncidentAssignedToUserNotificationTemplate.Category" Target="IncidentAssignedToUserNotificationTemplate" Value="EnterpriseManagement1!ServiceManager.Console.NotificationManagement.NotificationTemplates.Enumeration" />
      </Categories>
      <Monitoring>
        <Rules>
          <Rule ID="IncidentAssignedToUserAddRule" Enabled="true" Target="IncidentManagement!System.WorkItem.Incident.WorkflowTarget" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
            <Category>System</Category>
            <DataSources>
              <DataSource ID="DS" TypeID="SystemCenter!Microsoft.SystemCenter.CmdbInstanceSubscription.DataSourceModule">
                <Subscription>
                  <RelationshipSubscription RelType="$MPElement[Name='WorkItem!System.WorkItemAssignedToUser']$" SourceType="$MPElement[Name='CoreIncident!System.WorkItem.Incident']$" TargetType="$MPElement[Name='System!System.Domain.User']$">
                    <AddRelationship />
                  </RelationshipSubscription>
                  <PollingIntervalInSeconds>30</PollingIntervalInSeconds>
                  <BatchSize>100</BatchSize>
                </Subscription>
              </DataSource>
            </DataSources>
            <WriteActions>
              <WriteAction ID="WA" TypeID="SystemCenter!Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowTaskWriteAction">
                <Subscription>
                  <EnableBatchProcessing>false</EnableBatchProcessing>
                  <WindowsWorkflowConfiguration>
                    <AssemblyName>Microsoft.EnterpriseManagement.WorkflowFoundation</AssemblyName>
                    <WorkflowTypeName>Microsoft.EnterpriseManagement.WorkflowFoundation.ConfigurationWorkflow</WorkflowTypeName>
                    <WorkflowParameters>
                      <WorkflowParameter Name="InstanceId" Type="guid">$Data/BaseManagedEntityId$</WorkflowParameter>
                      <WorkflowArrayParameter Name="UserRelationshipIdList" Type="guid">
                        <Item>$MPElement[Name='WorkItem!System.WorkItemAssignedToUser']$</Item>
                      </WorkflowArrayParameter>
                      <WorkflowArrayParameter Name="NotificationTemplateIdList" Type="guid">
                        <Item>$MPElement[Name='IncidentAssignedToUserNotificationTemplate']$</Item>
                      </WorkflowArrayParameter>
                    </WorkflowParameters>
                    <RetryExceptions />
                    <RetryDelaySeconds>60</RetryDelaySeconds>
                    <MaximumRunningTimeSeconds>7200</MaximumRunningTimeSeconds>
                  </WindowsWorkflowConfiguration>
                </Subscription>
              </WriteAction>
            </WriteActions>
          </Rule>
        </Rules>
      </Monitoring>
      <Templates>
        <ObjectTemplate ID="IncidentAssignedToUserNotificationTemplate" TypeID="CustomSystem_Notifications_Library!System.Notification.Template.SMTP">
          <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template.SMTP']/Subject$">&lt;1033&gt;Incident $Context/Property[Type='WorkItem!System.WorkItem']/Id$ is assigned to you&lt;/1033&gt;</Property>
          <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template.SMTP']/Priority$">2</Property>
          <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template.SMTP']/IsBodyHtml$">False</Property>
          <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template']/Content$">&lt;1033&gt;Details:
     
    Title: $Context/Property[Type='WorkItem!System.WorkItem']/Title$
    Description: $Context/Property[Type='WorkItem!System.WorkItem']/Description$
    Created By: $Context/Path[Relationship='WorkItem!System.WorkItemCreatedByUser' TypeConstraint='System!System.User']$?$DisplayName$?
    &lt;/1033&gt;</Property>
          <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template']/Encoding$">utf-8</Property>
          <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template']/SeedClass$">System.WorkItem.Incident$3fc62adf-d590-ed19-587e-e029aecb738d</Property>
          <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template']/Protocol$">SMTP</Property>
        </ObjectTemplate>
      </Templates>
      <LanguagePacks>
        <LanguagePack ID="ENU" IsDefault="true">
          <DisplayStrings>
            <DisplayString ElementID="Custom.IncidentWorkflows">
              <Name>Custom Incident Workflows</Name>
            </DisplayString>
            <DisplayString ElementID="IncidentAssignedToUserAddRule">
              <Name>Assigned to user added to incident</Name>
            </DisplayString>
            <DisplayString ElementID="IncidentAssignedToUserNotificationTemplate">
              <Name>Incident assigned to user template</Name>
            </DisplayString>
          </DisplayStrings>
        </LanguagePack>
      </LanguagePacks>
    </ManagementPack>
    Wednesday, March 9, 2011 9:14 AM

All replies

  • Monday, February 14, 2011 6:57 AM
  • I want the exact same thing

    this link is for RC Build , I have SP1 so maybe it is implemented by default but I can't find it ?

    Regards

    Monday, March 7, 2011 9:20 AM
  • It's not in the SP1 of SCSM 2010. The link/the blog post is still the "solution" to get this done.
    Andreas Baumgarten | H&D International Group
    Monday, March 7, 2011 8:58 PM
  • Thanks for replying 

    but in the link , in the XML file there is field called "version" , should we change it to match the version of SP1 ???

    Regards,

    Wednesday, March 9, 2011 6:47 AM
  • I have tried to use it as is , it is imported successfully but not sending email , and it is showing no warning or error in the status of workflow

    I have deleted and edit the version to match the SP1 version but it doesn't work even

    Regards,

    Wednesday, March 9, 2011 8:42 AM
  • Hello again,
    sorry I thought this is about Incident , it was about activity
    I have edit the XML for incident for SP1 and it is working fine with me
    Thanks again
    here it is 


    <?xml version="1.0" encoding="utf-8"?>
    <ManagementPack ContentReadable="true" SchemaVersion="1.1" OriginalSchemaVersion="1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <Manifest>
        <Identity>
          <ID>Custom.IncidentWorkflows</ID>
          <Version>7.0.6555.0</Version>
        </Identity>
        <Name>Custom Incident Workflows</Name>
        <References>
          <Reference Alias="WorkItem">
            <ID>System.WorkItem.Library</ID>
            <Version>7.0.6555.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="IncidentManagement">
            <ID>ServiceManager.IncidentManagement.Library</ID>
            <Version>7.0.6555.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="EnterpriseManagement1">
            <ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Administration</ID>
            <Version>7.0.6555.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="EnterpriseManagement">
            <ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Console</ID>
            <Version>7.0.6555.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="System">
            <ID>System.Library</ID>
            <Version>7.0.6555.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="CoreIncident">
            <ID>System.WorkItem.Incident.Library</ID>
            <Version>7.0.6555.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="SystemCenter">
            <ID>Microsoft.SystemCenter.Subscriptions</ID>
            <Version>7.0.6555.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="CustomSystem_Notifications_Library">
            <ID>System.Notifications.Library</ID>
            <Version>7.0.6555.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
        </References>
      </Manifest>
      <Categories>
        <Category ID="Category.Custom.IncidentWorkflows.ManagementPack" Value="EnterpriseManagement!Microsoft.EnterpriseManagement.ServiceManager.ManagementPack">
          <ManagementPackName>Custom.IncidentWorkflows</ManagementPackName>
          <ManagementPackVersion>7.0.6555.0</ManagementPackVersion>
        </Category>
        <Category ID="Category.IncidentAssignedToUserAddRule" Target="IncidentAssignedToUserAddRule" Value="EnterpriseManagement1!Microsoft.EnterpriseManagement.ServiceManager.Rules.WorkflowSubscriptions" />
        <Category ID="ServiceManager.Console.NotificationManagement.NotificationTemplates.IncidentAssignedToUserNotificationTemplate.Category" Target="IncidentAssignedToUserNotificationTemplate" Value="EnterpriseManagement1!ServiceManager.Console.NotificationManagement.NotificationTemplates.Enumeration" />
      </Categories>
      <Monitoring>
        <Rules>
          <Rule ID="IncidentAssignedToUserAddRule" Enabled="true" Target="IncidentManagement!System.WorkItem.Incident.WorkflowTarget" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
            <Category>System</Category>
            <DataSources>
              <DataSource ID="DS" TypeID="SystemCenter!Microsoft.SystemCenter.CmdbInstanceSubscription.DataSourceModule">
                <Subscription>
                  <RelationshipSubscription RelType="$MPElement[Name='WorkItem!System.WorkItemAssignedToUser']$" SourceType="$MPElement[Name='CoreIncident!System.WorkItem.Incident']$" TargetType="$MPElement[Name='System!System.Domain.User']$">
                    <AddRelationship />
                  </RelationshipSubscription>
                  <PollingIntervalInSeconds>30</PollingIntervalInSeconds>
                  <BatchSize>100</BatchSize>
                </Subscription>
              </DataSource>
            </DataSources>
            <WriteActions>
              <WriteAction ID="WA" TypeID="SystemCenter!Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowTaskWriteAction">
                <Subscription>
                  <EnableBatchProcessing>false</EnableBatchProcessing>
                  <WindowsWorkflowConfiguration>
                    <AssemblyName>Microsoft.EnterpriseManagement.WorkflowFoundation</AssemblyName>
                    <WorkflowTypeName>Microsoft.EnterpriseManagement.WorkflowFoundation.ConfigurationWorkflow</WorkflowTypeName>
                    <WorkflowParameters>
                      <WorkflowParameter Name="InstanceId" Type="guid">$Data/BaseManagedEntityId$</WorkflowParameter>
                      <WorkflowArrayParameter Name="UserRelationshipIdList" Type="guid">
                        <Item>$MPElement[Name='WorkItem!System.WorkItemAssignedToUser']$</Item>
                      </WorkflowArrayParameter>
                      <WorkflowArrayParameter Name="NotificationTemplateIdList" Type="guid">
                        <Item>$MPElement[Name='IncidentAssignedToUserNotificationTemplate']$</Item>
                      </WorkflowArrayParameter>
                    </WorkflowParameters>
                    <RetryExceptions />
                    <RetryDelaySeconds>60</RetryDelaySeconds>
                    <MaximumRunningTimeSeconds>7200</MaximumRunningTimeSeconds>
                  </WindowsWorkflowConfiguration>
                </Subscription>
              </WriteAction>
            </WriteActions>
          </Rule>
        </Rules>
      </Monitoring>
      <Templates>
        <ObjectTemplate ID="IncidentAssignedToUserNotificationTemplate" TypeID="CustomSystem_Notifications_Library!System.Notification.Template.SMTP">
          <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template.SMTP']/Subject$">&lt;1033&gt;Incident $Context/Property[Type='WorkItem!System.WorkItem']/Id$ is assigned to you&lt;/1033&gt;</Property>
          <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template.SMTP']/Priority$">2</Property>
          <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template.SMTP']/IsBodyHtml$">False</Property>
          <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template']/Content$">&lt;1033&gt;Details:
     
    Title: $Context/Property[Type='WorkItem!System.WorkItem']/Title$
    Description: $Context/Property[Type='WorkItem!System.WorkItem']/Description$
    Created By: $Context/Path[Relationship='WorkItem!System.WorkItemCreatedByUser' TypeConstraint='System!System.User']$?$DisplayName$?
    &lt;/1033&gt;</Property>
          <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template']/Encoding$">utf-8</Property>
          <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template']/SeedClass$">System.WorkItem.Incident$3fc62adf-d590-ed19-587e-e029aecb738d</Property>
          <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template']/Protocol$">SMTP</Property>
        </ObjectTemplate>
      </Templates>
      <LanguagePacks>
        <LanguagePack ID="ENU" IsDefault="true">
          <DisplayStrings>
            <DisplayString ElementID="Custom.IncidentWorkflows">
              <Name>Custom Incident Workflows</Name>
            </DisplayString>
            <DisplayString ElementID="IncidentAssignedToUserAddRule">
              <Name>Assigned to user added to incident</Name>
            </DisplayString>
            <DisplayString ElementID="IncidentAssignedToUserNotificationTemplate">
              <Name>Incident assigned to user template</Name>
            </DisplayString>
          </DisplayStrings>
        </LanguagePack>
      </LanguagePacks>
    </ManagementPack>
    Wednesday, March 9, 2011 9:14 AM
  • Ramos, is this working properly fine now?
    Tuesday, August 30, 2011 3:53 PM
  • does this work after CU2?
    Friday, September 16, 2011 6:52 AM
  • Here it works on different SCSM environments without any problem.


    Andreas Baumgarten | H&D International Group
    Friday, September 16, 2011 6:56 AM