Notifications

10 views

Description

This document to inject connect messages in Connect support or peer to peer connect conversation via script

Cause

Scripting assistance

Resolution

If you can get the chat conversation live_group_profile id(You can query the current live_group_profile table with chat_queue_entry reference) then you can try posting using the LiveFeedMessage().postMessage() API. 

var convId = "SYS_ID"; //live_group_profile sys_id of chat conversation
var lm = new global.LiveFeedMessage();
var data = {
"message": "MESSAGE NEEDS TO BE POSTED",
"group_id": convId,
"from_profile":"SYS_ID" //live_profile sys_id of a user. The message will be posted on that user's behalf
};
lm.postMessage(data);

Additional Information

Please refer OOB Script Include - LiveFeedMessage - for more details about the data object. Invalid sys_id for "from_profile" will insert the message as posted by "system".

Article Information

Last Updated:2019-09-19 11:28:38
Published:2019-09-19