9 Replies Latest reply on Sep 7, 2012 4:42 AM by jennashaw

    Convert Incident to Note

    jkhill Specialist

      Most of our users rely on e-mail to create incidents.  Sometimes they CC a friend or a group, and one of those people replies-all, creating a second incident:

      Incident 1:  Can't change screen resolution.

      Incident 2:  RE:  Can't change screen resolution.

       

      Now I know we could make Incident 2 a child of Incident 1, but that means that my analysts have to look in both the Notes collection and the Child Incidents collection to get a full sense of the history of the ticket.  They have asked me to find a way to convert the subject and body of the second e-mail into a Note for Incident 1.

       

      My approach is as follows:

      1. Create new business object Incidents.  Add a title field.
      2. Drag the Incident object to the Incidents object.  When prompted, specify that Yes I do want a collection.  This creates an Incidents Collection business object in the Incident object.
      3. Add a window to the Incidents object.  Eventually I will apply a filter to the Incidents Collection dropdown but while I'm testing it's fine as it is.
        IncidentsWindow.bmp
      4. Right-click on the Incidents Collection object and select Manage Actions.  Create a new action named Convert to Note. 
      5. In the process, add a manual action Convert to Note. 
      6. Add an automatic Add Note action (see below)
      7. Add an automatic Close action
      8. Link to Closed status.

       

      For the an automatic Add Note action I wanted to use placeholders for the title and description and change the Incident reference in the Note window to the incident that was selected.  I have two problems:

      • If I hard-code an incident number into the Incident dropdown, I am able to create a Note in the target Incident.  However, all the placeholders resolve to the target Title and Description, when they should resolve to the parent's.  So for example if I open Incident #2, select Convert to Note and select Incident #1 as my target, I want to create a Note in Incident #1 with Incident 2's title and description.  Instead I get Incident 1's title and description again.
      • If I don't hard-code the incident number and instead use {Incident/_IncidentsCol/_Incident} as a value type, the field resolves to the parent incident # rather than the target's.

       

      Does anyone have a thought as to how I could work around these two issues?

       

      For now I'm going to use a kludge:  I've replaced the Add Note action with an automatic Reminder that goes to the mailbox that the Inbound Mail service monitors.  The subject line is Incident #:{Id}: {Title}, which fits our rules for autodiscovering a comment to an existing ticket.  The body is {Description}.  I'm not thrilled with using e-mail for this since it'll add up to two minutes for the inbound and outbound mail services to do their thing, but at least I know it works.

       

      Any advice on the Add Note issues would be greatly appreciated.

        • 1. Re: Convert Incident to Note
          Jenny.Lardh SupportEmployee

          Hi,

           

          I'm thinking if you would be able to not have the second Incident created at all, but have the emails being added as a note directly instead?

          If you were to add the "update" keyword that you are using to update Incident via emails, for example "Update: {Id}" to every note that is going out from the system, then if the person receiving this email clicks "reply" it will keep the update key word in the subject and therefore update the relevant Incident instead of creating a new one.

           

          I would strongy recommend that you do not add an Incident Collection on the Incident Object as this will be what we call an Unbound Collection, which can have a massive hit on your performance. You can read more abour Unbound Collections here: http://community.landesk.com/support/docs/DOC-22310

           

           

          Kind Regards,

          Jenny Lardh

          LANDesk Support

          • 2. Re: Convert Incident to Note
            jkhill Specialist

            Hi Jenny,

             

            Thanks for responding.  We do use the Update keyword (in fact it's the basis for my workaround), but it doesn't do any good if the sender doesn't know the incident number.  In my example, Joe User sends an e-mail to HelpDesk and CCs Julie Manager with subject line "Can't change resolution."  Julie Manager then replies-all with subject line "RE:  Can't change resolution."  But because the Service Desk auto-reply to Joe's e-mail only went to Joe, Julie doesn't know that the Incident number is 1, so she can't include "Incident #1" in her subject line, which would update the original ticket. As a result, her compelling and trenchant analysis of the problem goes undetected until another analyst picks up Incident 2.

             

            Your link included an SQL script to identify any unbound collections.  It didn't pick up anything to do wtih either the Incident or Incidents objects, so does that mean I'm safe?  Just to recap the relationships:

            • The Incident object contains an Incidents collection (one-to-many)
            • The Incidents object contains a relationship to Incident.  This was a mistake that I wound up keeping.
            • The Incidents object contains a second relationship to Incident called Incident1 that is the source of the Incident.Incidents collection.

             

            If I put Incident1 in the Incidents window and reference that attribute in my process, I get an error that says "Error invoking business function.  Only one business function can be invoked in a single transaction." But if I put Incident in the Incidents window and reference *that* attribute in my process, I get the results I described previously.

             

            If despite the script output it's still an unbound collection, then my next question is how do I create a dropdown list of all the incident numbers that can be accessed from within the Incident process?  I don't want my team to be forced to type the incident number manually.  The window that Add Parent Incident produces is perfect but I'm not sure where it's coming from (I know it's a query but I don't see how the action was able to link to the query).

            • 3. Re: Convert Incident to Note
              jkhill Specialist

              In my original note I listed two problems:

              • If I hard-code an incident number into the Incident dropdown, I am able to create a Note in the target Incident.  However, all the placeholders resolve to the target Title and Description, when they should resolve to the parent's.  So for example if I open Incident #2, select Convert to Note and select Incident #1 as my target, I want to create a Note in Incident #1 with Incident 2's title and description.  Instead I get Incident 1's title and description again.
              • If I don't hard-code the incident number and instead use {Incident/_IncidentsCol/_Incident} as a value type, the field resolves to the parent incident # rather than the target's.

               

              I've discovered that the first bullet point isn't entirely accurate.  I'm using the Placeholders {Id} {Subject} and {Description} in my Note window.  When I receive an e-mail from Incident #1, it shows Incident #1's ID, Subject and Description.  But I just noticed that if I look at the console itself, the Note appears with the placeholders rather than their resolved values:  {Id} rather than 2, for example.  I guess this is a new question:  is there any way to modify a Note window in a process so that the resulting Notes resolve the placeholders rather than just show the bare placeholder codes?

              • 4. Re: Convert Incident to Note
                Jenny.Lardh SupportEmployee

                Hi,

                 

                I'm afraid an Incident Collection on the Incident Object would be an Unbound Collection and will have an affect on your perfomance so your suggested solution to this I'm afraid wouldn't be feasible.

                 

                Kind Regards,

                Jenny Lardh

                LANDesk Support

                • 5. Re: Convert Incident to Note
                  jkhill Specialist

                  Hi Jenny,

                   

                  You've referred to an Incident Collection twice now, but this is a collection of a different object called Incidents.  Please confirm that this still counts, despite the SQL script that says it's not unbound.

                   

                  Is there any way to use the query that Add Parent uses?

                  • 6. Re: Convert Incident to Note
                    karenpeacock SupportEmployee

                    Hi

                     

                    Yes sorry for our misunderstanding you are correct.  If you have created a new object (as you mention step 1 of your first post) then this will be fine.  Jenny was worried that you were creating a collection to an object that will only continue to grow (unbounded) and this would cause you issues with system performance.  Creating a new collection object with a one to one relationship to Incident is completely fine.

                     

                    The placeholders on the note object will not resolve unfortunately.  They only resolve on reminder and assignment objects.  On the note object you would need to use valuetypes rather than placeholders if you wanted them to resolve when viewed.

                     

                    I realise this doesn't bring you closer to a solution though.  I have been trying to think of a different way to control this.  I can't without asking people to use Self Service to raise new incidents rather than email or perhaps some understanding from users to ensure that they don't CC people into the initial incident creation email, only when they reply including the update number. 

                     

                    Years ago when I was a Team Leader for a team who accepted email to create new incidents, it was a part of our "First Line" teams job to close any duplicates and notifiy the users concerned about how to update the remaining incident.  I wonder how other customers deal with this?

                     

                    Regards,

                    Karen

                    • 7. Re: Convert Incident to Note
                      jkhill Specialist

                      Hi Karen,

                       

                      The reason I started down this road was because our first-line folks were complaining that there was no good way to integrate the replies. We already have a "Purge" action to delete duplicates, but when the "duplicate" is really a constructive addition to the original incident, they didn't want to lose the comment.  What they do right now (when they remember) is copy the comment and paste it into the original as a manually created note.

                       

                      Thanks for confirming that the placeholders won't work in Notes.  It doesn't look like Notes support valuetypes either, though.  Certainly I can't get the valuetype window by right-clicking.

                       

                      I think my workaround (where I send a Reminder to the monitored mailbox containing the parent Incident ID and the update keyword) will serve, but a better solution would require help from the SD product team.  I hear rumors that mail handling might be getting a refresh in an upcoming release of Service Desk, and if so maybe you could look into pulling the Exchange conversationIndex and ConversationID values.  Then whenever an e-mail comes in with a conversationIndex/ID matching that of an existing incident, that e-mail is treated as an update to the existing one.  You'd still want to keep the Update keyword concept for situations where someone who knows the update pattern sends a properly formatted, brand-new e-mail to the mailbox, but this would most like solve my issue.

                       

                      Another option might be to use Add Child, but that doesn't work well for a variety of reasons, not least of which is that the analysts don't tend to look for child tickets when they're reviewing case notes.

                       

                      Thanks.

                      • 8. Re: Convert Incident to Note
                        karenpeacock SupportEmployee

                        Great news that you are happy with a usable workaround for now.  Value types are available when you add an automatic action of Add Note within Process Designer.

                         

                        A good suggestion regarding the email enhancement.  I would suggest that you please create an ER for this so that people can vote on it and it will be on Product Management's radar when it comes to looking at mail: Service Desk-ER

                         

                        Regards

                        Karen

                        • 9. Re: Convert Incident to Note
                          Apprentice

                          This is a great workaround! I'm going to apply it in our process as this drives our guys mad too!!

                           

                          Thanks!