Prerequisites to use the hooks
Before you begin, the following hooks require apartnerId and partnerToken:
partnerId- The unique ID you receive when you first onboard with Suki.partnerToken- The secure access token for the user, generated by your EHR system.
If you do not have a
partnerId and partnerToken, refer to the Authentication guide for more information.What are the hooks?
In React, a hook adds behavior to your components. TheuseAuth, useAmbient, and useAmbientSession hooks work together in a typical workflow to enable capabilities like:
- Authenticating users
- Creating ambient sessions
- Managing recording and submitting audio
Workflow
Run the hooks in order. Each step depends on the output of the previous one.Implementation guides
Choose the guide for the hook you want to implement:Authentication
Use this hook to manage authentication state for the Headless Web SDK.
Create Ambient Session
Use this hook to create a session and obtain an
ambientSessionId and noteId.Manage Ambient Session
Use this hook to control recording and submit audio using the
ambientSessionId.Configure Ambient Session
Review
useAmbientSession parameters, return values, and session context.Select a Microphone
Pass an optional microphone
deviceId for ambient recording.Ambient Session Examples
Full recording UI example, tutorials, and next steps for
useAmbientSession.Ambient Interoperability
Share one clinical note across Ambient products with
emrEncounterId.Session Conflicts
Clear a blocking remote session, then retry create. Handle remote session end.
Read Shared Notes
List notes with
useGetEncounterInfo and seed patient context for Web SDK handoff.Embedded Forms
Seed Embedded Form templates with
setSessionContext / updateSessionContext, then read filled values with structured data hooks.