The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Inbound email action to change incident state

Travers M
Mega Guru

We've gone in and configured the system to allow incoming emails but only via reply.   Now I'm faced with a different task.   We have a state on the incidents of Need More Information which will pause an SLA.   I need to add something that will change the state of the incident to a work in progress that will then resume the SLA as we are no longer waiting on the user.     Is inbound email action even the best way to approach this or should I look elsewhere?

1 ACCEPTED SOLUTION

It might be as simple as this if the 'Need for Information' is a value of 4 and work in progress is a value of 2



if ((email.from == current.caller_id.email) && (current.incident_state == 4)){          


                current.incident_state = 2;


  }



or if you use the state field instead of incident state:


if ((email.from == current.caller_id.email) && (current.state == 4)){          


                current.state = 2;


  }



I hope this helps.



Best regards,
David


View solution in original post

13 REPLIES 13

As I'm not overly experienced in the scripting realm yet, is that one fairly simple and straight forward?     I haven't created many but I've changed a few to suit our needs within the system.


It might be as simple as this if the 'Need for Information' is a value of 4 and work in progress is a value of 2



if ((email.from == current.caller_id.email) && (current.incident_state == 4)){          


                current.incident_state = 2;


  }



or if you use the state field instead of incident state:


if ((email.from == current.caller_id.email) && (current.state == 4)){          


                current.state = 2;


  }



I hope this helps.



Best regards,
David


That did exactly what I needed it to do.   That way if someone from the watch list replies, it won't change the status to a work in progress and that would rely solely on the user.   Thank you for all of your help


Dave,



I am trying to implement an inbound script that changes the incident_state to new when a customer provides an update via email regardless of what status the ticket is in.   I tried using part of your script, but I think I am missing something.   Can you help?



Here is what I am trying to use.



if (email.from == current.caller_id.email) {                             current.incident_state = 1;     }




Thanks,


Chris


Hi Chris,



Are you setting caller_id before this statement? You should set caller ID or try if( email.from == 'YOUR VENDOR EMAIL ADRESS'){


//Execution of business logic


}



Best Regards,


Mateen



S Abdul Mateen


Consultant, CIO Advisory


Management Consulting



KPMG Global Services,


RMZ Ecoworld,


Bangalore, India



(D) +91 80-6781-7104


amshaik@kpmg.com<mailto:amshaik@kpmg.com>