From Bright Pattern Documentation
Jump to: navigation, search
• 5.19 • 5.2 • 5.3 • 5.8

Client Events

Chat Session Message

Chat Session Message contains a new chat message.

The msg_id parameter is a unique identifier of the message in the following format (chatId:messageNumber).

The chatId is a unique identifier of the chat session that is returned by the server in response to client’s request for chat.

The messageNumber is the ordinal number of the given message in the chat exchange.

Format

{

“event”: “chat_session_message”,

“msg_id”: “<message id>”,

“msg”: “<chat message>”

}


Chat Session Typing

Chat Session Typing is sent when the user of the client application starts typing.

Format

{

“event”: “chat_session_typing”

}


Chat Session Not Typing

Chat Session Not Typing is sent when the user of the client application stops typing.

Format

{

“event”: “chat_session_not_typing”

}


Chat Session Form Data

Chat Session Form Data contains the data requested by the server via event Chat Session Form Show.

Format

{

“event”: “chat_session_form_data”,

“form_request_id”: “<form request ID from the corresponding server event>”,

“form_name”: “form name”,

“data”: {

“param1”: “value1”,

}

}


Chat Session End

Chat Session End ends the chat session.

Format

{

“event”: “chat_session_end”

}


Chat Session Disconnect

This ends the current chat conversation but keeps the session open (i.e., controlled by the scenario). This message can be used instead of Chat Session End when additional information may be expected from the server (e.g., a survey form).

Format

{

“event”: “chat_session_disconnect”

}


Chat Session Signaling

This is a container message for WebRTC signaling messages from client to server. These messages are not stored in the chat session history.

Format

{

“event”: “chat_session_signaling”,

“msg_id”: “<message id>”,

“destination_party_id”: “<agent party id>”,

“data”: “<signaling message>”

}


Chat Session File

Chat Session File provides notification that the client has uploaded a file to the server. Parameter file_id identifies the uploaded file.

Format

{

“event”: “chat_session_file”,

“msg_id”: “<message id>”,

“file_type”: “<image|attachment>”,

“file_id”: “<file id>”,

}


< Previous | Next >
< Previous | Next >