Duplicate Incidents created When User ❌(Not Resolved) in Survey Email Notification

devendar koduri
Tera Contributor

When an incident (INC) or request item (RITM) is resolved in ServiceNow, the user receives an Survey email notification with two options: (Resolved) and (Not Resolved).

 

If the user clicks , they are redirected to a survey page.

If the user clicks (Not Resolved), a new incident should be created.

 

Currently, if the user clicks the (Not Resolved) option multiple times, multiple duplicate incidents are being created.
Only one incident should be created, even if the user clicks multiple times.

Kindly help us to fix this requirement.

3 REPLIES 3

JackieZhang
Tera Contributor

you need to check whether inbound action is setting correctly.

Ankur Bawiskar
Tera Patron
Tera Patron

@devendar koduri 

are you tracking somewhere the new INC created associated with the already resolved INC?

If yes then you can use that and ensure duplicate INCs are not created.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Nilesh Pol
Tera Guru

@devendar koduri 

where your server-side code is written?

add script condition to verify incident has already existed, 

existingIncident.addQuery('issue_id', current.issue_id);
existingIncident.query();

    if (existingIncident.hasNext()) {
        // If an incident already exists, prevent the insert
        gs.addErrorMessage('An incident has already been created for this issue.');
        current.setAbortAction(true);
    }

 

If my response helped, please mark accept as a solution and close the thread so that it benefits future readers.