Home Service Manager

Email to notify manager when request is raised

David_MuzzattiDavid_Muzzatti Customer IT Monkey ✭

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_RossGeoff_Ross Cireson Consultant O.G.
    edited July 22 Answer ✓

    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.

    1. Make your subscription with the right criteria and everything. In Related Recipients, choose Affected User.
    2. Export the MP with the Subscription and edit it.
    3. In the XML for that Subscription, find the WriteAction and then the Workflow Parameter called "PrimaryUserRelationships"
    4. 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.
    Geoff

  • Geoff_RossGeoff_Ross Cireson Consultant O.G.
    Answer ✓

    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

Answers

  • Geoff_RossGeoff_Ross Cireson Consultant O.G.
    edited July 22 Answer ✓

    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.

    1. Make your subscription with the right criteria and everything. In Related Recipients, choose Affected User.
    2. Export the MP with the Subscription and edit it.
    3. In the XML for that Subscription, find the WriteAction and then the Workflow Parameter called "PrimaryUserRelationships"
    4. 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.
    Geoff

  • David_MuzzattiDavid_Muzzatti Customer IT Monkey ✭

    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:

    <Item>$Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemAffectedUser' TypeConstraint='CustomSystem_Library!System.User']$</Item>
    

  • Geoff_RossGeoff_Ross Cireson Consultant O.G.

    Hi David,

    Of course, we need to reconcile the references!!!
    In your case you need to replace with this then:

    <Item>$Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemAffectedUser' TypeConstraint='CustomSystem_Library!System.User']/Path[Relationship='CustomSystem_Library!System.UserManagesUser' TypeConstraint='CustomSystem_Library!System.User']$</Item>

    Geoff

  • David_MuzzattiDavid_Muzzatti Customer IT Monkey ✭

    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

  • Geoff_RossGeoff_Ross Cireson Consultant O.G.
    Answer ✓

    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

  • David_MuzzattiDavid_Muzzatti Customer IT Monkey ✭
    edited August 13
  • Geoff_RossGeoff_Ross Cireson Consultant O.G.

    Great. Thanks for Confirming David.

Sign In or Register to comment.