Queue bookings (QMS)
Token-based, walk-in-style bookings with live queue stats.
QMS is a queue-based booking flow. Instead of picking a specific time
slot, the patient joins a queue and gets a token number.
When it's active
Doctors set up for queue management in your dashboard get this flow. Everyone else gets the scheduled flow.
Patient flow
Pick a doctor from the same list as any other doctor.
See the live queue banner — it appears once a QMS doctor is selected, showing whether the queue is open along with current queue length and estimated wait time.
Pick a day — today for immediate walk-ins, or a future date for same-day-of-week queue reservation.
Enter a phone number or email address, verify the one-time code, and confirm patient details.
Get a token — the confirmation shows the token number, queue position, and estimated wait time.
Confirmation payload
onSuccess fires on the token screen with a full
QueueToken under result.queueToken:
interface QueueToken {
tokenNumber: string;
queuePosition: number;
estimatedWaitTime: number; // minutes
patientName: string;
appointmentDate: string; // YYYY-MM-DD
appointmentTime?: string; // ISO datetime of the shift start
dateDisplay: string; // pre-formatted, e.g. "Friday, Jul 17"
timeDisplay: string; // pre-formatted, e.g. "9:00 AM – 1:00 PM"
doctorName?: string;
locationName?: string;
bookingType: "TODAY" | "FUTURE";
}Use it for downstream actions — SMS reminders, pushing the token to your CRM, a "your position" ticker on the patient's page. The widget shows the token on its own confirmation screen regardless.
It's nested, not flat
Read result.queueToken.tokenNumber. A top-level result.tokenNumber is
always undefined.
Common patterns
Kiosk mode — set calendarOnly: true and externalMemberId to the walk-in
doctor's id, and mount the widget as a tablet-friendly inline experience at
the reception desk.
Show the token on your own page — stash the token in sessionStorage from
onSuccess, then redirect to a "Your Token" page:
MedosBooking.init({
apiKey: "mk_your_publishable_key",
onSuccess: (result) => {
if (!result.queueToken) return;
sessionStorage.setItem("medosToken", JSON.stringify(result.queueToken));
setTimeout(() => (window.location.href = "/your-token"), 3000);
},
});The delay gives the patient time to read the widget's own confirmation before the page changes.