From 21411b8f93f20747f0274b4a503815efe796a2ae Mon Sep 17 00:00:00 2001 From: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> Date: Wed, 19 Nov 2025 03:54:12 -0500 Subject: [PATCH] docs: update embed-events.mdx with all currently emitted embed events (#25099) * docs: update embed-events.mdx with all currently emitted embed events Co-Authored-By: joe@cal.com * docs: remove V2 suffix from event names in documentation Per feedback, the documentation should not expose internal versioning details. Event names are now presented as clean, non-versioned names: - bookingSuccessful (instead of bookingSuccessfulV2) - rescheduleBookingSuccessful (instead of rescheduleBookingSuccessfulV2) - dryRunBookingSuccessful (instead of dryRunBookingSuccessfulV2) - dryRunRescheduleBookingSuccessful (instead of dryRunRescheduleBookingSuccessfulV2) Added note about using wildcard listener for future-proofing. Co-Authored-By: joe@cal.com * docs: use V2 suffix for embed event names to match code (#25263) * docs: update embed events to use V2 event names - Document bookingSuccessfulV2 instead of deprecated bookingSuccessful - Document rescheduleBookingSuccessfulV2 instead of deprecated rescheduleBookingSuccessful - Keep dryRunBookingSuccessful and dryRunRescheduleBookingSuccessful without V2 suffix (only V2 versions exist) - Add comprehensive event documentation with all public and internal events - Organize events into Public Events and Internal Events sections Co-Authored-By: hariom@cal.com * fix: use V2 suffix for dry-run event names - Change dryRunBookingSuccessful to dryRunBookingSuccessfulV2 - Change dryRunRescheduleBookingSuccessful to dryRunRescheduleBookingSuccessfulV2 - These match the actual event names emitted in the code (only V2 versions exist) Co-Authored-By: hariom@cal.com --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Hariom Balhara --- .../developing/guides/embeds/embed-events.mdx | 41 +++++++++++++++---- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/docs/developing/guides/embeds/embed-events.mdx b/docs/developing/guides/embeds/embed-events.mdx index 0a1ce44492..bdee46d757 100644 --- a/docs/developing/guides/embeds/embed-events.mdx +++ b/docs/developing/guides/embeds/embed-events.mdx @@ -22,17 +22,40 @@ You can listen to an action that occurs in embedded cal link as follows. You can ## Following are the list of supported actions. +Event payloads may evolve over time. For the most reliable integration, you can listen to `action: "*"` to receive all events and inspect `e.detail.type` and `e.detail.data` at runtime. + +### Public Events + +These events are intended for external use and provide information about user interactions and booking lifecycle. + +| Action | Description | Properties | +|----------------------------|-------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------| +| eventTypeSelected | When user chooses an event-type from the listing. | `eventType: object` // Event Type that has been selected | +| bookingSuccessfulV2 | When a booking is successfully created. It might not be confirmed. | `uid: string` // Booking unique identifier
`title: string` // Booking title
`startTime: string` // Booking start time
`endTime: string` // Booking end time
`eventTypeId: number` // Event type ID
`status: string` // Booking status
`paymentRequired: boolean` // Whether payment is required
`isRecurring: boolean` // Whether this is a recurring booking
`allBookings: array` // For recurring bookings, array of all booking times
`videoCallUrl: string` // Video call URL if available | +| rescheduleBookingSuccessfulV2 | When a booking is successfully rescheduled. | Same properties as `bookingSuccessfulV2` | +| dryRunBookingSuccessfulV2 | When a dry run booking is successfully created (test mode). | Same properties as `bookingSuccessfulV2` (without `uid`) | +| dryRunRescheduleBookingSuccessfulV2 | When a dry run reschedule is successful (test mode). | Same properties as `bookingSuccessfulV2` (without `uid`) | +| bookingCancelled | When a booking is cancelled. | `booking: object` // Booking details including cancellationReason
`organizer: object` // Organizer details (name, email, timeZone)
`eventType: object` // Event type details | +| availabilityLoaded | When availability slots are successfully loaded. | `eventId: number` // Event type ID
`eventSlug: string` // Event type slug | +| routed | When a routing form routes to an action (event type, external URL, or custom page). | `actionType: string` // Type of action: "customPageMessage", "externalRedirectUrl", or "eventTypeRedirectUrl"
`actionValue: string` // The value/URL of the action | +| navigatedToBooker | When user navigates to the booker interface. | None | +| linkReady | Tells that the link is ready to be shown now. | None | +| linkFailed | Fired if link fails to load. | `code: string` // Error Code
`msg: string` // Human Readable message
`data: object` // More details to debug the error (includes url) | + +### Internal Events + +These events are used internally by the embed system for communication between the iframe and parent window. They are prefixed with `__` and are not intended for external use. | Action | Description | Properties | |----------------------|-------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------| -| eventTypeSelected | When user chooses an event-type from the listing. | `eventType: object` // Event Type that has been selected | -| bookingSuccessful | When the booking is successfully done. It might not be confirmed. | `confirmed: boolean` // Whether confirmation from organizer is pending or not
`eventType: object` // Event Type that has been booked
`date: string` // Date of Event
`duration: number` // Duration of booked Event
`organizer: object` // Organizer details like name, timezone, email | -| linkReady | Tells that the link is ready to be shown now. | None | -| linkFailed | Fired if link fails to load. | `code: number` // Error Code
`msg: string` // Human Readable message
`data: object` // More details to debug the error | -| __iframeReady | It is fired when the embedded iframe is ready to communicate with parent snippet. This is mostly for internal use by Embed Snippet. | None | +| __iframeReady | Fired when the embedded iframe is ready to communicate with parent snippet. | `isPrerendering: boolean` // Whether the iframe is in prerender mode | | __windowLoadComplete | Tells that window load for iframe is complete. | None | -| __dimensionChanged | Tells that dimensions of the content inside the iframe changed. | `iframeWidth: number`
`iframeHeight: number` | +| __dimensionChanged | Tells that dimensions of the content inside the iframe changed. | `iframeWidth: number`
`iframeHeight: number`
`isFirstTime: boolean` // Whether this is the first dimension change | +| __routeChanged | Fired when the route changes within the iframe. | None | +| __closeIframe | Fired when the iframe should be closed. | None | +| __connectInitiated | Fired when connection to a prerendered iframe is initiated. | None | +| __connectCompleted | Fired when connection to a prerendered iframe is completed. | None | +| __scrollByDistance | Instructs the parent to scroll by a specific distance. | `distance: number` // Distance in pixels to scroll by | +Events that start with `__` are internal and should not be relied upon for external integrations as they may change without notice. -Actions that start with __ are internal. - -To get more details on how Embed actually works, you can refer to this [Embed Flowchart](https://www.figma.com/file/zZ5oaUpg12Fuu5mGZrPlP5/Embed-Flowchart). \ No newline at end of file +To get more details on how Embed actually works, you can refer to this [Embed Flowchart](https://www.figma.com/file/zZ5oaUpg12Fuu5mGZrPlP5/Embed-Flowchart).