UpdatedFrom
v2.2.0+, you can pass optional session-level metadata in ambientOptions to improve note generation. Put visit fields under visitContext (including visitType) and the provider role under providerContext. When you set visitContext.visitType, the Web SDK also uses it as the note title in the patient note list (see Note list titles).Learn more in the AmbientOptions reference. These parameters are optional; omitting them does not break existing flows.Ambient sessions created with the Web SDK are interoperable with Ambient APIs, Mobile SDK, and Headless Web SDK. The encounter identifier you supply maps to
emr_encounter_id for cross-modality ambient workflows. Refer to Interoperability for Web SDK setup, and Ambient interoperability for the platform overview.- Configure the SDK client with
initialize()in JavaScript orinit()from theuseSuki()hook in React. - Provide session context through
mount()or the<SukiAssistant>component. - Start an ambient session with
startAmbient()and read the active session ID fromactiveAmbientId.
Create a controlled session
To create an ambient session with the Suki Web SDK, follow this three-step workflow:1
Configure the Client
You must first initialize the client to establish a connection.
- JavaScript: Call
initialize(options)to get back anSDKClientInstance. - React: Call
init()from theuseSuki()hook.
2
Provide Session Context
You provide the encounter data and
ambientOptions, such as patient details, note sections, and visit type, to improve note quality. Detailed context helps the Suki generate more accurate clinical notes.- JavaScript: Pass the context through
sdkClient.mount(). - React: Use the props on the
<SukiAssistant>component.
-
patient.identifieris required;encounter.identifieris optional. Each must be a string at most 36 characters (). Longer strings can fail during composition or ambient workflows. -
From Web SDK v3.2.0, if you set
encounter.identifier, use a UUID. The Web SDK maps that value toemr_encounter_idfor ambient interoperability and encounter note retrieval. Non-UUID values can break past-note loading even when ambient session start, pause, and submit still work.
3
Start the Session
Once you have configured the client and context, you can start the ambient recording.
- Start: Call
startAmbient()on the client in JavaScript, or from theuseSuki()hook in React. - Track: Read the active session ID from
sdkClient.activeAmbientId, or from theuseSuki()hook in React, to display the status of the current session.
controlled.js
Update encounter context and ambient options programmatically
You can update the visit (encounter) context and ambient options whenever anew encounter loads in your EHR. Providing current context ensures that the Suki Platform generates accurate documentation for the specific visit. The encounter is the patient visit. An ambient session is one recording for that visit.Update the encounter context
When the patient or visit details change, update the encounter context before you start an ambient session, or after the current ambient session ends.- JavaScript: Call
setEncounter()on the client. - React: Use the
encounterprop on the<SukiAssistant>component.
Update ambient options
You can also update theambientOptions, such as required note sections or diagnoses, during an active session.
- JavaScript: Call
setAmbientOptions()on the client. - React: Use the
ambientOptionsprop on the<SukiAssistant>component.
JavaScript