Use PDIs? Take our 5-minute survey to help shape the PDI roadmap.

Please suggest how to achieve this requirement in the case email notification:

ashok17
Tera Contributor

Hi All,

 

Please suggest how to achieve this requirement in the case email notification:

As mentioned below, the case notification is triggered whenever a case is resolved. However, the email notification contains the "Open the Case" link. If the user clicks on this case record link, the case status should be changed from Resolved to In Progress.

ashok17_0-1785651631900.png

 

3 REPLIES 3

Rafael Batistot
Kilo Patron

Hi @ashok17 

 

To achieve this, replace the standard email record link with a custom redirection endpoint or controller that updates the case status from Resolved to In Progress in the backend before instantly redirecting the user to the record page.

 

https://www.servicenow.com/docs/r/it-service-management/change-management/c_ConflictDetection.html

If this response was helpful, please mark it as Helpful and, if applicable, as Correct.
This helps other users find accurate and useful information more easily

Hi @Rafael Batistot ,

 

Thanks for response ,  i am using one email script 'SN924_link_opend_case' for the open the case, currently if case record is selects in the email notification it will redirect to csm portal view, but i need case state change resolved to inprogress.

 

(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {

// Add your code here
var userObj;
var agentURL;

//https://dev-portal.trustedcloudeurope.com/csm?id=csm_ticket&table=sn_customerservice_case&sys_id=c92...
agentURL = '<a href="' + gs.getProperty('glide.servlet.uri') + '/csm?id=csm_ticket&table=sn_customerservice_case&sys_id=' + current.sys_id + '">' + current.number + '</a>';
template.print(agentURL);
})(current, template, email, email_action, event);

Suryansh Verma
Mega Sage

@ashok17 

 

Do not make the existing Open the Case record hyperlink automatically change the case status. Keep the record link for navigation and add a separate action such as:

 

Reject Resolution / Reopen Case

 

For an OOTB Customer Service Management case, the supported lifecycle is:

  • Accept Solution: Resolved → Closed
  • Reject Solution: Resolved → Open
  • A customer update to the resolved case can also move it back to Open.

Therefore, the best-practice solution is to direct the user to the Case page in the Customer Service Portal and allow them to select Reject Solution, preferably with a mandatory reason. The existing Open the Case link can remain as a normal navigation link.

Why the link should not update the case immediately

A hyperlink uses an HTTP GET request. It should not directly perform a state-changing operation.

Email-security systems can rewrite and inspect links. Microsoft Defender Safe Links, for example, performs URL rewriting and link scanning for E-Mail messages.

A direct state-changing URL could therefore cause:

  • Cases being reopened unexpectedly
  • Reopening without a reason
  • Reopening by an unauthorized user
  • Duplicate actions when the link is clicked more than once
  • CSRF-related security concerns

ServiceNow recommends anti-CSRF protection specifically for state-changing requests

 

Use the following design:

  1. Rename the existing email link from Open the Case to View Case.
  2. Add a separate Reopen Case button.
  3. Make the button open an authenticated confirmation page.
  4. Require a reopen reason.
  5. Validate that the logged-in user is the case contact, consumer, opened-by user or authorised agent.
  6. Reopen only when the current state is still Resolved.
  7. Update the state to Open for OOTB CSM or In Progress for your customised lifecycle.
  8. Add the reopen reason to Comments and retain an audit trail.

The case should not be reopened merely because its record page was opened.