From Bright Pattern Documentation
< 3.10:Mobile-web-api-specification
Revision as of 20:28, 21 March 2016 by Sasha (talk | contribs) (Client Events)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
• 3.10 • 3.11 • 3.12 • 3.13 • 3.14 • 3.15 • 3.16 • 3.17 • 3.18

Client Events

Chat Session Message

Description 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

Description Sent when the user of the client application starts typing.
Format {

“event”: “chat_session_typing”

}


Chat Session Not Typing

Description Sent when the user of the client application stops typing.
Format {

“event”: “chat_session_not_typing”

}


Chat Session Form Data

Description 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

Description Ends the chat session.
Format {

“event”: “chat_session_end”

}


Chat Session Disconnect

Description 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

Description 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

Description Notifies 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 >