In this example we display a minimal custom bookings flow. Following booking confirmation, in addition to the standard confirmation email, we also send a confirmation SMS to the customer’s phone.
Once you’ve created a Twilio account, you’ll need to locate the account's SID and auth token, and store it in the Secrets Manager. Add the following secrets:
accountSID: Twilio account SID
authToken: Twilio auth token
fromPhone: Phone number you received from Twilio
How We Built It
We added the following page elements to our site:
Dropdowns for choosing the service and slot
Inputs for entering contact details, including phone number and email
Checkbox for site visitors to agree to receive an SMS
Book button for booking the service
Text elements for success and error messages
We used the following database collections in our site:
Bookings/Services collection: This built-in collection is automatically added to your site when you install the Wix Bookings app. We query this collection to get a list of available services.
bookedServices collection: We store the name, phone number, and number of times an SMS was sent in this collection. We use this to enforce the limit of 3 SMSs per site visitor.
Load the services into the dropdown.
When a service is selected, load the first 3 free slots into the time dropdown.
When a site visitor fills in the form and clicks the Book button, validate the inputs, check SMS availability (less than 3 messages were sent), and checkout the booking.
When the booking is confirmed, the onBookingConfirmed event triggers delivery of the confirmation SMS.
Hire a Developer
Velo solutions are powerful tools, but building them on your own can be challenging. Let an experienced Velo development shop build it for you, so you can keep working on your site or business.
Did this help?
Thanks for your feedback!
Block Off Time for Staff Members
Block off chunks of time in bookings staff calendars.
Bookings Payroll Calculator
Calculate and display bookings and earnings for each staff member.