If you create an incident from Connect Support, but continue with chat activity with the end user, an email message is generated for each chat update. These email messages are not necessary.

Steps to Reproduce

  1. Initiate a Connect Support chat queue session with a user.
  2. Create an incident from the Connect chat session.
  3. Continue chatting back and forth within the Connect session.
  4. Review the email log.
    Note that each message creates an incident.commented email. Connect chat should allow for decoupling of those messages. This could, for example, be handled by submitting a different event instead of incident.commented to allow email messages to be excluded for continued chat activity.


Check the transaction that is triggering the update to the comments of the incident. If it is from a Connect API, then that specific notification should not be sent. This can be done by making simple modifications to the business rule creating the events.

In a base system instance, the business rule responsible for the behavior is named "incident events." The following steps explain how to change the "incident events" business rule to correct the issue.

  1. Navigate to the "incident events" business rule using the following URL:


  2. Add the following new "getPath" function at the bottom of the script after all other lines of code:

    function getPath() {
    var transaction = GlideTransaction.get();
    if (!transaction)

    var req = transaction.getRequest();
    if (!req)

    var path = req.getRequestURI() || "";
    return path;

  3. Locate the lines of code that are creating the "incident.commented" event. In a base system instance, this code appears at the very top of the business rule as follows:

    if (current.operation() != 'insert' && current.comments.changes()) {
      gs.eventQueue("incident.commented", current, gs.getUserID(), gs.getUserName());

  4. Edit the code above so it reads as follows:

    // Changes below are to work around PRB681459. All this is doing is verifying the
    // transaction which triggered the business rule was a connect transaction using a regex.

    if (current.operation() != 'insert' && current.comments.changes()) {
    var path = getPath() || "";
    if (!path.match(/\/api\/now\/connect/))
    gs.eventQueue("incident.commented", current, gs.getUserID(), gs.getUserName());

  5. Save the business rule. 

    NOTE 1: if the connect API call changes in a future release then the business rule needs to be updated to check for that call instead.

    NOTE 2: The notifications for incident commented may use a condition (comments.changes) instead of the incident.commented event, and if this is the case, you need to change them to use the event instead. 

    1) Navigate to System Notification > Email >Notifications
    2) Search for the Name contains "incident" and "comment"
    3) Switch to the advanced view if needed
    4) In the when to send section, change "send when" to be Event is fired 
    5) Since the event name should already be set in the OOB notifications you just need to save the Notification. 


Related Problem: PRB681459

Seen In

Geneva Patch 4
Geneva Patch 6 Hot Fix 2
Geneva Patch 7
Geneva Patch 7 Hot Fix 2
Helsinki Patch 5
SR - Security - Integration Framework - Madrid 2019 Q2
SR - Security - Support Common - Madrid 2019 Q2
SR - Security - Support Orchestration - Madrid 2019 Q2
SR - VR - Rapid7 - London 2019 Q2 v.6.2.1
SR - VR - Vulnerability Response - New York 2019 Q3

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-06-06 03:25:52