Search...
onBookingCreated( )
Developer Preview
An event that's triggered when a booking is created.
Description
The onBookingCreated()
event handler runs when a booking is created. The received BookingCreatedEvent
object contains information about the booking that was created and metadata for the event.
Note: Backend events don't work when previewing your site.
Syntax
function wixBookings_onBookingCreated(event: BookingCreated): void
onBookingCreated Parameters
NAME
TYPE
DESCRIPTION
event
Optional
BookingCreated
Information about the booking that was created and metadata for the event.
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
onBookingCreated example
Copy Code
12 export function wixBookings_onBookingCreated(event) {3 const eventId = event.metadata.id4 const entityId = event.entity._id;5 }67