LogoLogo
Log in
  • Introduction
    • Welcome
    • Quick Start
      • Sign up for a Cal.com account
      • Complete your onboarding
      • Self-hosting
        • Installation
          • Ultimate
          • Platform
            • Get access to the API
            • API submodule
        • Install apps
          • Google
          • Microsoft
          • Zoom
          • Daily
          • HubSpot
          • Stripe
          • Sendgrid
          • Twilio
        • E2E testing
        • Upgrading
        • Docker
        • Vercel
        • Database migrations
        • SSO setup
  • Core Features
    • Event types
      • Secret events
      • Location of the event
      • Availability schedule
      • Multiple durations
      • Event buffer
      • Custom time-slot intervals
      • Custom event name in the booking
      • Minimum notice
      • Booking frequency
      • Limit future bookings
      • Add events to calendar
      • Additional inputs
      • Requires confirmation
      • Hide notes in calendar
      • Require additional notes
      • Booking success URL
      • Single use private links
      • Offer seats
      • Recurring events
      • Disable guests
    • Bookings
      • Paid bookings
    • Availability
      • Multiple time slots per day
      • Date overrides
      • Multiple schedules
    • App Store
      • Apps
        • Calendar apps
        • Video apps
        • Payment apps
        • Workflow apps
        • Analytics apps
        • Web3 apps
        • Miscellaneous apps
    • Webhooks
    • Embed
      • Install with JavaScript
      • Install with React
      • Set up your embed
    • New Docs Embed
      • Adding embed to your webpage
      • Embed Snippet Generator
      • Embed events
      • Embed instructions
      • Adding slots to your email
    • Dynamic group links
    • Customization
    • i18n Internationalization
  • Enterprise Features
    • Teams
      • Team workflows
      • Round-robin scheduling
      • Collective events
      • Advanced routing forms
    • Workflows
    • API
      • Quick start
        • Testing API locally
        • Hosted API through Cal.com
      • Authentication
      • Errors
      • Rate limits
      • Versioning
      • Types
      • API reference
        • Attendees
        • Availabilities
        • Booking References
        • Bookings
        • Custom inputs
        • Destination calendars
        • Event types
        • Memberships
        • Payments
        • Schedules
        • Selected calendars
        • Teams
        • Users
        • Webhooks
    • Admin
  • Knowledgebase
    • Glossary
  • How To Guides
    • Acquire and manage a license key
    • Adding your first app
    • Creating a secret event type
    • Creating your first event type
    • How to add a location to your event type
    • How to add custom CSS
    • How to build an app
      • Build a greeter app
    • How to connect apple calendar with calcom
    • How to troubleshoot symbolic link issues on Windows
    • How to set buffer time
    • How to set up requires confirmation
    • How to set time-slot intervals
    • How to set up an event type to receive payments
    • How to test API in a local instance
    • How to use open-source scheduling infrastructure with HubSpot
    • How to white label the self hosted instance
    • Setting up your availability
      • Adding date override
    • Quick actions using command bar
Powered by GitBook
LogoLogo

Solutions

  • Individual
  • Teams
  • Ultimate
  • Platform

Follow us

  • Twitter
  • LinkedIn

Copyright 2023 Cal.com, Inc. All rights reserved.

On this page
  • Actions/Events
  • Following are the list of supported events that embed fires.

Was this helpful?

  1. Core Features
  2. New Docs Embed

Embed events

Actions/Events

You can listen to an event that occurs in embed as follows. We use the term Action and Event interchangeably. Though the technically better term is event, it can be confused with booking events or event-types.

<script>
Cal("on", {
  action: "ANY_ACTION_NAME",
  callback: (e)=>{
    // `data` is properties for the event.
    // `type` is the name of the action(You can also call it type of the action.) This would be same as "ANY_ACTION_NAME" except when ANY_ACTION_NAME="*" which listens to all the events.
    // `namespace` tells you the Cal namespace for which the event is fired/
    const {data, type, namespace} = e.detail;
  }
})
</script>

Following are the list of supported events that embed fires.

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 for 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 msg 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

__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

Events that start with __ are internal.

PreviousEmbed Snippet GeneratorNextEmbed instructions

Last updated 1 year ago

Was this helpful?

To get more details on how Embed actually works, you can refer to this

Embed Flowchart