Skip to main content
Use this destination when the intake should create a case in MD Integrations (MDI). Setup for Forms and Protocols is in Overview & setup; below is what to pass when calling send() with destination mdi. Embeddables handles the send for you: it creates or finds the patient in MDI, creates a case with their intake answers and any uploaded photos or documents, links the product you are selling, and sends the case to MDI clinicians once the intake is complete.
Before the first send, an Embeddables admin must save your MDI client secret in the project’s Integrations settings. This is a one-time setup step — you never pass the secret to send().

Example

Settings

string
required
Your MDI client ID, from your MDI account. Pass it on every send.
string
required
The MDI product this funnel sells. Pass it on every send — Embeddables adds that product to the case for you.
boolean
Use true for lead capture — the case is created but stays on hold. Use false or omit when the intake is complete — for example after payment — so the case goes to MDI clinicians.
string
Which saved MDI client secret to use: production (default), staging, development, or test. Only needed if your admin saved separate secrets per environment.
string
Required only when more than one protocol is registered — the id of the protocol whose answers to send.

Sending custom questions

send() accepts an optional third argument when you want to add questions and answers to the case that your intake does not ask — for example the plan the patient picked at checkout. Intake answers are always sent; these are added after them.
array
Each item has a question and an answer, plus an optional label shown to clinicians.

What you get back

string
The MDI case created for this send.
string
The MDI patient on the case — an existing patient when one matches the intake email, otherwise a new one.
string
The product added to the case, as MDI identifies it.
boolean
true when the case was sent to MDI clinicians. false when isPartialSubmit kept it on hold.
array
When the intake included photos or documents, one status per file — check that each one succeeded if uploads matter for your flow. A failed upload does not stop the send; the case is still created with the files that worked.