Web Scheduler
The web scheduler is an embeddable booking widget.
<script src="https://cdn.onepath.ai/loader.js"></script>
<button data-onepath-web-scheduler-trigger>Book a service</button>
Drop the script in the document head, add a button anywhere. The widget auto-loads when your account has the scheduler channel enabled.
Your domain must be on the account's website list
The widget loads only on URLs added under Web Scheduler → Websites in OnePath — including your staging domain. If the button does nothing, check this first (or ask whoever manages the account). Where to add it
Open from a form submit
The scheduler can open from your own form on submit, pre-filled with the visitor's details and the right service pre-selected. One event dispatch wires it up.
Attach context to the booking
Attach the option a visitor picked — a package, a plan, anything — to their booking. It's saved verbatim and travels with the booking: into the job summary your team reads and into the automatic follow-up if they don't finish. Add data-onepath-serviceable-type / data-onepath-service-type to also pre-select the matching service. There are three ways to set the context.
From the visible text
Mark the wrapper with a bare data-onepath-context — its visible text (minus the button label) becomes the context.
<div data-onepath-context
data-onepath-serviceable-type="Water Heater"
data-onepath-service-type="Estimate">
Better Package — 50 Gallon — $2,695
<button data-onepath-web-scheduler-trigger>Book</button>
</div>
From an explicit value
Give data-onepath-context a value to set it exactly, independent of what's on screen.
<div data-onepath-context="Better Package — 50 Gallon — $2,695"
data-onepath-serviceable-type="Water Heater"
data-onepath-service-type="Estimate">
<button data-onepath-web-scheduler-trigger>Book this package</button>
</div>
From JavaScript
Pass a context field on the open event — for buttons you wire up yourself.
document.dispatchEvent(new CustomEvent('onepath:webscheduler:open', {
detail: {
context: 'Better Package — 50 Gallon — $2,695',
serviceable_type: 'Water Heater',
service_type: 'Estimate',
},
}));
→ Full event and fields: Form-Trigger · Events
serviceable_type / service_type are optional and must match a service on the account — find them on the Service Details page. If they don't match, the visitor picks the service themselves.
What it produces
The context travels with the booking — into the job summary your team reads, and into the follow-up sent when a visitor doesn't finish.


Listen for booking events
The scheduler dispatches events when leads and appointments are created. Wire them to analytics, CRM webhooks, or post-booking redirects.
→ Events