4 Replies Latest reply on Mar 8, 2018 4:41 PM by hjohnson

    Change customer on an Incident from Internal Services to another user based on sender's email address

    hjohnson Employee

      I have a lot of servers that send email alerts to the email listener which in turn creates incidents.  Each server email address starts with the same three characters.  The email options are set so that when a ticket is created from an email and there isn't an employee record, it links it to the Internal Services user.

       

      How can I change the customer on the incident from Internal Services to another specified employee for the tickets that are created from an email that starts with those same characters?

        • 1. Re: Change customer on an Incident from Internal Services to another user based on sender's email address
          AlasdairRobertson ITSMMVPGroup

          I have a few ideas for this but the easiest is to create a workflow (example here) that pulls the email ToAddr field to the incident record then do a find on it and if it contains your 3 characters then search and link to your target employee.

          • 2. Re: Change customer on an Incident from Internal Services to another user based on sender's email address
            hjohnson Employee

            The link to the example was very helpful.  I'm also interested in your other ideas to accomplish the same thing.

             

            For anyone interested, here is what I did (using the link to the example above as reference):

             

            • Created an IncidentAssocJournalEmail relationship and added the condition "$([OtherObject]Incoming == true)" on the relationship.  I was only interested in the first email that created the incident.
            • Added a field to the Incident business object titled "SenderEmailAddress"
            • Created a Quick Action to pull the sender's address into the "SenderEmailAddress" field using the following expression: (ForEachChild("Incident#",  RecId, "Journal#Email.Rev2", $(FromAddr))).
            • Created a Quick Action to update the Incident with the employee record I wanted as the customer.
            • Created a Saved Search to show any Incidents from the Sender's Email Address (or in my case the ones that started with certain letters)
            • Created a workflow to pull everything together:

             

                 Configuration/Trigger

                

             

                 Workflow

                

                 Quick Action Block

                

                 Run for Search Block

                

            • 3. Re: Change customer on an Incident from Internal Services to another user based on sender's email address
              AlasdairRobertson ITSMMVPGroup

              Nicely done and a good write up, you can do it all in the same workflow if you want, once you have grabbed the email address to a field on your incident record you could use the Find() function to test the email address and set a boolean flag on the incident record then call an if block to test the flag, if it returns true it runs a search and link action to relate the record to a new owner.

               

              The following doesn't effect the work you have done (after all it works) but a couple of things to be aware of:

              • Workflows are not always instant, they run on a frequency based service so it is good to get as much of the functionality you want in to a single workflow if possible.
              • Using a run for search block over all the records in the database every time to update a single record will take longer as more records over time which could slow down the processing.
              • In the saved search ensure you exclude records that have been closed to avoid conflicting with final state rules.
              • 4. Re: Change customer on an Incident from Internal Services to another user based on sender's email address
                hjohnson Employee

                Thanks for the reply.  It all makes sense to keep as much in the workflow and I made changes as you suggested.  It seems to be quicker at updating the Customer field.