Prevent Duplicate case creation which is created by Inbound Action

Gayatrin
Tera Contributor

Hi,
I have an Inbound action created, through which an offboarding Lifecycle case is being created. I want to prevent duplicate case creation if a case already exists for that leaver(subject_person). Any suggestions on how we can do this?
Thanks in advance.

9 REPLIES 9

Hemanth M1
Giga Sage
Giga Sage

Hi @Gayatrin ,

 

in your inbound action script, get leaver name(using email subject may be using split function and glide the offboarding Lifecycle case table with leaver name, if exist abort the creation using current.setAbortAction(true)

 

 

 

 

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

Hi @Hemanth M1,

Thanks for your response. I have the below code which is included in Inbound Action. when an email is received from outlook, the target is empty case is not being created even though the leaver doesn't have the case created before.

RithikaN_0-1691905732808.png

RithikaN_1-1691905811464.png

 

Hi @Gayatrin , 

Couple of things to verify

1) Open the received email and under the email logs related list check whats the status of this inbound action did it run or skipped, if skipped check the reason

2) check in the same logs if any other inbound action is executing

 

May I know the else part of the script, how r u creating the case and the inbound action condition

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

Hi @Hemanth M1 ,

There are two logs related to this:
1.General : did not create or update sn_hr_core_case using current

2.Stop processing detected after executing script: General

Any other inbound is not executing.

Thanks