1 2 Previous Next 25 Replies Latest reply on Oct 12, 2015 9:33 AM by DanJones

    Using inbound mail to add a note to an active Incident

    Rookie

      Is it possible to have Mail Manager add a note to an active incident.  For example, a user emails the helpdesk inbox and an incident is automatically created in Service Desk.  Service Desk then saids an automatic notification to the use with the Incident number.  Users have a tendencay to reply to this email which is then delivered to the helpdesk inbox and a separate incident is then created.  I'd like their reply to be added to the notes section of the incident that has already been created.

        • 1. Re: Using inbound mail to add a note to an active Incident
          Jamie Cannon ITSMMVPGroup

          You can.  In your workflow have an Add Note action within the status you wish.  You MUST make sure that your "Update" keyword which is defined in your mail actions and the ticket number is in the subject of the message going out.  Then in your mail mappings, map subject and body to the Subject and Text fields for Note.

           

          When mail manager sees the keyword and the ticket number, as long as the "Add Note" action is available in the status the ticket is currently in it will create a note accordingly.

          • 2. Re: Using inbound mail to add a note to an active Incident
            Rookie

            Is it possible to have multiple keywords?

            • 3. Re: Using inbound mail to add a note to an active Incident
              Jamie Cannon ITSMMVPGroup

              You can use a combination phrase like "Updated Ticket:" or "Ticket Updated:".

              • 4. Re: Using inbound mail to add a note to an active Incident
                ITSMMVPGroup

                A couple of additional items:

                 

                • Make sure that the user role (e.g., PortalEndUser, SelfServiceGuest, etc.) has privileges to the Add Note action that you add to the status.
                • You may also want to include the Add Attachment action as well, since they may include some (and don't forget to add the privileges on this action too).

                 

                 

                Also, think about which/all statuses this may happen at... each one needs to have the action(s) available.

                1 of 1 people found this helpful
                • 5. Re: Using inbound mail to add a note to an active Incident
                  Apprentice

                  what if I have a ton of HTML in my emails, including all the other notes?  a reply email also sends back the original body of the email, which would cause chaos in my situation.  Can you limit the number of characters it grabs from the reply email?

                  • 6. Re: Using inbound mail to add a note to an active Incident
                    ITSMMVPGroup

                    One way you can do this is by using String.Substring method from .NET.

                     

                    (ex.)

                    for any text attribute in your calculation, this grabs the first 501 characters (zero-indexed)...

                     

                     

                    Value = MyObject.SomeTextAttribute.Substring(0,500)

                     

                     

                     

                    Here's a method reference from MSDN.

                     

                    -Brian

                    • 7. Re: Using inbound mail to add a note to an active Incident
                      Apprentice

                      Thank you for the suggestion!  that's a good start, but i'm thinking 500 characters would still grab some of the original email in most cases.

                       

                      maybe I will experiment with a "marker" at the end start of all email notifications so the calculation can find that marker in the reply, and just take anything before it as the reply text, into the note text.

                       

                      does anyone know if the inbound mail rules read the html, or discard the HTML and just read the text?

                      • 8. Re: Using inbound mail to add a note to an active Incident
                        ITSMMVPGroup

                        Definitely... before clipping out that substring, you can have your calc look for a specific text-string that would be your "tag" using other System.String methods...

                         

                        1. you could use the IndexOf method to get the location of your tag-string, and then use the SubString method to clip everything up to that point.
                        2. or, you could use the Split method to chop your main sting into an array of chunks based on where it finds your tag, and then just take the first member of the resulting  array (e.g., [0])

                         

                         

                        I think I'd vote for #2, seems more elegant to use a single-op versus two methods. 

                         

                         

                        -Brian

                         

                         

                         

                        Example:

                         

                            Value = (MyObject.SomeTextAttribute.Split("[tag]", 1, StringSplitOptions.None))[0]

                         

                         

                        ...where MyObject.SomeTextAttribute is your message body attribute.  The "1" tells the method to return only the first matching element, and the [0] selects it from the returned array.

                        • 9. Re: Using inbound mail to add a note to an active Incident
                          jasoncadman Expert

                          Hi Brian

                           

                          I'm really interested in what you're suggesting here but can you elaborate a little please?

                           

                          I'm not sure where you are putting these methods. are you adding an automatic action to your process and making it a calculation

                           

                          I'm a little confused to say the least

                           

                          Thanks

                           

                          Jason

                          • 10. Re: Using inbound mail to add a note to an active Incident
                            ITSMMVPGroup

                            Jason,

                             

                            You know, I hadn't really thought about that.     I was much more immersed in immediate questions about the coding/script.  And while I've done a lot of the same text manipulation, I haven't done it in situ with the mail management.  But yes, with the mail engine handling things it gets a bit more complicated.  You need to have somewhere to place a calculation script...

                             

                            1. you could put the calc (for the Text attribute) in the Add Note action on whatever status.  This could limit your other uses of Add Note functionality at those points though (e.g., to be able to add notes manually)
                            2. You could place a calc on the object itself.  The mail mappings are a bit limited, I think they will only show you a predefined set of attributes from (IRPC) and Notes.  But you could create a secondary text field on Note that holds the description that will actually be used for everything important later on (display, Reminders, etc.):
                              • place the calc on this Text2 attribute and have it pull values from the original Text attribute.
                              • emailed updates will automatically place the email Body in the original Text attribute.
                              • when entering notes manually, let users still type into the Text attribute.
                              • your calc on Text2 should happen BeforeSave (I think), and will pull its value from Text, clipping the data at your [tag] value if it finds it in the text data.
                              • from now on, refer to Text2 instead of Text when using values from your Notes to get the (possibly) clipped version.
                                (e.g., when generating Reminders, Reports, Queries, etc.)
                                        

                                This would be easier if you could create the second Text attribute and just point to it in the mail mappings, but I don't think that is possible.

                             

                             

                            -Brian

                            • 11. Re: Using inbound mail to add a note to an active Incident
                              jasoncadman Expert

                              Thanks very much for your reply Brian,

                               

                              I'm going to dedicate a bit of time to this one as it does make a mess of notification emails

                              • 12. Re: Using inbound mail to add a note to an active Incident
                                ITSMMVPGroup

                                Great.  Feel free to post more questions.  We don't have this setup implemented, but I'd take it as a thought experiment with you doing the leg-work. 

                                 

                                 

                                -Brian

                                • 13. Re: Using inbound mail to add a note to an active Incident
                                  Apprentice

                                  Brian/Jason,

                                   

                                  I am about to dive into a similar project, I would be happy to share any progress/findings also.

                                   

                                  We are going to using the inbound emails to allow outside vendors performing maintenance work on our properties to update tickets.  We will alert the outside vendors of new work orders by (our process) sending them an initial email.  My revised plan is to include several mailto: links in this email that populate the subject line, based on the action they want.  For example, if they click the "add note" link, it will populate the subject line accordingly for our inbound email event service to interpret.

                                   

                                  I think providing the links within our outgoing emails for these actions is a better option that my original plan, which was to configure things to recieve a "reply" to our email, and attempt to add a note this way.  Providing a list of pre-formatted actions (links populate email subject lines) within each outgoing email should lead to far more consistent results, especially since we need vendors to be able to mark tickets complete.

                                   

                                  I realize vendors could login to our system to update tickets, but I would prefer to just avoid our service desk from facing the internet if possible.

                                  • 14. Re: Using inbound mail to add a note to an active Incident
                                    jasoncadman Expert

                                    Thatnks for your support guys. I've had to move onto soemthing else early part of this week but I'm hoping to be back on it later on in the week

                                     

                                    Best regards

                                     

                                    Jason

                                    1 2 Previous Next