How to pre-fill your booking form using URL parameters?

Read time: 3 minutes

Share:
How to pre-fill your booking form using URL parameters?How to pre-fill your booking form using URL parameters?

Have you ever wanted to make the booking process smoother for your clients by pre-filling the booking form with their details? With Calendesk, you can easily pass data through URL parameters to achieve just that! This feature is especially handy when you’re directing clients from emails, newsletters, or other websites directly to your booking page. Here’s how to use it effectively:

What Are URL Parameters?

URL parameters are extra bits of information added to the end of a URL. They are typically used to send data to the web page the user is visiting. For example, you might see a URL like this:

https://yourcompany.calendesk.net/book?name=John&surname=Doe&email=johndoe@example.com

In this URL, name, surname, and email are parameters that tell the booking form to pre-fill these fields with the values “John”, “Doe”, and “johndoe@example.com”.

How to Use URL Parameters with Your Calendesk Booking Form

To use URL parameters with your Calendesk booking form, simply add them to the end of your booking page’s URL. Here are the steps:

  1. Identify the Fields: Determine which fields you want to pre-fill (e.g., name, email).
  2. Create the URL: Add each field as a parameter to the end of your booking form’s URL, followed by an equals sign and the value you want to pre-fill. Separate each parameter with an & symbol.
  3. Examples. Here are some examples of how you might use URL parameters:
    1. To pre-fill the name and surname: https://yourcompany.calendesk.net/book?name=John&surname=Doe
    2. To pre-fill the email and phone number: https://yourcompany.calendesk.com/book?email=johndoe@example.com&phone=48500111222

Available parameters

When utilizing URL parameters to pre-fill your Calendesk booking form, each parameter corresponds to a specific field in the form. Below is a list of common parameters you might use, along with their explanations:

  1. name – Pre-fills the first name field.
    • Example: ?name=John
    • Explanation: Sets the first name in the booking form to “John”.
  2. surname – Pre-fills the surname or last name field.
    • Example: ?surname=Doe
    • Explanation: Sets the surname in the booking form to “Doe”.
  3. email – Pre-fills the email address field.
    • Example: ?email=johndoe@example.com
    • Explanation: Sets the email in the booking form to “johndoe@example.com“.
  4. phone – Pre-fills the phone number field.
    • Example: ?phone=48500111222
    • Explanation: Sets the phone number in the booking form to “48500111222” (it should start with the country code, you can skip the “+” character).
  5. companyName – Pre-fills the company name field.
    • Example: ?companyName=Acme%20Corp
    • Explanation: Sets the company name in the booking form to “Acme Corp”.
  6. companyVatIsoPrefix – Pre-fills the company VAT ISO prefix.
    • Example: ?companyVatIsoPrefix=us
    • Explanation: Sets the company VAT ISO prefix in the booking form to “US”.
  7. companyTaxNumber – Pre-fills the company tax number field.
    • Example: ?companyTaxNumber=123456789
    • Explanation: Sets the company tax number in the booking form to “123456789”.
  8. companyStreet – Pre-fills the company street address field.
    • Example: ?companyStreet=123%20Main%20St
    • Explanation: Sets the company street address in the booking form to “123 Main St”.
  9. companyPostalCode – Pre-fills the company postal code field.
    • Example: ?companyPostalCode=90001
    • Explanation: Sets the company postal code in the booking form to “90001”.
  10. companyCity – Pre-fills the company city field.
    • Example: ?companyCity=Los%20Angeles
    • Explanation: Sets the company city in the booking form to “Los Angeles”.
  11. companyCountryIsoCode – Pre-fills the company country ISO code field.
    • Example: ?companyCountryIsoCode=us
    • Explanation: Sets the company country ISO code in the booking form to United States.

Tips for Using URL Parameters

Privacy: Be cautious when using sensitive information in URL parameters, as URLs can be saved in browser history or server logs.
Encoding: If the values you wish to pass contain special characters (like spaces), they need to be encoded (e.g., a space becomes %20).

Pre-filling booking forms using URL parameters can significantly enhance the user experience by making the booking process faster and more convenient. With Calendesk, implementing this feature is straightforward and can be a great way to personalize the booking experience for your clients. Remember to test your URLs before sharing them to ensure they work as expected.

Share: