The MeetOne patient onboarding wizard lets new patients select an appointment, submit their personal details, and confirm registration inside an iframe on your website, without leaving your site.

Overview

The onboarding wizard is a multi-step flow:

  1. Appointment — select an available appointment slot
  2. Personal Data — enter patient information
  3. Confirmation — onboarding complete

Each wizard step loads as a new page inside the iframe. JavaScript events communicate height changes and step progress to the parent page, so the iframe never shows scrollbars.

The wizard keeps its state in MeetOne's session — iframe mode included — so it only works where the browser sends MeetOne's session cookie to the iframe. See Same-site requirement before you plan an integration.

Prerequisites

  • A MeetOne tenant domain (for example acme.meetone.io) with the onboarding feature enabled — contact MeetOne support (support@meetone.io) if you're not sure.
  • The ability to add HTML and JavaScript to your website.

Getting the Integration URL

https://[your-tenant-domain]/onboarding?iframe=true

Example:

https://acme.meetone.io/onboarding?iframe=true

The iframe=true parameter is only required on the first request. It activates iframe mode, which is then stored in the session and persists across all wizard steps — as long as the session cookie reaches the iframe (see Same-site requirement).

In iframe mode, MeetOne:

  • Removes the footer
  • Removes the progress bar
  • Removes step headers (title and description text) — use the meetone.onboarding-step-change event to display your own headings
  • Adds an iframe-layout class to the page body
  • Keeps tracking scripts, the info banner, and dialogs active

Basic Integration

1. Add the following styles to your HTML document.

<style>
  .meetone-onboarding {
    max-width: 768px;
    margin: 0 auto;
  }

  .meetone-onboarding iframe {
    width: 100%;
    border: none;
  }
</style>

The iframe's height attribute (below) is only a starting point: the events set the real height for each step. Leave out a min-height, which would keep the iframe tall on a shorter step.

2. Add the iframe to your HTML document.

<div class="meetone-onboarding">
  <iframe
    id="onboarding-iframe"
    src="https://acme.meetone.io/onboarding?iframe=true"
    width="100%"
    height="800">
  </iframe>
</div>

JavaScript Events

The wizard runs on your MeetOne tenant domain, a different origin than your website, so it can't fire events on your page directly. Instead it sends each event to your page with postMessage. Listen for message events on window and read the event from event.data: type is the event name, and every message carries context: "meetone-onboarding".

Always check event.origin against your tenant domain before using a message, and check context so you only react to the wizard.

The appointment step embeds the appointment picker, so the iframe also sends the picker's meetone.appointment-picker-* messages. They carry no context, so the checks below ignore them; meetone.appointment-picker-select is where the chosen slot's date and time can be read.

meetone.iframe-ready

Sent once per page load, when a step has finished loading and is ready. Carries width, height and context.

window.addEventListener("message", (event) => {
  if (event.origin !== "https://acme.meetone.io") return;
  if (event.data?.context !== "meetone-onboarding") return;

  if (event.data.type === "meetone.iframe-ready") {
    console.log("Onboarding ready:", event.data);
    // event.data = {type: "meetone.iframe-ready", width: 768, height: 1200, context: "meetone-onboarding"}
  }
});

meetone.iframe-resize

Sent when the current step's content dimensions change — for example, due to validation errors or field expansion. Carries width, height and context.

const iframe = document.getElementById("onboarding-iframe");

window.addEventListener("message", (event) => {
  if (event.origin !== "https://acme.meetone.io") return;
  if (event.data?.context !== "meetone-onboarding") return;

  if (event.data.type === "meetone.iframe-resize") {
    iframe.style.height = `${event.data.height}px`;
  }
});

meetone.onboarding-step-change

Sent when a new wizard step loads. Use this to update your own progress indicators or analytics.

window.addEventListener("message", (event) => {
  if (event.origin !== "https://acme.meetone.io") return;
  if (event.data?.context !== "meetone-onboarding") return;

  if (event.data.type === "meetone.onboarding-step-change") {
    console.log("Step changed to:", event.data.step);
    // event.data = {type: "meetone.onboarding-step-change", step: "appointment", context: "meetone-onboarding"}
    // Possible step values: "appointment", "personal_data", "confirmation"
  }
});

meetone.onboarding-complete

Sent when the onboarding flow finishes, on the confirmation step.

window.addEventListener("message", (event) => {
  if (event.origin !== "https://acme.meetone.io") return;
  if (event.data?.context !== "meetone-onboarding") return;

  if (event.data.type === "meetone.onboarding-complete") {
    console.log("Onboarding complete!");
    // event.data = {type: "meetone.onboarding-complete", context: "meetone-onboarding"}
  }
});

Practical Example

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Patient Onboarding</title>
  <style>
    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      margin: 0;
      padding: 20px;
      background-color: #f5f5f5;
    }

    .meetone-onboarding {
      max-width: 768px;
      margin: 0 auto;
      background: white;
      border-radius: 8px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      overflow: hidden;
    }

    .meetone-onboarding iframe {
      width: 100%;
      border: none;
      display: block;
    }

    .page-header {
      text-align: center;
      margin-bottom: 30px;
    }

    .step-indicator {
      text-align: center;
      padding: 10px;
      background: #e8f4fd;
      font-weight: 500;
    }
  </style>
</head>
<body>
  <div class="page-header">
    <h1>Patient Registration</h1>
    <p>Complete the steps below to register as a patient</p>
  </div>

  <div id="step-indicator" class="step-indicator" style="display: none;"></div>

  <div class="meetone-onboarding">
    <iframe
      id="onboarding-iframe"
      src="https://acme.meetone.io/onboarding?iframe=true"
      width="100%"
      height="800">
    </iframe>
  </div>

  <script>
    const iframe = document.getElementById("onboarding-iframe");
    const stepIndicator = document.getElementById("step-indicator");

    const stepLabels = {
      appointment: "Step 1: Select Appointment",
      personal_data: "Step 2: Personal Information",
      confirmation: "Step 3: Confirmation",
    };

    window.addEventListener("message", (event) => {
      if (event.origin !== "https://acme.meetone.io") return;

      const data = event.data;
      if (!data || data.context !== "meetone-onboarding") return;

      switch (data.type) {
        // Set the correct height when a step is ready, and again whenever it resizes
        case "meetone.iframe-ready":
        case "meetone.iframe-resize":
          iframe.style.height = `${data.height}px`;
          break;

        // Update the step indicator
        case "meetone.onboarding-step-change":
          stepIndicator.style.display = "block";
          stepIndicator.textContent = stepLabels[data.step] || data.step;
          break;

        // Handle completion
        case "meetone.onboarding-complete":
          stepIndicator.textContent = "Registration Complete!";
          stepIndicator.style.background = "#d4edda";
          break;
      }
    });
  </script>
</body>
</html>

Security Considerations

Content Security Policy

If your website uses a Content Security Policy (CSP), allow iframes from your MeetOne tenant domain:

<meta http-equiv="Content-Security-Policy"
      content="frame-src https://acme.meetone.io;">

Same-site requirement

MeetOne's session cookie is SameSite=Lax. Browsers do not send such a cookie to an iframe whose page is on a different site than the page around it — acme.meetone.io inside www.example.com, for instance. The wizard needs that cookie from its second request on: the first page redirects to the first step, and iframe mode, the selected slot and the steps after it all live in the session. Without it the wizard cannot continue inside the frame.

Embed it from a page on the same site as the iframe — for example with MeetOne on a custom domain under your own domain, such as termine.example.com on www.example.com (ask MeetOne support whether your organization has one) — or link to the wizard instead of framing it. This is not something your page's own cookie settings can change.

HTTPS requirement

Always use HTTPS for both your page and the iframe. This protects patient data in transit and is required for compliance with medical data regulations.

Troubleshooting

Iframe not loading

Symptoms: Blank iframe or an error message.

Possible causes:

  • Onboarding feature disabled for the tenant
  • Missing iframe=true on the initial URL — without it the wizard does not allow being framed
  • CSP blocking the iframe
  • Mixed content (an HTTPS page loading an HTTP iframe URL)

Solutions:

  1. Confirm the onboarding feature is enabled for your tenant — contact MeetOne support if you're not sure.
  2. Ensure the initial URL includes ?iframe=true.
  3. Review the browser console for CSP or mixed-content errors.
  4. Ensure both your page and the iframe use HTTPS.

Session lost between steps

Symptoms: After the first page the iframe goes blank or shows a refused connection, or the wizard starts over.

Possible causes:

  • Your page and the iframe are on different sites, so MeetOne's session cookie does not reach the iframe
  • The browser blocks cookies in iframes altogether (strict tracking protection, an extension)

Solutions:

  1. Serve the iframe from the same site as your page — see Same-site requirement — or link to the wizard instead of embedding it.
  2. Test in a fresh browser profile to rule out extensions.

Events not firing

Symptoms: The parent page doesn't receive events, or the iframe doesn't resize.

Possible causes:

  • Event listener attached after the iframe loaded
  • The listener checks the wrong origin — event.origin must match the host in the iframe's src exactly, including https://
  • The listener waits for custom DOM events (window.addEventListener("meetone.iframe-resize", …)) — the wizard dispatches those only inside the iframe's own window, so they never reach your page; listen for message instead

Solutions:

  1. Attach event listeners before the iframe loads.
  2. Log every message event on your page to confirm what arrives, then check your origin and context filters.

Incorrect height

Symptoms: The iframe shows scrollbars or cuts off content.

Solutions:

  1. Implement both the meetone.iframe-ready and meetone.iframe-resize listeners.
  2. Set border: none and remove fixed height constraints, such as min-height, from your CSS.
  3. Use the exact height from the message's height field (event.data.height).

Questions? Contact us at support@meetone.io.