How to clear out On Hold Reason value after Incident State changes back to In Progress from On Hold

Roberta B
Mega Guru

We have a requirement that when an Incident ticket is in a State of 'On Hold and 'On Hold Reason' is 'Awaiting Caller', when the caller adds additional comments or respond back to an email notification to automatically change the State to 'In Progress'.  This is working.

However, after the Incident goes to 'In Progress' State, we cannot choose 'On Hold' state and 'On Hold Reason' of 'Awaiting Caller' again, because the 'On Hold Reason' still has the value in it, and when saving it flips back to 'In Progress'.

I believe the below script that is being used in the Business Rule is where I need to make a change, but I can't determine if that is the place to make a change.  And if so, what the change should be.  Or, if there is a UI Policy or something else I need to update?

find_real_file.png

 

find_real_file.png

find_real_file.png

1 ACCEPTED SOLUTION

Roberta B
Mega Guru

Hello -

Thank you everyone for your ideas.  I finally got this working by the following:

1) Marked the [Move "On Hold" to "In Progress"] Business Rule from Active = true to Active = false
find_real_file.png

 

find_real_file.png

 

2) Added the following script to the 'Actions' of the 'Inbound Email Action' of [Update Incident (BP)]:
gr.state = 2;
if (gr.state != 3)
gr.hold_reason = '';

find_real_file.png

find_real_file.png

3) Added the following additional action to the 'Incident State Change to In Progress' Business Rule 'Actions':
Set field values of 'On hold reason' To 'None'

find_real_file.png

find_real_file.png

View solution in original post

17 REPLIES 17

Dan H
Tera Guru

Hi Roberta,

Could you change the business rule to the following and give it a test?

find_real_file.png

Let me know the results

 

Please mark my answer as Correct/Helpful based on impact

Regards,

Dan H

Hi @Dan H -

I tried that already, and it doesn't work.  It lets me change from In Progress to On hold-Awaiting caller and sends the caller and email, as shown here:

 

find_real_file.png

 

Then, when the caller responds it goes back to In Progress state, as expected.   

However, the problem is that if I try to change it again from In Progress back to On Hold-Awaiting caller it flips it back to In Progress state and the value in the On Hold reason field isn't clearing.

Hi Roberta,

It might be an ordering issue

Try rearranging the Actions so that the On hold reason changes to "None'' before the other two actions change.

 

So that the order is:

  • On hold reason to none
  • State to in progress
  • Incident state to in progress

If that doesn't help I'll dive into it some more in my PDI and see if a script will solve the issue.

 

Please mark my answer as Correct/Helpful based on impact

Regards,

Dan H

Muhammad Khan
Mega Sage
Mega Sage

Hi Roberta,

 

As per my understanding of this Business Rule, once you have changed the state to In Progress then you will not be able to change the On Hold Reason to Awaiting Caller because whenever you try it matches the conditions again and changes the state back to In Progress state.

If you still want to achieve this requirement via this Business Rule then you need to have a custom flag field on the incident table in order to control this behavior. 

Note: You might need to modify Inbound Actions, if you want this to work with Emails/Notifications.

 

Below is the reference to a custom True/False field To On Hold (Awaiting Caller) which I have created to meet the requirements of your use-case;

find_real_file.png

Let me explain to you that how it works;

  • To change State and Incident State to In Progress, just make sure that To On Hold (Awaiting Caller) is False along with other conditions.
  • To change State to On Hold and On Hold Reason  to Awaiting Caller, make sure that To On Hold (Awaiting Caller) is True.

find_real_file.png

 

Hopefully this will help you a bit.

 

Regards,

Muhammad Khan