---
schema_version: "1"
id: d78142a88cca62b6c38d526e7ce9e98a0d9e6c2cfb322aec37e6020e6dd6cdc7
title: Write Salesforce Scheduler Appointments to External Calendars
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/ls_ext_cal_update.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.ls_ext_cal_update.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 285ec1563ed33beaed9f33178ae5ddbe52f65d0de25105ee8a82af236d05f79f
description: Enable the Publish Appointments as Platform Events setting, subscribe to the AppointmentSchedulingEvent platform event, and then use APIs to write appointments to external calendars.
products:
  - Scheduler
  - Salesforce Platform
release: "264"
---
# 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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong> and <strong>Unlimited</strong> Editions</td></tr></tbody></table>

![External calendar update overview](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/scheduler/images/ls_write_to_ext_cal.png)

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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/images/icon_note.png)
    
    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.

#### See Also

- [_Platform Events Developer Guide_: Subscribing to Platform Events](https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platform_events_subscribe.htm)
- [_Platform Events Developer Guide_: AppointmentSchedulingEvent](https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/sforce_api_objects_appointmentschedulingevent.htm)
- [_Platform Events Developer Guide_: Example: Subscribe to and Replay Events Using a Java Client (EMP Connector)](https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/code_sample_java_client_intro.htm)
- [Salesforce Platform Events Source Connector for Confluent Platform](https://docs.confluent.io/current/connect/kafka-connect-salesforce/platformevents/index.html)
- [Get Access on Behalf of a User](https://docs.microsoft.com/en-us/graph/auth-v2-user)