Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Conversation- Scoped

The Conversation API enables you to create or modify Connect conversations.

To use this class in a scoped application, use the sn_connect namespace identifier. The Connect Scriptable APIs plugin (ID: com.glide.connect.scriptable) should be enabled to access the Conversation API.

Parent Topic:Server API reference

Conversation - addSubscriber(String sysID)

Adds a user to a conversation.

NameTypeDescription
sysIDStringSys_ID of the user you want to add to a conversation.
TypeDescription
void 
var conversation = sn_connect.Conversation.get("7caf49111309030034bb58a12244b06c");
conversation.addSubscriber("a8f98bb0eb32010045e1a5115206fe3a");

Conversation - create(String name)

Creates a Connect conversation.

NameTypeDescription
nameStringCreate a conversation with a specific name.
typeStringInclude a specific conversation type. The type is determined by the type choice list. The base system includes the following type options: - connect - support - group - peer - qanda - team
TypeDescription
ObjectScriptable Conversation
var conversation = sn_connect.Conversation.create({
    name: "Hello world",
    type: "connect"
});

Conversation - get(String sysID)

Returns an existing Connect conversation by sys_id.

NameTypeDescription
sysIDStringThe sys_id of the conversation record.
TypeDescription
ObjectConversation object
var conversation = sn_connect.Conversation.get("27b9844c1385030034bb58a12244b037");

Conversation - removeSubscriber(String sysID)

Removes a user from a conversation.

NameTypeDescription
SysIDStringThe sys_id of the user you want to remove from a conversation.
TypeDescription
void 
var conversation = sn_connect.Conversation.get("7caf49111309030034bb58a12244b06c");
conversation.removeSubscriber("a8f98bb0eb32010045e1a5115206fe3a");

Conversation - sendMessage(String body, String field)

Sends a message to a conversation.

NameTypeDescription
BodyStringThe main text of the message.
FieldStringThe field you want the message to appear as. Only use this option if adding a message to a record conversation. Choose from work_notes, comments, or system. Using the field system treats the message as a system message.
TypeDescription
void 
var conversation = sn_connect.Conversation.get("2064fa3919010300964f5270e9840fbb");
conversation.sendMessage({body: "Hello world", field: "work_notes"});