Notifications

136 views

Description

This article explains how to insert a message into a Connect Chat or Connect Support conversation using Connect Action.

There might be business requirements where predefined messages need to be inserted in the chat by clicking a connect action. 

Release or Environment

Any release supporting Connect Support plugin

Cause

The suggested script below can be added into a Connect Action and it will result in the message displaying in the Connect conversation both for the Agent and End User

 

var id = sn_connect.Conversation.get(conversation.sys_id);
id.sendMessage({body:"MESSAGE HERE",field:'comments'});

Additional Information

For more details, refer to the below API

https://developer.servicenow.com/app.do#!/api_doc?v=london&id=conversation-sendMessage_String_String

Article Information

Last Updated:2019-12-12 06:41:49
Published:2019-12-12