I’m building an integration where, after the booking.created event is triggered, I want to automatically send an email reminding the customer to sign a waiver. Currently, I can see that the webhook includes a customer_id, but it doesn’t seem to provide the email address.
Do I need to call the customer profile API to retrieve the email address using the customer_id? Also, is the customer profile automatically created when a booking is made, or is there a different process for that?
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
Yes, you’re correct. The booking.created webhook event only provides the customer_id. To retrieve the customer’s email address, you need to make an additional call to the Customers API using the RetrieveCustomer endpoint with the customer_id you received from the webhook. This will return the customer’s profile, including their email address.
As for your second question, a customer profile is not automatically created when a booking is made. The customer profile needs to be created separately, either manually by the seller in the Square Dashboard or programmatically via the Customers API. Once a customer profile is created, it can be associated with a booking.
I see. So, with this approach, I will only receive the booking information when a customer makes a booking, correct? Does this mean I won’t be able to send a follow-up email to the customer? Is there any alternative way to do this?
That’s correct, you will only receive an event when a customer makes a booking. Your application can use the collected email that’s stored in the customer profile to follow up with any additional emails you need to send the customer.