Reconnect after an interruption
On reconnect, repeat client.start with the saved key and wait for client.started. Create a replacement session only if newSessionRequired is true. Resolve an interrupted action’s effects before resending it; messageID correlates events and is not an idempotency guarantee.
The Socket.IO client API defines connect, disconnect and connect_error. The sections below define Voiceflow’s application events.
Session readiness after reconnecting
Wait for client.started before sending actions. When newSessionRequired is true, emit session.create and retain the replacement key. When it is false, the supplied session is ready. A network disconnect alone does not end the conversation.
error
Reports a runtime error through the error event. Read error for the message; code is optional. Socket.IO connection errors arrive separately through connect_error.
See the connection and session events for their full payloads.