Interested in this feature? Get in touch with your Customer Success Manager.
feature_embed modality, the Junction iframe notifies your host page of significant events by posting a message to the parent window via the Web Messaging API.
Callbacks are only emitted from Feature Embed iframes. They are never emitted in the link_out modality.
Listening for callbacks
Add amessage event listener to the host window and filter by the type field:
Security
Each Junction organization is served from a dedicated subdomain:https://<slug>.ehr.junction.com, where <slug> is the unique slug from your Junction Connect configuration.
Junction always targets your registered origin explicitly — it never posts to "*". The target origin is resolved from the iframe’s ancestorOrigins or document.referrer. If the origin cannot be resolved, the message is silently dropped rather than broadcast.
Your listener must independently validate event.origin before trusting the payload, since any page on your origin may receive message events.
Callback reference
urn:junction:order:created
Emitted when the provider successfully submits a lab order via the order_creation feature.
Payload
Example
- Close or hide the embed iframe after a successful order.
- Navigate the host application to an order detail view.
- Trigger a server-side webhook or audit log entry.
urn:junction:order:creation_cancelled
Emitted when the provider explicitly cancels the order creation flow before submitting.
Payload
Example
- Close or hide the embed iframe.
- Return the provider to a previous screen in your application.