Pre-fill your booking form and pass customer data through to YouCanBook.me

There are many good reasons why you might want to send data into YouCanBook.me using the booking page link: 

  • Make sure your clients meet with the right team member (for example, the one who has the best experience for the conversation)
  • Pre-fill the answers to some of the questions on your booking form 
  • Attach information to the booking (for example, which website it came from or who the salesperson is)
  • Make sure a customer selects the right Appointment Type 
  • Guide people to a date in the future that suits their needs

You can do all of these things by adding the information in the URL of the link to your booking page. 

In this article:

Setting up Shorthand codes
Pre-filling the team member
Pre-filling the appointment type
Pre-filling answers to booking form questions
Pre-filling data on an embedded booking page
Allowing clients to make quick additional bookings
Using Passthrough and Hidden question types on the booking form

Setting up Shorthand codes

Shorthand codes let YouCanBook.me know where the information you're passing into the booking form should go. Each question on your booking form will have its own assigned shorthand code. Some shorthand codes are hardcoded into the system like EMAIL for the bookers email and TYPE-NAME for the appointment type booked. Other shorthand codes are assigned by you, based on the data you want to pass in, for example ACCOUNTID for the bookers account ID.

Further reading: Use shorthand codes to customize communications

Navigate to Booking form > Questions to set or modify the shorthand codes. 

Pre-filling the team member

Certain clients may be assigned to specific team members based on their skill set or region. You can pre-fill the booking link you share with the client so they only book with that particular team member. 

The shorthand code for each team member on your booking page is TEAM-NAME.

To pre-fill the booking link with the selected team member, use the URL string https://yourbookinglink.youcanbook.me/?team=team+name

The spelling and capitalization of the team members name must match exactly in the link as it is on the Calendar & Teams section. Any spaces in between names should be replaced with a + sign to prevent the link from breaking.

When the booker clicks on that link, they will be taking to that team members specific availability, and the rest of the communications about the booking will be tied to that team member. 

You can prefill the URL with team member AND appointment type using a ampersand between fields in the URL, ie https://yourbookinglink.youcanbook.me/?team=team+name&service=appointment+name

Pre-filling the appointment type

There may be times when you already know what type of appointment the client requires,  or you don’t want to offer a choice of appointment types to all clients.

In this case, you can send your booking URL with the appointment type pre-selected. This will automatically assign the correct appointment type and will skip the page displaying all the appointment types. 

You'll pre-fill the booking page URL using SERVICE. To link directly to a specific appointment type you offer, use the URL string: https://yourbookinglink.youcanbook.me/?service=appointment+name

The capitalization of the appointment type name must match exactly in the link as it is on the Appointment Type section. Any spaces in between the title should be replaced with a + sign to prevent the link from breaking.

You can prefill the URL with appointment AND team member using a ampersand between fields in the URL, ie https://yourbookinglink.youcanbook.me/?service=appointment+name&team=team+name

Pre-fill the booking form questions

Each question on your booking form has an assigned shorthand code, represented in all capital letters. You can use these shorthand codes to pre-fill the booking form for your client. When they land on the link, all they have to do is select a time, and the booking form will be filled with all of their information. 

Example: The questions on the booking form have the following shorthand codes

First name = {FNAME}
Last name = {LNAME}
Email = {EMAIL}
Phone number = {PHONE} 

Pre-fill the link for my clients by constructing a URL for them containing their data for each shorthand code. This is how you would pre-fill the link for John Smith, email john@company.com, phone 614-555-1212.

https://pre-fill.youcanbook.me/?FNAME=John&LNAME=Smith&EMAIL=john@company.com&PHONE=6145551212

Tips for pre-filling the booking form:
  • The shorthand codes you've assigned on your booking page must be in all capitals in your URL, as in FNAME not fname
  • Hardcoded system shorthand codes like EMAIL and SERVICE can appear in the URL in either capital or lowercase letters
  • To pre-fill a checkbox on your booking form, use =yes, as in &terms=yes
  • Add a date to your link to open your booking page to a future date using &jumpDate=YYYY-MM-DD

Pre-filling data on an embedded booking page

If you are embedding your YouCanBook.me page into a page on your website, you'll need to adjust your embed code to allow for data to passthrough into the embedded booking page. Use the code below as a model, replacing all instances of only SUBDOMAIN with your booking page subdomain, ie customer-calls.

<iframe src="https://SUBDOMAIN.youcanbook.me/?noframe=true&skipHeaderFooter=true" id="ycbmiframeSUBDOMAIN" style="width:100%;height:1000px;border:0px;background-color:transparent;" frameborder="0" allowtransparency="true"></iframe> <script>var params = window.location.href.split('?')[1] || false; if ( params ) {var iframe = document.getElementById("ycbmiframeSUBDOMAIN");iframe.src = 'https://SUBDOMAIN.youcanbook.me/?noframe=true&skipHeaderFooter=true'+'&'+params;}window.addEventListener && window.addEventListener("message", function(event){if (event.origin === "https://SUBDOMAIN.youcanbook.me"){document.getElementById("ycbmiframeSUBDOMAIN").style.height = event.data + "px";}}, false);</script>