Limited time discount
Spring Deals Are in Full Bloom
up to 50%Off
With a coupon code BFCM70
up to 50%Off
Grab Now
FEATURES AND INTEGRATIONS OVERVIEW
  • All Features
    All Features

    Notifications, Time zones, Extras, Coupons, Refunds, and more

  • All Integrations
    All Integrations

    Whatsapp, Paypal, Teams, Zoom, Zapier, Google Calendar, and more

  • Reserve with Google
    Reserve with Google

    Accept bookings via Google Search and Maps

  • WordPress Plugin
    WordPress Plugin

    Add Trafft booking form to any page of your WordPress website

    Resources
  • Trafft Blog
    blog-2
    Trafft Blog

    Check out the latest information on industry trends and get advice for running a service business online

  • Guides and Documentation
    docs-2
    Guides and Documentation

    Get a detailed explanation of how every Trafft feature and integration work

  • Our Story Our Story

    Read about Trafft’s story, mission and values we share

  • Investor Relations Investor Relations

    Reach out to us if you are interested in investing in Trafft

  • Affiliate Partners Affiliate Partners

    Join us on our journey of helping service businesses thrive through automation

  • Why Trafft Why Trafft

    Learn more about why you should choose Trafft

  • Partners Partners

    Partner with Trafft and expand your market reach

  • Contact us Contact us

    Feel free to reach out if you have any questions or suggestions

Features
FEATURES AND INTEGRATIONS OVERVIEW
  • All Features All Features

    Notifications, Time zones, Extras, Coupons, Refunds, and more

  • All Integrations All Integrations

    Whatsapp, Paypal, Teams, Zoom, Zapier, Google Calendar, and more

  • Reserve with Google Reserve with Google

    Accept bookings via Google Search and Maps

  • WordPress Plugin WordPress Plugin

    Add Trafft booking form to any page of your WordPress website

Resources
    Resources
  • Trafft Blog

    Check out the latest information on industry trends and get advice for running a service business online

    blog-2
    Trafft Blog
  • Guides and Documentation

    Get a detailed explanation of how every Trafft feature and integration work

    docs-2
    Guides and Documentation
About Us
  • Our Story Our Story

    Read about Trafft’s story, mission and values we share

  • Investor Relations Investor Relations

    Reach out to us if you are interested in investing in Trafft

  • Affiliate Partners Affiliate Partners

    Join us on our journey of helping service businesses thrive through automation

  • Why Trafft Why Trafft

    Learn more about why you should choose Trafft

  • Partners Partners

    Partner with Trafft and expand your market reach

  • Contact us Contact us

    Feel free to reach out if you have any questions or suggestions

Passing URL Parameters in Trafft Booking

Trafft allows you to pass customer data and custom field values directly through booking URLs or
embedded booking widgets. This lets you prefill booking forms, reduce manual input, and create smoother
booking experiences.
This page explains how URL parameters work, why to use them, and common real life use cases.

What are URL parameters

URL parameters are key value pairs added to the booking URL. When a customer opens the booking page,
Trafft automatically reads these parameters and prefills the matching fields in the booking form.
They work for:

  • Direct booking links
  • Event or service specific booking pages
  • Embedded booking widgets

Supported parameters

Customer data

You can prefill standard customer fields using the following parameters:
• customerFirstName
• customerLastName
• customerEmail
• customerPhone
The phone number should be passed in international format with country code.
Example:
https://yourcompany.trafft.com/booking?customerFirstName=John&customerLastName=Doe&customerEmail=johndoe@gmail.com&customerPhone=+1212555

Custom fields

Custom fields can also be prefilled.
To do this, you need to pass a JSON object where:

  • The key is the custom field ID
  • The value is the value you want to prefill


The parameter name is customFields.
Example:
https://yourcompany.trafft.com/booking?customerEmail=johndoe@gmail.com&customerFirstName=John&customerLastName=Doe&customFields={"3":"111"}

Multiple custom fields:
https://yourcompany.trafft.com/booking?customerEmail=johndoe@gmail.com&customerFirstName=John&customFields={"1":"Test+Value","2":"Another"}

Spaces in values should be URL encoded, for example using "+"

Service or employee specific booking pages

You can pass parameters on service or employee booking pages as well.

Example:

https://yourcompany.trafft.com/booking/e/john-doe?t=s&uuid=5d19bf1e-81dd-43b3-8fab-5203b64e7a8a&customerFirstName=Johanna&customerLastName=Miller&customerEmail=johanna.miller@gmail.com&customerPhone=+14155550198&customFields={"12":"Yes","11":"24"}

All supported parameters behave the same way regardless of the booking page type.

Using URL parameters with embedded booking

URL parameters can also be passed when using the embedded booking widget. In this case, parameters are defined as data- attributes on the main embed container.

This approach is especially useful when you already have customer data available on your website and want to prefill the booking form automatically.

URL parameters can also be passed when using the embedded booking widget. In this case, parameters are defined as data- attributes.

Basic examples:

<div class="embedded-booking"
data-url="https://yourcompany.trafft.com"
data-query="&t=s&uuid=303bad05-6504-417b-b0fc-a2635ec46c9a"
2data-employee="john-doe"
data-lang="en"
data-customer-email="johanna.miller@example.com"
data-customer-first-name="Johanna"
data-customer-last-name="Miller"
data-customer-phone="+14155550198"
data-custom-fields='{"12": "Yes", "11": "24", "100": "CUST-9001"}'
style="min-width: 320px; height: 768px;">
</div>
<script type="text/javascript" src="https://yourcompany.trafft.com/
embed.js" async></script>

Embedded booking with custom fields

Custom fields can be passed using the `data-custom-fields` attribute. The value
must be a valid JSON string where:
- Each key represents a Custom Field ID from your Trafft account
- Each value represents the data you want to prefill

<div class="embedded-booking" data-url="https://yourcompany.trafft.com" data-
query="&t=s&uuid=303bad05-6504-417b-b0fc-a2635ec46c9a" data-employee="john-doe" data-lang="en"
data-customer-email="johanna.miller@example.com" data-customer-first-name="Johanna" data-customer-
last-name="Miller" data-customer-phone="+14155550198" data-custom-fields='{"12": "Yes", "11": "24"}'
style="min-width: 320px; height: 768px;"> </div> <script type="text/javascript" src="https://
yourcompany.trafft.com/embed.js" async></script>

This works for visible and hidden custom fields alike.

Passing internal or hidden data (Customer ID)

A common advanced use case is passing internal identifiers such as a Customer ID
that should not be visible to the customer during booking.

To achieve this:
1. Create a Custom Field in Trafft (for example named "Customer ID")
2. Note the Custom Field ID
3. Hide the field from the booking form using Custom CSS
4. Pass the value through URL parameters or embedded booking using

Examples:
data-custom-fields='{"100": "CUST-9001"}' ```
`customFields`

The value will be stored with the booking and can be used for internal tracking, CRM matching, or
integrations.

Advantages

Using URL parameters allows you to:

  • Prefill booking forms automatically
  • Reduce friction during booking
  • Avoid duplicate data entry
  • Integrate Trafft with external systems
  • Create personalized booking links

Common use cases

• Sending personalized booking links via email or SMS
• Redirecting users from landing pages with known customer data
• CRM or marketing automation integrations
• Membership portals or client dashboards
• Event registration flows

Important notes

• Parameters must be URL encoded
• Custom field IDs must match the IDs in your Trafft account
• If a field is already filled by the user, Trafft will not overwrite it
• Invalid or unknown parameters are ignored automatically

Have more questions

If you face an issue, and cannot find an answer in the documentation, feel free to submit a support ticket!

Contact us
Try for free