From Bright Pattern Documentation
< 3.17:Mobile-web-api-specification
Revision as of 23:30, 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

Server Events

Chat Session Status

Chat Session Status updates the current state of the chat session. If the state is failed, the client application shall assume that the chat session no longer exists.

Format

{

“event”: “chat_session_status”,

“state”: “queued|connecting|connected|failed|completed”,

“ewt”: “estimated waiting time for queued status”

}


Chat Session Ended

Chat Session Ended indicates a normal termination of the chat session (e.g., when the chat session is closed by the agent). The client application shall assume that the chat session no longer exists.

Format

{

“event”: “chat_session_ended”

}


Chat Session Party Joined

Chat Session Party Joined indicates that a new party (a new agent) has joined the chat session. The party_id is a unique identifier of the chat session on the server side. A separate identifier is generated for each party (agent) that handles this chat session.

Format

{

“event”: “chat_session_party_joined”,

“party_id”: “<party id>”,

“first_name”: “<party first name>”,

“last_name”: “<party last name>”,

“display_name”: “<party display name>”,

“type”: “<scenario|external|internal>”,

“timestamp”: “<UTC timestamp in milliseconds>”

}


Chat Session Party Left

Chat Session Party Left indicates that one of the existing parties (an agent) has left the chat session. The party_id is a unique identifier of the chat session on the server side. A separate identifier is generated for each party (agent) that handles this chat session.

Format

{

“event”: “chat_session_party_left”,

“party_id”: “<party id>”,

“timestamp”: “<UTC timestamp in milliseconds >”

}


Chat Session Message

Chat Session Message contains a new chat message.

The msg_id parameter is a unique identifier of the message.

The partyId is a unique identifier of the party that sends this message.

A separate identifier is generated for each party (agent) that handles this chat session.

Format

{

“event”: “chat_session_message”,

“party_id”: “<party id>”,

“msg_id”: “<message id>”,

“msg”: “<chat message>”,

“timestamp”: “<UTC timestamp in milliseconds >”

}


Chat Session Location

Chat Session Location is sent from the server with the geographic location.

The partyId is a unique identifier of the party that sends this message.

The msg_id parameter is a unique identifier of the message.

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

“party_id”: “<party id>”,

“msg_id”: “<message id>”,

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

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

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

}


Chat Session File

Chat Session File provides notification that a file is being sent to the client--the client can use file_id to download the file.

The msg_id parameter is a unique identifier of the corresponding message.

The partyId is a unique identifier of the party that sends this message.

Format

{

“event”: “chat_session_file”,

“party_id”: “<party id>”,

“msg_id”: “<message id>”,

“file_id”: “<file id>”,

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

“timestamp”: “<event time in Unix format>”

}


Chat Session Typing

Chat Session Typing is sent when the agent starts typing. The party_id is a unique identifier of the chat session on the server side. A separate identifier is generated for each party (agent) that handles this chat session.

Format

{

“event”: “chat_session_typing”,

“party_id”: “<party id>”

}


Chat Session Not Typing

Chat Session Not Typing is sent when the agent stops typing. The party_id is a unique identifier of the chat session on the server side. A separate identifier is generated for each party (agent) that handles this chat session.

Format

{

“event”: “chat_session_not_typing”,

“party_id”: “<party id>”

}


Chat Session Form Show

Chat Session Form Show is sent to the request user’s input from the client application to be entered via a predefined form. The client application is normally supposed to display the specified form to the user and send back the entered data via event Chat Session Form Data.

Format

{

“event”: “chat_session_form_show”,

“form_request_id”: “<request ID that will be used by the client application to associate the response >”,

“form_name”: “<predefined form name known to the client application>”

“form_timeout”: “form timeout”

}


Chat Session Secure Form Cancel

Chat Session Secure Form Cancel is sent from or to the server to notify that the secure form was canceled.

Format

{

“event”: “chat_session_secure_form_cancel”,

“form_request_id”: “<GUID from show request>”

}


Chat Session Secure Form Show

Chat Session Secure Form Show message is sent from the server to ask the client to show the secure form.

Format

{

'“event”: “chat_session_secure_form_show”,

“form_request_id”: “<GUID to be used for sending entered form data in response >”

“form_id”: “<form id>”

}


Chat Session Timeout Warning

Chat Session Timeout Warning is sent to request that the specified text be displayed to the user of the client application. Typically, it is used to display an inactivity warning message.

Format

{

“event”: “chat_session_timeout_warning”,

“msg”: “<warning text>”,

“timestamp”: “<UTC timestamp in milliseconds>”

}


Chat Session Inactivity Timeout

Chat Session Inactivity Timeout indicates the termination of the chat session due to the user’s inactivity and provides text to be displayed to the user. The client application shall assume that the chat session no longer exists.

Format

{

“event”: “chat_session_inactvity_timeout”,

“msg”: “<inactivity timeout text>”,

“timestamp”: “<UTC timestamp in milliseconds>”

}


Chat Session Signaling

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

Format

{

“event”: “chat_session_signaling”,

“msg_id”: “<message id>”,

“party_id”: “<party_id>”,

“data”: “<signaling message>”

}




< Previous | Next >
< Previous | Next >