Skip to main content
One signed-in customer’s support conversation in this tab: the transcript, the draft, pending sends, and the help offer. Create it with connectConversation.

Constructor

Parameters

Returns

ConversationRuntime

Properties

The configuration it was created with.
The Hinto Signal help offer for this subject’s journeys. Reset by updateAuth.

Methods

addAttachments()

Add picked, pasted, or dropped files to the draft and start uploading each accepted one. Files the runtime refuses are reported and never uploaded.

Parameters

Iterable<File>
required

Returns

AttachmentAddResult

close()

Stops reading while the conversation is hidden. The draft and unread count are kept.

destroy()

Stops everything for good. Call it when the host unmounts support.

getSubject()

The authenticated subject the runtime currently serves, or null after logout.

Returns

string | null

markReadThrough()

Advance the tab-scoped read cursor for the current conversation. Only an open runtime in a visible document can mark replies read, the cursor never moves backwards, and it never moves past a support reply this runtime has actually received.

Parameters

string
required
number
required

Returns

boolean

open()

Shows the conversation: loads it, sends a pending message or a queued help offer contact, and keeps it current while open. Opening alone creates no ticket.

Returns

ConversationOutcome

removeAttachment()

Remove a draft file. An upload in flight is cancelled.

Parameters

string
required

retry()

Sends the pending message again after a failure, or reloads when nothing is pending.

Returns

ConversationOutcome

retryAttachment()

Upload a failed draft file again, when its bytes are still known.

Parameters

string
required

send()

Send the draft. With options.handoff, the message opens a conversation that carries the bot’s reason, summary, and chat before it; a blank reason answers invalid_draft.

Parameters

Returns

ConversationOutcome

setDraft()

Replaces the customer’s draft. It is kept for this tab across reloads.

Parameters

string
required

shareBotMessage()

Mirror a message your bot showed the end user into the team’s thread. Call it for every bot message while a conversation is open, and right after send({ handoff }) for the bot’s own goodbye: it waits for the conversation, keeps the order the user saw, and survives a reload. The same id is recorded once.

Parameters

{ id: string; text: string }
required

Returns

BotMessageOutcome

snapshot()

The current state, transcript, and draft. Deep-frozen; the same object until it changes.

Returns

ConversationSnapshot<File>

startNew()

After the conversation is resolved, makes the next send start a new one.

Returns

ConversationOutcome

subscribe()

Calls the listener on every snapshot change. Returns a function that stops the calls.

Parameters

(snapshot: ConversationSnapshot<File>) => void
required

Returns

() => void

sync()

Reads the conversation now, while it is open.

Returns

ConversationOutcome

unreadCount()

Delivered support replies observed since this tab’s baseline and not yet marked read. While closed this is the last-known count; closing never schedules another read.

Returns

number

updateAuth()

Switches to another signed-in customer, or signs out with null. Capture follows: the new subject’s identity, or a new anonymous session.

Parameters

ConversationAuth | null
required