setAgentInput() for Lightning Experience

Sets the text in the agent’s text box while showing typing indicators. This method works only in Lightning console apps.

Arguments 

NameTypeDescription
argumentObjObjectAn object containing all the arguments to be passed into this method.

argumentObj 

NameTypeDescription
recordIdStringThe ID of the work associated with the current chat.
messageObjectThe message to place in the agent’s text box. The message should be an object with a string property for the text value. For example: { text: "This is a sample message." }
setAtCursorBooleanIndicates whether to insert the message at the current cursor location. If false, the message overwrites any existing text. Default value is false.

Response 

Returns a Promise. Success resolves to true. The Promise is rejected if there’s an error.