Skip to main content

How to pre-select the organisation and service on Widget 2.0 in embed mode

Learn how to pre-fill organisation and service data in the widget 2.0 embeddable code

Problem

If you're using Widget 2.0 and currently use separate widgets for each store location or service, you don't need to anymore. You can use a single Widget 2.0 embed and have it automatically show the right store location (organisation) and service.

How to set it up

Add your widgetID, organisationId and serviceId to your widget embed code, like this:

<script src="https://booking-tools-sdk-t2.appointedd.com/appointedd-booking-tools-sdk-v1.js">
</script>
<div id="iFrameContainer" style="padding:32px; background-color: #FFFFFF;"></div>
<script language="javascript" type="text/javascript">
Appointedd.renderWidget("iFrameContainer", {
widgetId: "XXXXXXXXXXXXXXXXXXX",
enableLanguageSelector: false,
organisationId: "XXXXXXXXXXXXXXXXXXX",
preFillData: {
serviceId: "XXXXXXXXXXXXXXXXXXX"
}
});
</script>

A few things to note

  • organisationId goes at the top level of the embed code (not inside preFillData).

  • serviceId goes inside preFillData.

  • Make sure widgetId points to your Widget 2.0 widget.

  • You can turn the language selector on or off with enableLanguageSelector: true/false, and style the container div if needed, e.g.:

    <div id="iFrameContainer" style="padding:32px; background-color: #FFFFFF;"></div>

Why this helps

Instead of managing a separate widget for every store or service, you can use one widget across your site and simply pass in the right IDs per page. This makes it much easier to roll out and maintain your booking widget across multiple locations.


Need help?

If you have any further questions, please get in touch with the support team through the messenger.

Did this answer your question?