Creating notification for an unassigned Incident or Service Request in Service Manager

Tools_thumb2_thumb_thumbBabulal Ghule | Support Escalation Engineer

Hi everyone, Babulal Ghule here again and in this blog post I will walk you through the steps to configure the notification workflow so that it will notify you if the assigned to user field is empty for an Incident or Service Request in System Center 2012 Service Manager (SCSM 2012).

We seem to get a few requests from customers on how to create this notification workflow as this is something that currently is not possible out of the box, however it can be achieved by using some XML magic. For this blog post I’ll create a notification workflow that will notify the helpdesk every 10 minutes until the Incident or Service Request is assigned.

NOTE: For detailed steps on creating notification workflow in Service Manager, please refer this TechNet link:

http://technet.microsoft.com/en-us/library/hh519719.aspx

Step 1: Create the notification template

Refer this TechNet article to create the template: http://technet.microsoft.com/en-us/library/hh519719.aspx

Step 2: Create the notification workflow (periodic subscription)

I selected the target class as Incident but if you want to notify for Service Request then select Service Request.

clip_image001

clip_image002

Add ‘First assigned date’ in the criteria. This field will be updated with the date/time when Incident/Service Request is assigned to a user. If this field is empty then the incident is not assigned to any user yet, so we need to check if this field isNull or isEmpty but we don’t have these operators in the UI. For now, add any temporary criteria here such as "is less than or equal" to ’05/05/2013′ as the UI will not allow us to click Next until we specify something here. But don’t worry, we will modify this MP and add the isNull operator in the XML.

If you like, you can also add additional criteria here based on specific requirements (e.g. you have multiple helpdesks). Make sure that you add all the criteria that you need here along with first assigned date as we will not be able modify this workflow from the UI after we make our changes in XML.

clip_image003

In the recurring notification section, specify the criteria that suits your requirement for recurring notifications. For this scenario, I want to notify the helpdesk every 10 minutes until the incident is assigned to an analyst. If you want to notify once then you can set ‘End after number of occurrences’ = 1.  This workflow will run every 10 minutes if thecriteria is true. This criteria will be false when incident has assigned to user.

clip_image004

Select the notification template and add the required recipients on the next screen.

clip_image005

Now we are done creating notification workflow from the UI, so it’s time to modify it using XML. To begin, export the  management pack and open it in XML editor. Locate the <Criteria> section in the MP for "First assigned date" as below:

<Criteria>

<Expression>
       <SimpleExpression>
               <ValueExpressionLeft>
                <Property>$Context/Property[Type=’CustomSystem_WorkItem_Library!System.WorkItem’]/FirstAssignedDate$</Property>
               </ValueExpressionLeft>
                <Operator>LessEqual</Operator>
                 <ValueExpressionRight>
                <Value>2013-04-27T18:30:00</Value>
                </ValueExpressionRight>
          </SimpleExpression>
</Expression>

</Criteria>

We need to replace the lines between the tag <Expression> and </Expression> with the code below.

<UnaryExpression>
<ValueExpression>
            <Property>$Context/Property[Type=’CustomSystem_WorkItem_Library!System.WorkItem’]/FirstAssignedDate$</Property>
       </ValueExpression>
       <Operator>IsNull</Operator>
</UnaryExpression>

So when we’re done it will look like this:

<Criteria>
  <Expression>
 <UnaryExpression>
        <ValueExpression>
              <Property>$Context/Property[Type=’CustomSystem_WorkItem_Library!System.WorkItem’]/FirstAssignedDate$</Property>
        </ValueExpression>
           <Operator>IsNull</Operator>
      </UnaryExpression>
   </Expression>
</Criteria>

Those are all the changes we need to make so go ahead and save the management pack and re-import it back into SCSM.

Note: Once you modify and re-import the MP, do not modify it from the UI as it will break the XML code.

I have attached a sample MP with this post.

To download the MP click here

Hope this helps!

Babulal Ghule | Support Escalation Engineer | Microsoft GBS Management and Security Division

Get the latest System Center news on Facebook and Twitter:

clip_image001 clip_image002

System Center All Up: http://blogs.technet.com/b/systemcenter/
System Center – Configuration Manager Support Team blog: http://blogs.technet.com/configurationmgr/
System Center – Data Protection Manager Team blog: http://blogs.technet.com/dpm/
System Center – Orchestrator Support Team blog: http://blogs.technet.com/b/orchestrator/
System Center – Operations Manager Team blog: http://blogs.technet.com/momteam/
System Center – Service Manager Team blog: http://blogs.technet.com/b/servicemanager
System Center – Virtual Machine Manager Team blog: http://blogs.technet.com/scvmm

Windows Intune: http://blogs.technet.com/b/windowsintune/
WSUS Support Team blog: http://blogs.technet.com/sus/
The AD RMS blog: http://blogs.technet.com/b/rmssupp/

App-V Team blog: http://blogs.technet.com/appv/
MED-V Team blog: http://blogs.technet.com/medv/
Server App-V Team blog: http://blogs.technet.com/b/serverappv

The Forefront Endpoint Protection blog : http://blogs.technet.com/b/clientsecurity/
The Forefront Identity Manager blog : http://blogs.msdn.com/b/ms-identity-support/
The Forefront TMG blog: http://blogs.technet.com/b/isablog/
The Forefront UAG blog: http://blogs.technet.com/b/edgeaccessblog/