top of page
Send SMS on Booking Confirmation

Send SMS on Booking Confirmation

Send a confirmation SMS when customers book a service.





September 12, 2021

Girl Enjoying her Drink


Anchor 1
Hire a Developer

Example Description

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.



Twilio Integration


To send custom SMSs from our Wix site, we integrated with the Twilio service. You’ll need to create an account with Twilio and install their npm package on your site.



Secrets Manager


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

Example Code

Tab 1


Tab 2


Tab 3


This code solution can be complicated.

How We Built It

Page Elements


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



Database Collections


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.



Page Code


  1. Load the services into the dropdown.

  2. When a service is selected, load the first 3 free slots into the time dropdown.

  3. 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.

  4. When the booking is confirmed, the onBookingConfirmed event triggers delivery of the confirmation SMS.

APIs We Used

Non-code example.

Non-code example.

Non-code example.

Related Articles

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.

Related Examples

Did this help?




Thanks for your feedback!

Block Off Time for Staff Members

Block Off Time for Staff Members

Block off chunks of time in bookings staff calendars.



Bookings Payroll Calculator

Bookings Payroll Calculator

Calculate and display bookings and earnings for each staff member.



Anchor 2
bottom of page