5 Replies Latest reply on Nov 20, 2017 4:33 AM by AlasdairRobertson

    Inserting Email addresses to Incident Description

    ClaytonHC Rookie

      We have created email thread for automated tickets - these tickets are created when a batch fails to load data to one of our clients. We have set up Distribution groups in Outlook for when an email is sent. But in the batch creation they have the option to change who the email gos to for alerting if it fails. so in image #1 this is the initial email generated in the Activity History of the Incident. The person running the batch chose the email list in image # 2 , then we want to bring in the To: email addresses from image #2 to the Description area of the ticket as shown in image #3.

       

      I was wondering if anyone has done anything like this and can offer a suggestion on creating the function for the Description field of this type of Automated ticket/emails

       

      1-

      initial email.PNG

      2-

      Email sent to.PNG

      3-

      Where to put emails in details.PNG

        • 1. Re: Inserting Email addresses to Incident Description
          michael.odriscoll SupportEmployee

          Hi Clayton,

           

          Thanks for posting to the Community.

           

          Do you have an update you can share here? It might be worth checking out the Advice Center.

           

          Michael

          • 2. Re: Inserting Email addresses to Incident Description
            SupportEmployee

            I am moving this thread to the Heat community as it relates to Heat Service Manager.

            • 3. Re: Inserting Email addresses to Incident Description
              AlasdairRobertson ITSMMVPGroup

              Hi ClaytonHC

               

              It is possible to grab the Emails To field and insert it in to the Incident description.  You will need a new relationship on the Incident Object to Journal.Email (this is so we can access the records stored there) now if this is the first incoming email i.e the one creating the incident then it makes life easier.  Relationship example:

               

              Add a new relationship called IncidentContainsJournalEmail

              • Relates to Journal.EMail
              • Relationship Type: Contains
              • Incident Object
                • Cardinality: Zero or One 0..1
                • Field: RecId
              • Journal.EMail Object (RecId)
                • Cardinality: Zero or Many 0..N
                • Field: ParentLink

               

              You can then use a quick action to grab the email addresses using this function $(ForEachChild("Incident#",  RecId,  "Journal#Email.Rev2",  $(ToAddrList)))

               

              Now it will grab all the To: email addresses from the attached emails.  there are a few ways to manage and automate this below, if you just want the first email address at the point of triage you can set the relationship condition to Incoming == True and the relationship will only be created for Incoming mails.

               

              Automation Attempts:

              I first tried and failed to use the relationship update features to set a new field called IncommingToAddress to the ToAddress field from Journal.Email and then run a business rule to add the email addresses to the email description.  The ToAddress feild never copied to the Incident record, as seen in this thread: https://community.ivanti.com/thread/59860

               

              The solution that did work was to use a workflow, especially if you are triggering directly from an incoming mail (possible time delay in saving the record not too sure).  So add a workflow to the incident object that runs when a new ticket is created and the Created By == Email Listener.  Then add a wait block to wait for 1 minute then call the quick action to grab the ToAddress field using a ForEachChild command.

               

              Run up an example in your staging tenant and have a play.

              3 of 3 people found this helpful
              • 4. Re: Inserting Email addresses to Incident Description
                chad.arjoon Rookie

                Thank you very much for this. Good write up on how to make this work.

                 

                I did something very similar, but instead of adding it to the subject line I added a new field to the Incident that is visible only if the ticket was created by an email listener. My only issue is that it grabs all email addresses from the To: section on the initial email. I do have some users who send an email to a listener but also include other To addresses, so the listener address can get lost in the result. I'm thinking I may need another constraint where it would only display if the address matches an active email listener but I'm assuming that would take another relationship. Any ideas on how to go about doing that?

                • 5. Re: Inserting Email addresses to Incident Description
                  AlasdairRobertson ITSMMVPGroup

                  Yes, you then need to write a loop which extracts each email address in turn to its own field and then compares it to a value or lookup table.  If a match is found exit the loop if not then grab the next email address from the string and push it through your test.