From Bright Pattern Documentation
< 3.17:Mobile-web-api-specification
Revision as of 23:26, 17 October 2017 by Tracy (talk | contribs)
(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

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 Navigation

Chat Session Navigation is sent from the client with the client’s location (page name or URL).

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

The title is a page title of the client's website or webpage location.

The page is the name of the webpage or the URL of the webpage from which the client is chatting.

Format

{

“event”: “chat_session_navigation”,

“msg_id”: “<message id>”,

“title”: “<page title>”,

“page”: “<page name or page url>”

}


Chat Session Location

The Chat Session Location is sent from the client with the geographic location of the client.

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

The url is an optional identifier that provides the map URL location of the chat session.

The latitude and longitude are optional identifiers that provide the angular distance north or south of the chat session from the earth's equator.

Format

{

“event”: “chat_session_location”,

“msg_id”: “<message id>”,

“url”: “<map url (optional)>”,

“latitude”: “<latitude (optional)>”,

“longitude”: “<longitude (optional)>”

}


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>”,

}


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 Secure Form Data

Chat Session Secure Form Data is sent from the client as a response to Chat Session Secure Form Show.

Format

{

“event”: “chat_session_secure_form_data”,

“form_request_id”: “<form request ID>”,

“data”: {

“param1”: “value1”,

}

}


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 End

Chat Session End ends the chat session.

Format

{

“event”: “chat_session_end”

}


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>”

}




< Previous | Next >
< Previous | Next >