Email to notify manager when request is raised
![David_Muzzatti](https://us.v-cdn.net/6026663/uploads/defaultavatar/nUU92XW7CXYP8.jpg)
I am looking for some advice on how I could setup an email notification that could be sent to a user’s manager when they raise a ticket from a specific service catalogue item. Would anyone happen to know if there is a way of doing this?
Best Answers
-
Geoff_Ross Cireson Consultant O.G.
Hi David,
It is possible but not super simple. I did manage to get it working:I did have to modify the XML. Here's what to do.
- Make your subscription with the right criteria and everything. In Related Recipients, choose Affected User.
- Export the MP with the Subscription and edit it.
- In the XML for that Subscription, find the WriteAction and then the Workflow Parameter called "PrimaryUserRelationships"
- Replace the content with the following:
<Item>$Context/Path[Relationship='WorkItem!System.WorkItemAffectedUser' TypeConstraint='System!System.User']/Path[Relationship='System!System.UserManagesUser' TypeConstraint='System!System.User']$</Item>
5.Save the file and reimport the MP.
Happy XMLing.
Geoff0 -
Geoff_Ross Cireson Consultant O.G.
Hi David,
Looks like I missed an important bit - SeedRole='Target'. Try this:<Item>$Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemAffectedUser' TypeConstraint='CustomSystem_Library!System.User']/Path[Relationship='CustomSystem_Library!System.UserManagesUser' SeedRole='Target' TypeConstraint='CustomSystem_Library!System.User']$</Item>
Geoff
0
Answers
Hi David,
It is possible but not super simple. I did manage to get it working:
I did have to modify the XML. Here's what to do.
5.Save the file and reimport the MP.
Happy XMLing.
Geoff
Thanks Geoff, I tried that but the import fails saying that it 'Cannot resolve identifier WorkItem!System.WorkItemAffectedUser in the context of management pack'
The xml line I changed was the following:
Hi David,
Of course, we need to reconcile the references!!!
In your case you need to replace with this then:
Geoff
Thanks for that Geoff but after adding this in and importing the MP I can now see the manages user appearing in the related recipients, however no email arrives for the manager
Hi David,
Looks like I missed an important bit - SeedRole='Target'. Try this:
Geoff
Thanks Geoff, that did the trick!
Great. Thanks for Confirming David.