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 following prompt to add the Suki developer documentation as a skill and MCP server to your tool for better AI-assisted coding during the integration process. For all AI options (contextual menu, llms.txt, and skill.md), refer to AI-optimized documentation.

Install the Suki developer docs as a skill to get context on Suki's developer tools, APIs, and SDKs. Add the MCP server for documentation search.

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).
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.
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.

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.
Form Filling

Build a Form Filling Session Client

Create a Form filling session, send template context, stream audio, and retrieve structured form data.

20 minIntermediate
APIs

Build a Webhook Notification Receiver

Verify HMAC signatures, parse partner notifications, and handle success and failure events.

10 minBeginner
Last modified on July 23, 2026