In V3 Nylas Scheduling component, capturing booking details after a booking can be easily done by using the eventOverrides
property. This property allows you to handle events such as bookedEventInfo
, which is emitted when a booking is completed.
Implementation Example:Â
Here's a simplified example of how to use the eventOverrides
property to capture booking details:
<NylasScheduling
configurationId={id}
eventOverrides={{
bookedEventInfo: async (event) => {
console.log(event.detail);
}
}}
/>
Event details example:
When the bookedEventInfo
event is emitted, it provides an event detail object containing the booking details. Below is an example of what this object might look like:
{
"request_id": "802be966-654f-4158-a97c-bac8732f9938",
"data": {
"event_id": "fpi***********c",
"booking_id": "cf9970ac-eac3-4bdf-8912-5460e28bd467",
"title": "Meeting with ***",
"description": "",
"organizer": {
"email": "test@nylas.com",
"name": ""
},
"status": "booked"
}
}
By using the eventOverrides
property and handling the bookedEventInfo
event, you can easily capture and process booking details in your application.
Resources:
Â
Â
Updated
Comments
0 comments
Please sign in to leave a comment.