Companion

object Companion

Functions

Link copied to clipboard
fun appState(foreground: Boolean, conversationId: String? = null): ClientFrame

Foreground/background and the thread on screen (conversation_id is sent even when null).

Link copied to clipboard
fun auth(token: String, siteId: String, screen: ScreenInfo? = null, app: AppContext? = null, client: ClientInfo? = null, locale: String? = null, foreground: Boolean? = null): ClientFrame

First frame on every connection; must arrive within 5 s.

Link copied to clipboard
fun event(name: String, data: Map<String, Any?>? = null): ClientFrame

A custom event (recorded on the active conversation).

Link copied to clipboard
fun identify(userId: String? = null, email: String? = null, name: String? = null, phone: String? = null, hash: String? = null, data: Map<String, Any?>? = null): ClientFrame

Attach an identity or custom data to the visitor.

Link copied to clipboard

Keep-alive; the server replies pong.

Link copied to clipboard
fun rate(conversationId: String, score: Int, comment: String? = null): ClientFrame

Rate a resolved conversation.

Link copied to clipboard
fun read(conversationId: String, upToSeq: Int): ClientFrame

Read receipt up to upToSeq.

Link copied to clipboard
fun resume(conversationId: String, afterSeq: Int): ClientFrame

Ask for items after afterSeq of one of the visitor's conversations.

Link copied to clipboard

The app moved to another screen.

Link copied to clipboard
fun send(clientId: String, content: String, conversationId: String? = null, attachments: List<String>? = null): ClientFrame

Send a message; the reply is message.ack (the echo comes separately).

Link copied to clipboard
fun typing(conversationId: String, on: Boolean): ClientFrame

Typing indicator.