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

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

}


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

}


< Previous | Next >
< Previous | Next >