Write Salesforce Scheduler Appointments to External Calendars

Enable the Publish Appointments as Platform Events setting, subscribe to the AppointmentSchedulingEvent platform event, and then use APIs to write appointments to external calendars.

Required Editions

Available in: Lightning Experience.
Available in: Enterprise and Unlimited Editions

External calendar update overview

  1. Enable the Publish Appointments as Platform Events setting to let new appointments or appointment updates trigger high-volume platform events.
    1. From Setup, in the Quick Find box, enter Salesforce Scheduler, then select Salesforce Scheduler Settings.
    2. Enable Publish Appointments as Platform Events.

    A platform event is published when:

    • A service appointment with an assigned resource is created.
    • A service appointment is deleted.
    • An assigned resource is added or removed.
    • When at least one of the following fields changes in the SvcApptSchdEvent event object. This event object represents the Service Appointment object.
      • SchedStartTime
      • SchedEndTime
      • DurationInMinutes
      • WorkType
      • ServiceTerritory
      • Address
      • StatusCategory
      • AppointmentType
      • Phone
      • Subject
      • Comments
      • AdditionalInformation
      • Email
      • Contact
    • When at least one of the following fields changes in the AsgnRsrcApptSchdEvent event object. This event object represents the Assigned Resource object.
      • ServiceResource
      • IsRequiredResource
      • IsPrimaryResource
    Note
    Note
    • A time slot blocked before or after an appointment doesn’t trigger a platform event. Instead, these blocked time slots are added to the event payload itself.
    • An Asset service resource booked in an appointment doesn’t trigger a platform event.
  2. Subscribe to the AppointmentSchedulingEvent platform event with Apex triggers, EMP Connector, a CometD client, or a third-party connector such as the Salesforce Platform Events Source Connector for Confluent Platform.
  3. Implement APIs to write the platform event changes to your email server. For example, use Microsoft Graph REST API to publish the events in Microsoft® Outlook®.

    For external calendars that support custom fields, we recommend that you store the service appointment IDs as custom fields for easy appointment updates.