From Bright Pattern Documentation
Jump to: navigation, search
 
(Redirected page to Api)
 
Line 1: Line 1:
<translate>= Server Events=
+
#REDIRECT [[Api]]
 
 
== 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 ===
 
{|border="1" style="border-collapse:collapse" cellpadding="5"
 
|''{''
 
 
 
''“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 ===
 
{|border="1" style="border-collapse:collapse" cellpadding="5"
 
|''{''
 
 
 
''“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 ===
 
{|border="1" style="border-collapse:collapse" cellpadding="5"
 
|''{''
 
 
 
''“event”: “chat_session_party_joined”,''
 
 
 
''“party_id”: “&lt;party id&gt;”,''
 
 
 
''“first_name”: “&lt;party first name&gt;”,''
 
 
 
''“last_name”: “&lt;party last name&gt;”,''
 
 
 
''“display_name”: “&lt;party display name&gt;”,''
 
 
 
''“type”: “&lt;scenario|external|internal&gt;”,''
 
 
 
''“timestamp”: “&lt;UTC timestamp in milliseconds&gt;”''
 
 
 
''}''
 
|}
 
 
 
 
 
== 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 ===
 
{|border="1" style="border-collapse:collapse" cellpadding="5"
 
|''{''
 
 
 
''“event”: “chat_session_party_left”,''
 
 
 
''“party_id”: “&lt;party id&gt;”,''
 
 
 
''“timestamp”: “&lt;UTC timestamp in milliseconds &gt;”''
 
 
 
''}''
 
|}
 
 
 
 
 
== 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 ===
 
{|border="1" style="border-collapse:collapse" cellpadding="5"
 
|''{''
 
 
 
''“event”: “chat_session_message”,''
 
 
 
''“party_id”: “&lt;party id&gt;”,''
 
 
 
''“msg_id”: “&lt;message id&gt;”,''
 
 
 
''“msg”: “&lt;chat message&gt;”,''
 
 
 
''“timestamp”: “&lt;UTC timestamp in milliseconds &gt;”''
 
 
 
''}''
 
|}
 
 
 
 
 
== 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 ===
 
{|border="1" style="border-collapse:collapse" cellpadding="5"
 
|''{''
 
 
 
''“event”: “chat_session_typing”,''
 
 
 
''“party_id”: “&lt;party id&gt;”''
 
 
 
''}''
 
|}
 
 
 
 
 
== 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 ===
 
{|border="1" style="border-collapse:collapse" cellpadding="5"
 
|''{''
 
 
 
''“event”: “chat_session_not_typing”,''
 
 
 
''“party_id”: “&lt;party id&gt;”''
 
 
 
''}''
 
|}
 
 
 
 
 
== 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 [[mobile-web-api-specification/ClientEvents#Chat_Session_Form_Data|Chat Session Form Data]].
 
 
 
=== Format ===
 
{|border="1" style="border-collapse:collapse" cellpadding="5"
 
|''{''
 
 
 
''“event”: “chat_session_form_show”,''
 
 
 
''“form_request_id”: “&lt;request ID that will be used by the client application to associate the response &gt;”,''
 
 
 
''“form_name”: “&lt;predefined form name known to the client application&gt;”''
 
 
 
''“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 ===
 
{|border="1" style="border-collapse:collapse" cellpadding="5"
 
|''{''
 
 
 
''“event”: “chat_session_timeout_warning”,''
 
 
 
''“msg”: “&lt;warning text&gt;”,''
 
 
 
''“timestamp”: “&lt;UTC timestamp in milliseconds&gt;”''
 
 
 
''}''
 
|}
 
 
 
 
 
== 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 ===
 
{|border="1" style="border-collapse:collapse" cellpadding="5"
 
|''{''
 
 
 
''“event”: “chat_session_inactvity_timeout”,''
 
 
 
''“msg”: “&lt;inactivity timeout text&gt;”,''
 
 
 
''“timestamp”: “&lt;UTC timestamp in milliseconds&gt;”''
 
 
 
''}''
 
|}
 
 
 
 
 
== Chat Session Signaling ==
 
This is a container message for WebRTC [[mobile-web-api-specification/SignalingMessageTypes|signaling messages]] from server to client. These messages are not stored in the chat session history.
 
 
 
=== Format ===
 
{|border="1" style="border-collapse:collapse" cellpadding="5"
 
|''{''
 
 
 
''“event”: “chat_session_signaling”,''
 
 
 
''“msg_id”: “&lt;message id&gt;”,''
 
 
 
''“party_id”: “&lt;party_id&gt;”,''
 
 
 
''“data”: “&lt;signaling message&gt;”''
 
 
 
''}''
 
|}
 
 
 
 
 
== 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 ===
 
{|border="1" style="border-collapse:collapse" cellpadding="5"
 
|''{''
 
 
 
''“event”: “chat_session_file”,''
 
 
 
''“party_id”: “&lt;party id&gt;”,''
 
 
 
''“msg_id”: “&lt;message id&gt;”,''
 
 
 
''“file_id”: “&lt;file id&gt;”,''
 
 
 
''“file_type”: “&lt;image|attachment&gt;”,''
 
 
 
''“timestamp”: “&lt;event time in Unix format&gt;”''
 
 
 
''}''
 
|}
 
 
 
 
 
 
 
<center>[[mobile-web-api-specification/ClientEvents|< Previous]]  |  [[mobile-web-api-specification/SignalingMessageTypes|Next >]]</center>
 
</translate>
 

Latest revision as of 22:56, 6 August 2020

Redirect to:

• 5.19 • 5.2 • 5.3 • 5.8

/prevnext/