Babulal 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:
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.
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.
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.
Select the notification template and add the required recipients on the next screen.
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:
<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>
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:
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/
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/
Recurring notification section? Custom MP?
thanks for post
These are the types of features it would be great to see out of the box in future updates or versions. Thanks for the post, I think that this will be a useful feature to add to our installation.
thanks for sharing the post. It Is a normal behavior that the first notification is sent together with the creation of the Incident (where actually the field "assigned to" is null)?
Can this be done using the Assigned To field instead of the first response time? Our teams transfer back and forth, so the response time is filled in by the first team, but the second team needs to be notified that the unassigned item is in their queue.
Would also mention to set the status to not equal closed or resolved... I got hundreds of notifications on old incidents. :)
Can I make this delay from the ticket creation by a few minutes? I am trying t add a criteria like:
[Created Date] <greater than> [Now-10m]
It doesn't seem to work though. I've played with Less Than and Greater Than quite a bit.
Essentially, what I want is a notification sent to the support group when the ticket is unassigned for more than 10 minutes.
In the notification templates, i would like to inject the first assigned date when an incident is assigned, however when the notification template is sent, the field is blank due to the fact that the notification was sent out prior field being updated.What would be the best way to make sure this field stays populated int he notification email? Is there a variable to just send $Current Date$ or something similar? That would be just as good.
Hey, we offer a supported MP to address this and more. It supports notification on reassignment, affected user notification for SR's and CR's, assignee null notification and much more. To see the video, please watch
http://www.caseddimensions.com/scsm_workflow_optimizer/ Its supported, upgrades are easy, it does more than notification.