Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
How to create support chat conversation off of an existing incident with a chat agent - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • How to create support chat conversation off of an existing incident with a chat agent
KB0779360

How to create support chat conversation off of an existing incident with a chat agent


593 Views Last updated : Jan 3, 2025 public Copy Permalink
KB Summary by Now Assist

Summary

This article explains how to create connect support chat conversation off of an existing incident with a chat agent.

Instructions

Create a UI action called "Chat" on the Incident table with the following script

function chatRedirect() {
var queueID = 'b05cfd27d70122004f1e82285e61038d'; //sys_id of the chat queue you need to redirect to
location.href = '/$chat_support.do?queueID='+ queueID +'&fromTable=incident&fromSysID='+ g_form.getUniqueValue();
}

Create an after insert business rule on the chat_queue_entry table with When to Run condition Selected as ' From Type' is 'Incident' and following script.

(function executeRule(current, previous /*null when async*/) {

var inc = current.from_id.getRefRecord();

var groupID = current.getValue('group');

var profileID = '';

var linkUrl = "/incident.do?sys_id="+inc.getUniqueValue();

var linkName = inc.number+': '+inc.short_description;

var msg = "@L["+linkUrl+"|"+linkName+"]";

var grProfile = new GlideRecord('live_profile');

grProfile.addQuery('name', 'Cloud Support');

grProfile.addQuery('document', current.getUniqueValue());

grProfile.query();

if (grProfile.next()) {

profileID = grProfile.getUniqueValue();

}

var data = {

message: msg,

group_id: groupID,

from_profile: profileID

};

//add link if we have a valid one

if (linkUrl) {

data.links = [

{short_description: linkName, url: linkUrl}

];

}

var output = JSON.stringify(data, null, 4);

gs.log(output);

return new LiveFeedMessage().postMessage(data);

})(current, previous);

 

Related Links

Click on the Chat UI action and it will redirect you to the connect support page. Enter some text and hit "Send" in the support conversation. You will see a connect support conversation created with a connect card displaying incident details.


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.