Preserve a live chat conversation across a visitor disconnect and resume it

A visitor who reloads the page, navigates away and back, or loses connectivity briefly returns to the same conversation with its full history, using a token kept in the browser — rather than starting over.

When this happens: The visitor reloads or revisits the page.

How it works

  • EasyCRM closes the browser tab mid-conversation.
  • EasyCRM reopens https://www.acme.example later the same day.
  • The loader reads the stored VisitorToken from localStorage and calls ResumeAsync.
  • EasyCRM matches the token to a non-expired VisitorSession, reopens the same conversation with its full history, and issues a fresh visitor hub token.
  • Sees any operator replies that arrived while disconnected, already in the transcript.

Other paths

`localstorage` unavailable

Private browsing or blocked storage prevents localStorage. Falls back to a first-party cookie scoped to the widget's frame origin for the same purpose.

If something goes wrong

Token expired or unknown

The token matches no active session (expired — UC-22.21 — or never issued). Falls back to BootstrapAsync's normal new-session path without showing the visitor an error.

Good to know

  • LastSeenAt/ExpiresAt extend on every successful resume, keeping an actively-returning visitor's session alive.
  • Resume works across a full browser restart, not only a single-tab reconnect.