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

Auto Resolve ticket

Bryan Ngai
Giga Contributor

I am trying to figure out how to do this. Here is the scenario I am trying to solve for.

 

Someone logs an incident, IT picks it up and replies and puts the ticket on hold - awaiting caller. User does not reply within 3 business days and then IT wants an automated message to go to the user with a templated email stating that their incident is still on hold and will auto resolve in 3 business days if there is no reply. Wait another 3 business days and if there is no reply, auto resolve the ticket. 

 

I tried using a workflow for this but can't figure out what needs to be done to restart the workflow if a user replies back within those 3+3 days

 

Any help or guidance is appreciated!

5 REPLIES 5

Giles Lewis
Giga Guru

You do not want to restart the workflow. You want to cancel the workflow.

If the caller replies back, then a Comment will be added to the Incident. But you do not want to just cancel if you receive an email: you want to cancel if the caller adds a comment via any mechanism (email, platform UI, Service Portal, mobile).

Use a Before Update Business Rule with these 3 conditions

  • Incident is updated by the Caller
  • Comment is added
  • Incident is "On Hold"

Your code might look something like this:

if (current.comments.changes() && 
current.state == 3 /* On Hold */ &&
current.caller_id == gs.getUserID() ) {
// take it off hold
current.state = 2; /* Set to In Progress */
// cancel the workflow
var workflow = new Workflow();
workflow.cancel(current);
}

Now, if the IT staff member puts the Incident back on Hold, it should start a brand new workflow.

Please mark reply as Helpful and/or Correct if applicable.

Thanks Giles! Let me try this out and get back to you!

 

Jonathan72
Tera Contributor

What you are implementing is the 3 strike rule I guess. When I implemented it I created a field on incident to store the strike number. 

Then create a BR to trigger set the first strike when the incident changes to awaiting. 

Another BR to calculate the 3 business days and  trigger the scheduled event for the notification.

A script action associated to the event to update the strike number and updating in the incident. First you have to have to check the status of the incident, if the status of the incident is not awaiting user anymore or is the last strike, reset he strike number. 

Another way to implement it it is with the flow designer, though behind the scenes is the same behaviour, with scheduled events and br

Ian Mildon
Tera Guru

There is an OOB Business Rule called "Incident State Change to In Progress" that will handle the placing the Incident back to In Progress when the Caller makes an update. All you will need to do to it is add to the "Advanced" tab and place this piece of script to delete the workflow:

new Workflow().deleteWorkflow(current); //delete

While there are options to cancel or restart the workflow, I chose to delete it. That way if the same incident is placed back on hold awaiting caller at a later point, the workflow will always start fresh