locked
Required Workflow Variable to notify Analyst of new User Email RRS feed

  • Question

  • Here's what I want to happen:

    • Analyst adds comment to action log, asking user for more information
    • Workflow triggers notification email to user
    • user replies to email with more information
    • Workflow triggers notification email to Analyst with added user information.

    The Workflow to notify the user of a new analyst comment in Action Log is working correctly.

    I have installed the custom MP from this blog: http://blog.scsmfaq.ch/2011/08/06/notifying-analysts-when-action-log-was-updated/ however it doesn't work as expected. 

    The workflow from Marcel's blog triggers a notification email to the analyst, when the analyst adds a comment to the action log.

    It should trigger a notification to the analyst, when the user sends an email which is added to the action log.

    I know from reading the comments on Marcel's blog, that the variable "TroubleTicketHasAnalystComment" needs to be switched to something else, in this case something like "Trouble Ticket Has Email From User" - but i have no idea what it might be.

    can anyone shed some light on the variable I am looking for?

    Thanks as always for your assistance :) 


    Have you tried turning it off and back on again?

    Friday, September 23, 2011 4:15 PM

Answers

  • OK have run some tests and found the following:

    • Analyst Comment Object (either in action log or through 'request user info'): 

    System.WorkItem.TroubleTicketHasAnalystComment

    • User Comment Object (sent in via email, picked up by Exchange Connector): 

    System.WorkItem.TroubleTicketHasActionLog 

    Hopefully this will be of some use to anyone looking for these variables....


    Have you tried turning it off and back on again?
    • Marked as answer by DanBradley1985 Thursday, September 29, 2011 3:20 PM
    Monday, September 26, 2011 3:20 PM

All replies

  • Hi,

    I have not tried this yet, however there is a Relationship Class named System.WorkItem.TroubleTicketHasUserComment and a Target Class named System.WorkItem.TroubleTicket.UserCommentLog which would probably do the trick. So your XML for the Relationship Subscription should somehow look like the following:

    <RelationshipSubscription RelType="$MPElement[Name='WorkItem!System.WorkItem.TroubleTicketHasUserComment']$" SourceType="$MPElement[Name='WorkItem!System.WorkItem.TroubleTicket']$" TargetType="$MPElement[Name='WorkItem!System.WorkItem.TroubleTicket.UserCommentLog']$">
    

    HTH

     

    Monday, September 26, 2011 10:54 AM
  • Thanks for the reply Dieter!

    I've tried this variable already but it doesn't seem to trigger. I think the variable TroubleTicketHasUserComment is triggered when the user submits a comment via the portal, and not when its submitted by email.

    I've seen solutions which rely on the 'request user input' method of communication, which changes the state of the ticket to pending while waiting for the response from the user. When the user replies, custom scripting is needed to switch the status back to active via the exchange connector templates, this status change could then be used to trigger the email back to the analyst.

    Another issue related to this is that I haven't found the attribute to display the message from the user, I only currently have analyst comments being sent via email. I think this could shed some light on the required variable.

    Will update when i find something useful.


    Have you tried turning it off and back on again?
    Monday, September 26, 2011 11:41 AM
  • Hi,

     

    You may already have seen this but have you looked at the 'Send Mail' feature in the Exchange connector.

    http://www.microsoft.com/download/en/details.aspx?id=26927

    In this download is a word doc explaining how to set up which I think will give you what you require.

    Thanks

    Mark


    Mark | http://syscen.blogspot.com/
    Monday, September 26, 2011 1:07 PM
  • Hi Mark

    I've already explored the SendEmail feature but decided against using it, in favour of using the 'request user info' feature already present in a standard installation of SCSM. 

    Anyway using the guide here: http://www.scsm.se/?p=167 I've got it working as it should. The method relies on switching the incident staus from pending to updated by user (a custom attribute) which then triggers the email to the analyst. There are several solutions around the web based on this idea.

    However, there's one problem with this method, it only works if the incident was initially set as pending. so, if the user sends more than one consecutive email without a reply from the analyst, the analyst will only receive notification of the first message. The state is unable to change from pending to updated by user, becuase it's already set to updated by user from the user's previous message.

    Has anyone else found a solution to this?


    Have you tried turning it off and back on again?
    Monday, September 26, 2011 1:21 PM
  • I don't know which relationship class is used by the Exchange Connector, however there are some more that exist apart from the ones you already tried:

    System.WorkItem.TroubleTicketHasActionLog
    System.WorkItem.TroubleTicketHasAnalystComment
    System.WorkItem.TroubleTicketHasAuditComment
    System.WorkItem.TroubleTicketHasNotificationLog
    System.WorkItem.TroubleTicketHasUserComment

    Maybe TroubleTicketHasActionLog will do the trick?

    Monday, September 26, 2011 2:27 PM
  • OK have run some tests and found the following:

    • Analyst Comment Object (either in action log or through 'request user info'): 

    System.WorkItem.TroubleTicketHasAnalystComment

    • User Comment Object (sent in via email, picked up by Exchange Connector): 

    System.WorkItem.TroubleTicketHasActionLog 

    Hopefully this will be of some use to anyone looking for these variables....


    Have you tried turning it off and back on again?
    • Marked as answer by DanBradley1985 Thursday, September 29, 2011 3:20 PM
    Monday, September 26, 2011 3:20 PM