|
|
Line 1: |
Line 1: |
− | <translate>= Client Events=
| + | #REDIRECT [[Api]] |
− | | |
− | == 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 [[mobile-web-api-specification/RequestChat|request for chat]].
| |
− | | |
− | The ''messageNumber'' is the ordinal number of the given message in the chat exchange.
| |
− | | |
− | === Format ===
| |
− | {|border="1" style="border-collapse:collapse" cellpadding="5"
| |
− | |''{''
| |
− | | |
− | ''“event”: “chat_session_message”,''
| |
− | | |
− | ''“msg_id”: “<message id>”,''
| |
− | | |
− | ''“msg”: “<chat message>”''
| |
− | | |
− | ''}''
| |
− | |}
| |
− | | |
− | | |
− | == Chat Session Typing ==
| |
− | ''Chat Session Typing'' is sent when the user of the client application starts typing.
| |
− | | |
− | === Format ===
| |
− | {|border="1" style="border-collapse:collapse" cellpadding="5"
| |
− | |''{''
| |
− | | |
− | ''“event”: “chat_session_typing”''
| |
− | | |
− | ''}''
| |
− | |}
| |
− | | |
− | | |
− | == Chat Session Not Typing ==
| |
− | ''Chat Session Not Typing'' is sent when the user of the client application stops typing.
| |
− | | |
− | === Format ===
| |
− | {|border="1" style="border-collapse:collapse" cellpadding="5"
| |
− | |''{''
| |
− | | |
− | ''“event”: “chat_session_not_typing”''
| |
− | | |
− | ''}''
| |
− | |}
| |
− | | |
− | | |
− | == Chat Session Form Data ==
| |
− | ''Chat Session Form Data'' contains the data requested by the server via event [[mobile-web-api-specification/ServerEvents#Chat_Session_Form_Show|Chat Session Form Show]].
| |
− | | |
− | === Format ===
| |
− | {|border="1" style="border-collapse:collapse" cellpadding="5"
| |
− | |''{''
| |
− | | |
− | ''“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 ==
| |
− | ''Chat Session End'' ends the chat session.
| |
− | | |
− | === Format ===
| |
− | {|border="1" style="border-collapse:collapse" cellpadding="5"
| |
− | |''{''
| |
− | | |
− | ''“event”: “chat_session_end”''
| |
− | | |
− | ''}''
| |
− | |}
| |
− | | |
− | | |
− | == 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 [[mobile-web-api-specification/ClientEvents#Caht_Session_End|Chat Session End]] when additional information may be expected from the server (e.g., a survey form).
| |
− | | |
− | === Format ===
| |
− | {|border="1" style="border-collapse:collapse" cellpadding="5"
| |
− | |''{''
| |
− | | |
− | ''“event”: “chat_session_disconnect”''
| |
− | | |
− | ''}''
| |
− | |}
| |
− | | |
− | | |
− | == Chat Session Signaling ==
| |
− | This is a container message for WebRTC [[mobile-web-api-specification/SignalingMessageTypes|signaling messages]] from client to server. 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”: “<message id>”,''
| |
− | | |
− | ''“destination_party_id”: “<agent party id>”,''
| |
− | | |
− | ''“data”: “<signaling message>”''
| |
− | | |
− | ''}''
| |
− | |}
| |
− | | |
− | | |
− | == 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 ===
| |
− | {|border="1" style="border-collapse:collapse" cellpadding="5"
| |
− | |''{''
| |
− | | |
− | ''“event”: “chat_session_file”,''
| |
− | | |
− | ''“msg_id”: “<message id>”,''
| |
− | | |
− | ''“file_type”: “<image|attachment>”,''
| |
− | | |
− | ''“file_id”: “<file id>”,''
| |
− | | |
− | ''}''
| |
− | |}
| |
− | | |
− | | |
− | | |
− | <center>[[mobile-web-api-specification/GetAgentProfilePhoto|< Previous]] | [[mobile-web-api-specification/ServerEvents|Next >]]</center>
| |
− | </translate>
| |