Client Events

chat_session_message

This event contains a new chat message.

Parameters

ParameterDescription
msg_idUnique identifier of the message in the following format (chatId:messageNumber)
msgThe content of the message
channelThe chat channel (e.g., web, Twitter, WhatsApp, etc.)

Format

{
    "event": "chat_session_message",
    "msg_id": "<message id>",
    "msg": "<chat message>",
    "channel": "chat channel>
}

chat_session_message_delivered

The mobile application sends this event when it receives the message from another party.

Parameters

ParameterDescription
ref_msg_idUnique identifier of the message that has been delivered

Format

{
    "event": "chat_session_message_delivered",
    "ref_msg_id": "<message id>"
}

chat_session_message_read

The mobile application sends this event when the user reads the message.

Parameters

ParameterDescription
ref_msg_idUnique identifier of the message that has been read

Format

{
    "event": "chat_session_message_read",
    "ref_msg_id": "<message id>"
}

chat_session_typing

This event is sent when the user of the client application starts typing.

Format

{
    "event": "chat_session_typing"
}

chat_session_not_typing

This event is sent when the user of the client application stops typing.

Format

{
    "event": "chat_session_not_typing"
}

chat_session_form_data

This event contains the data requested by the server via the 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

This event contains the data requested by the server via the event chat_session_secure_form_show.

Format

{
    "event": "chat_session_secure_form_data",
    "form_request_id": "<form request ID from the corresponding server event>",
    "form_name": "<form name>",
    "data": {
        "param1": "value1",
        …
        }
}

chat_session_secure_form_cancel

This event 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": "<form request ID from the corresponding server event>"
}

chat_session_end

This event ends the chat session.

Format

{
    "event": "chat_session_end"
}

chat_session_disconnect

This event 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_signaling

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

Parameters

ParameterDescription
msg_idUnique identifier of the message in the following format (chatId:messageNumber)
chatIdUnique identifier of the chat session that is returned by the server in response to client’s request for chat
messageNumberOrdinal number of the given message in the chat exchange

Format

{
    "event": "chat_session_signaling",
    "msg_id": "<message id>",
    "destination_party_id": "<agent party id>",
    "data": "<signaling message>"
}

chat_session_file

This event provides notification that the client has uploaded a file to the server.

Parameters

ParameterDescription
msg_idUnique identifier of the message in the following format (chatId:messageNumber)
chatIdUnique identifier of the chat session that is returned by the server in response to client’s request for chat
messageNumberOrdinal number of the given message in the chat exchange
fileIdIdentifies the uploaded file

Format

{
    "event": "chat_session_file",
    "msg_id": "<message id>",
    "file_type": "<image|attachment>",
    "file_id": "<file id>"
}

chat_session_location

This event contains a new geographical location message.

Parameters

ParameterDescription
msg_idUnique identifier of the message in the following format (chatId:messageNumber)
urlMap URL (optional)
latitudeLatitude of the location
longitudeLongitude of the location

Format

{
    "event": "chat_session_location",
    "msg_id": "<message id>"
    "url": "<map URL (optional)>",
    "latitude": "<latitude>",
    "longitude": "<longitude>"
}

chat_session_navigation

This event is sent from the client with its web page location (i.e., the page name or the URL).

Parameters

ParameterDescription
msg_idUnique identifier of the message in the following format (chatId:messageNumber)
titlePage title
pagePage name or page url

Format

{
    "event": "chat_session_navigation",
    "msg_id": "<message id>",
    "title": "<page title>",
    "page": "<page name or page url>"
}

chat_session_cobrowsing_rejected

This event notifies the server that the user has rejected a co-browsing session.

Format

{
    "event": "chat_session_cobrowsing_rejected"
}

chat_session_cobrowsing_started

This event notifies the server that the user has accepted and started a co-browsing session.

Format

{
    "event": "chat_session_cobrowsing_started",
    "provider_type": "<Name of chat co-browsing provider>",
    "cobrowsing_url": "<URL of the co-browsing session>"
}

chat_session_cobrowsing_ended

This event notifies the server that the user has ended the co-browsing session.

Format

{
    "event": "chat_session_cobrowsing_ended"
}


What’s Next