API Command: send_chat_message
The send_chat_message operation sends a chat message to an existing session. All members of the session see the chat message. The chat message can be sent on behalf of an existing member of the session, such as a customer or a representative, or it can be sent as a system message. The chat bot uses this API to send the end user's chat messages to the representative.
The command API is an authenticated API. For instructions on using authenticated APIs using OAuth, see Authenticate to the Remote Support API. The API account must have read-only or full access to the command API.
Required Parameters for send_chat_message
|lsid||GUID||required||This is the unique Logging Session ID (LSID) of the session in which the chat message will be sent.|
|body||string||required||The content of the chat message. Text formatting can be specified using BBCode (see below).|
This is a string identifying the user in the session from which the message appears to be sent. Valid values are:
If this parameter is not provided, the chat message is rendered as a system chat message.
|timestamp||integer||optional||The UNIX timestamp at which the chat message was originally sent. The timestamp must be in the past according to the appliance's clock. If not specified, chat messages are sent with the current time.|
The chat message's body can be formatted using the following BBCode:
|[b]bolded text[/b]||bolded text|
|[i]italicized text[/i]||italicized text|
|[u]underlined text[/u]||underlined text|
|[ul][li]list element 1[/li][li]list element 2[/li][/ul]||
Chat messages sent via this Command API include a special attribute in reports indicating which API Account originally sent the message. End users and representatives do not know the chat message came from an API Account unless they are in the session and see that the chat message is sent on their own behalf.
Real-time Chat Translations
Chat messages sent with this Command API operation are not affected by the Real-Time Chat Translations feature. All chat messages sent by this operation will be rendered to both customers and representatives exactly as they were specified in the API call. No real-time translation is performed.
Query Examples: send_chat_message