Skip to main content
What you will build

20 min | Intermediate

  • A Form filling session opened with template IDs.
  • A stable correlation_id for your EHR mapping.
  • Mapping structured_data into one EHR payload after submit.
Using an AI coding tool?Copy the prompt below to point your agent at the Form filling skill and Documentation MCP. For every task skill, refer to AI coding tools.

Fetch the Form filling skill and connect the documentation MCP.

Open in Cursor
In this tutorial, you open Form filling from React, pass template IDs and a stable correlation_id, then map structured_data from the submit result for EHR handoff. By the end of this tutorial, submit returns filled form values and your mapping builds one EHR payload per filled template.

Prerequisites

Before you begin, make sure you have:
EHR field names differ by partner system. The mapping in this tutorial is illustrative. Adapt fields to your chart schema.

Architecture

Project setup

  1. Complete Partner onboarding and obtain valid Form filling template_id values (see Prerequisites).
  2. Install the required dependencies:.
  1. Configure your credentials:.
    • Keep credentials ready for the Form filling client configuration used in later steps.
    • Have valid template_id values from Suki for your partner account.
  2. Give the Form filling container height. React mounts the UI in .suki-form-filling. Without height, the iframe looks blank:.

Tutorial steps

Work through each step in order. Read the explanation, review the code example, then continue to the next step. The full code example is available in the accordion below.
1

Create FormFillingClient Once

Build SukiAuthManager and FormFillingClient in useMemo. Set autoRegister: false unless your integration uses provider auto-registration (default is true).Check: One FormFillingClient is created in useMemo for the encounter screen.
2

Open Form Filling with Template IDs and correlation_id

Wrap with FormFillingProvider. Pass template IDs from Suki support and your encounter id as correlation_id so results map back to the chart. Style .suki-form-filling with height before the UI mounts.Check: Form filling opens with template IDs, a stable correlation_id, and .suki-form-filling has explicit height.If it fails: Give .suki-form-filling an explicit height before the UI mounts. Zero height is the most common cause of a blank iframe. Use template_id values from Suki for your partner account.
3

Map structured_data for EHR Handoff

In onSubmit, map structured_data.generated_values by form_template_id. Use correlation_id as your encounter key and ambient_session_id for idempotent saves. For production persistence, also handle your partner webhook.Check: onSubmit maps structured_data.generated_values by form_template_id, using correlation_id and ambient_session_id.If it fails: Pass a stable correlation_id when you open the session, then reuse that same value when you map submitted data back into the EHR.

Full code example

React

Troubleshooting

Give .suki-form-filling explicit height before the UI mounts. Zero height is the most common cause of a blank iframe. See Form filling React integration.
Use template_id values from Suki for your partner account.
Pass a stable correlation_id when you open the session and reuse it in your mapping.
Prefer your partner webhook in production; this tutorial maps from onSubmit for the session flow.

Summary

In this tutorial, you:
  • Opened Form filling with template IDs and a stable correlation_id.
  • Received FormFillingResult on submit.
  • Mapped structured_data into EHR handoff payloads.

Other tutorials

Continue with another end-to-end tutorial.
Last modified on October 16, 2026