- Set up sign-in once per page.
- Pass session options each time the clinician opens Form filling in your app.
client.start(). In React, pass the same fields as props on FormFilling. Sign-in must succeed before the hosted UI opens in your app.
1
Authenticate with Suki for Partners
-
Create
SukiAuthManagerfrom@suki-sdk/corewith yourpartnerId,partnerToken, andenvironment(stagingorproduction). Optionally pass provider fields such asproviderIdandproviderName. SetautoRegister: falseunless you use provider auto-registration (autoRegisterdefaults totrue). -
Pass that manager to
new FormFillingClient({ authManager }). Create both once per page and reuse them for every session. - Refer to Authentication for sign-in setup and required fields.
2
Define Session Options
Each time the clinician opens Form filling, pass session options to
client.start() or render FormFilling with the same fields.Requiredforms: At least one medical form for this run. For new integrations, pass the forms here.form_template_idsDEPRECATED still works when you omit this field. Refer to Dynamic and static medical forms below.onSubmit: Handler that receives structured JSON after processing completes, not when the clinician taps submit.rootElement: Container for the hosted UI. JavaScript only. React supplies the container automatically.
correlation_id: Your encounter or appointment ID. Strongly recommended. See Encounter ID (correlation_id) below.onReady: Runs when the hosted UI has loaded and is ready for the clinician.onCancel: Runs when the clinician cancels without submitting.onBackgroundSubmit(React): Runs forform-filling:background-submittedwhen results arrive for a session that is no longer the active one while the iframe is still open.
Dynamic and static medical forms
When you open Form filling withclient.start() or FormFilling, pass the medical forms for that run in the forms array. Each entry is one form to fill: a Suki Medical form template (form_template_id) or a partner-defined form (schema). You can use either type on its own, or put static and dynamic entries together in the same forms array for one session.
Rules for each forms entry
- Use
form_template_idfor a Suki template, orschemafor a partner form. Do not put both fields on the same object, and do not leave both out. - When you use
schema, pass a non-empty plain object with your field definitions. An emptyschema({}) is invalid and the SDK returnsSUKI_FF_001withinvalid-form-entry. - Keep every
form_template_idunique among static entries, and every dynamicidunique among dynamic entries. - If you omit dynamic
id, the SDK generates a UUID so you can still correlate results. - If you pass one form, recording starts immediately. If you pass more than one, the hosted UI shows a selection screen (catalogue titles for static forms,
nameor a generated title for dynamic forms).
form_template_ids DEPRECATED when you omit forms. The SDK maps each string to { form_template_id }, and this option cannot carry partner schema entries. We will remove it in a future major release, so for new integrations pass forms: [{ form_template_id }]. If you pass forms, including an empty array, the SDK uses that list only and ignores form_template_ids.
JavaScript
Encounter ID (correlation_id)
In the SDK, your encounter or appointment identifier iscorrelation_id. Pass it when you start a session so structured results map to the correct patient record in your app and on your server.
If you omit
correlation_id, the hosted UI creates its own ID for the session. That ID will not match your encounter unless you map sessions another way.Container sizing
The hosted Form filling UI fills its container. Without explicit height, the iframe looks blank. In JavaScript, set height on#suki-form-container (or your rootElement) before start(). In React, set height on .suki-form-filling.
CSS
Next steps
Configuration examples - Applyforms and correlation_id in a working JavaScript or React sample.
Dynamic Form filling - Add partner schemas, alone or mixed with Suki templates.
Callbacks - Handle onSubmit, cancel, and session events when results are ready.
StartOptions - Look up every field when you call client.start().
FormFillingProps - Look up every prop when you render FormFilling.