New HR Case Creation from the Email sent to already Closed HR Case

Tahzeeb
Giga Expert

Hello Experts,

 

I have a requirement where in User is Sending Email for the already closed HR Case.

Right now we have a Function where the reply is getting recorded as Comment in the Case.

I need to implement the solution where in a new HR Case is getting created in the above scenario and also no Comment is added to already Existing HR Case.

Kindly provide some guidelines on how to do it.

 

Regards,

TM

1 ACCEPTED SOLUTION

shloke04
Kilo Patron

Hi,

There is a good article from ServiceNow itself on the same topic on how to handle this. Please see the comments below:

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0794209

Use the following logic to add an inbound email action on a Business Rule:

// Where 6 is the value of your resolved state
if (current.state == 6) {
//Your inbound code here
}

if (current.active == false) {
// Activate a ticket is closed event if active is false (closed)
gs.eventQueue("ticket.closed", current, current.state, previous.state);
}

If the CASE/Incident is closed you can fire an event, which sends an email.

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

View solution in original post

7 REPLIES 7

Thankyou for the reply @shloke04 

 

I tried to use the above code but I don't see inbound Action being processed. In the Email Logs I could see the below Error

 

'did not create or update sn_hr_core_case using current'

 

Regards,

TM

Can you share the Script which you have updated in your Inbound actions to assist you further.

Regards,

Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hi Tahzeeb,

 

Did it work for you? Did you add the code to existing inbound action