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 that if the connect API call changes in a future release then the business rule needs to be updated to check for that call instead.

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

Intended Fix Version


Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-02-22 13:27:30