ambient:update event includes an ambientSessionId. That is the unique ID for that recording session.
Use it to follow the session lifecycle and when you report issues to support. You can also read the current session ID from activeAmbientId on SDKClientInstance or from useSuki() after you call startAmbient(). Refer to Create session for more detail.
Quick reference: IDs
The diagram below shows how different identifiers relate during an ambient session lifecycle in the Web SDK. An is the patient visit you supply at setup (encounter.identifier / encounterId). An is one recording for that visit (ambientSessionId / activeAmbientId). One encounter can include more than one ambient session and more than one note.
You start with the encounter ID for the visit. Each startAmbient() call creates an ambient session ID. activeAmbientId is that session’s ID while it is active, or null when no session is active. When note generation completes, noteId on onNoteSubmit / note-submission:success identifies the generated note. One encounter can have more than one note.
Refer to Emitter events for the full event list and types.
Important:
encounterId is the visit. ambientSessionId and activeAmbientId identify one ambient recording. Do not treat them as interchangeable. encounterId comes back after the note completes (refer to Note management). It is the encounter you supplied at setup.Lifecycle events
The Web SDK emits these events when the session state changes:ambient:start- Emitted when a new ambient session is started.ambient:pause- Emitted when the ambient session is paused.ambient:resume- Emitted when the ambient session is resumed.ambient:cancel- Emitted when the ambient session is cancelled.ambient:submit- Emitted when the ambient session is submitted.
JavaScript
Status flags
boolean
Returns
true if an ambient session is currently active (started and not cancelled or submitted).boolean
Returns
true if the ambient session is currently in a paused state.