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- A JWT issued by your identity provider after the user signs in. Suki does not issue this token.
If you do not have a
partnerId, refer to Partner onboarding. For how to issue and pass partnerToken, see Partner authentication and the Authentication guide.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.