Skip to main content
v1 Subscribe to LeadScout session updates to follow each LeadScout session in your workspace: when it starts, when it changes stage, when it is handed off or dropped, and when it is deleted. Each event uses the common envelope, and its payload carries the session as it is after the change.

Event types

Changes to a session that was already marked deleted emit nothing, and neither does a session removed without being marked deleted first.

Envelope


Payload

Fields without a value, or with an empty one, are left out of the payload. No other session attribute is ever sent.

Phone

externalUserPhone is resolved on a best-effort basis: the phone of the contact in externalUserId; otherwise, the phone of the conversation’s only external participant. When neither gives a phone, the field is left out and the event is still sent. A phone change can take a few minutes to show in the events.

handedOffOperatedBy is not the receiving advisor

handedOffOperatedBy and handedOffOperatedByType identify who performed the hand-off, usually the AI agent. They do not say which advisor received the lead. To know the receiving advisor, also subscribe to conversation updates: the hand-off shows there as participantsDelta.added.internals on the session’s conversationId.

When an event is sent

  • Only a change to stage, a stage timestamp (startedAt, engagedAt, qualifiedAt, handedOffAt, droppedAt), the hand-off or drop details, externalUserId, origin, campaignCaptureStatus, finalized or deletedAt produces leadscout_session.updated.
  • A change to id, conversationId or durationSeconds alone does not produce an event, nor does a change to any attribute the payload does not carry.
  • A leadscout_session.updated whose changedFields is empty is not sent.

Ordering

Delivery may be duplicated or out of order. sequence orders events of one session only; do not compare it across sessions.
  • Apply an event only if its sequence is greater than the last one you stored for that session.
  • Compare sequence as a big integer or as a zero-padded string, never as a floating-point number.
  • Treat an update for a session you have not seen yet as an insert. Sessions that existed before you subscribed appear on their first change.

Examples