Using survey to close incident

Alex Ng
Tera Contributor

Hey everyone,

 

I would like to seek help and ideas on the use of survey to close incident. I have this scenario on a normal incident cycle, a survey should be sent to the end user upon the Resolved state of an incident. Then, upon completion of the survey by the end user, this action will auto trigger a Closed state to the incident that is raised by the user.

 

Does anyone have any ideas how I could do this especially the technical side in updating the incident via a survey. Appreciate your help.

Thank you.

1 ACCEPTED SOLUTION

Hi Alex,



Write Async business rule on table "task_survey" check the check box updated


and condition is current.state == 'completed'.




Write code to change state to closed.




      var gr = new GlideRecord('incident');


  gr.addQuery('sys_id', current.task);


  gr.query();


  if(gr.next())


  {



  gr.state = 7;


  gr.update();


  }



Regards,


Harish.


View solution in original post

4 REPLIES 4

andrewdunn
Giga Expert

Hi Alex - what if the user says the issue is not resolved and returns the survey which closes the ticket (unhappy customer).


We have set up the following:


  • when a ticket is resolved the user gets an email advising the ticket has been resolved and provides the opportunity for them to respond saying no.
  • If they do not respond then the ticket is auto closed 5 days later.

I would recommend the above and have the survey sent after closure - do not have the ticket management workflow dependent on the survey as you will end up with process and ticket management issues down the track. Als,o be careful about sending out a survey for every ticket as your Power users will get sick of the spam.


Hope this helps


cheers


Hi Andrew,



Thanks for your reply. I was wondering whether I could track any answers in the survey to close the ticket. This is because the management wanted to ensure every ticket that is closed, will have an end user's feedback to it. That is why I have a design where the survey is sent out between Resolved and Closed state.



This is to ensure that, the management get a both the survey reports and incident reports to be in sync in quantity. Thank you.


Hi Alex,



Write Async business rule on table "task_survey" check the check box updated


and condition is current.state == 'completed'.




Write code to change state to closed.




      var gr = new GlideRecord('incident');


  gr.addQuery('sys_id', current.task);


  gr.query();


  if(gr.next())


  {



  gr.state = 7;


  gr.update();


  }



Regards,


Harish.


Thanks Harish.



This does the trick.