> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: Sample Flows ## Article: Sample Flows ## Article Link: https://dev.wix.com/docs/api-reference/business-management/calendar/sample-flows.md ## Article Content: # Calendar V3: Sample Use Cases and Flows This article shares possible use cases you could support, along with sample flows that could guide each use case. Use this as a starting point as you plan your implementation. ## Manage a calendar Allow business owners to manage schedules. To manage a calendar: 1. Call [Create Schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/create-schedule.md) to set your new calendar. Specify your `appId`, we recommend to also set `name`. Save the ID of the created schedule. 1. Call [Create Event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/create-event.md) for every event you want to add to the calendar. Specify the `scheduleId`, `start`, and `end` times. 1. To display the calendar to the business owner, call [Query Events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/query-events.md), filtering by your `appId`. 1. When the calendar owner clicks on an event, you could display more details and allow editing and canceling the event. 1. Optional: Call [Update Event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/update-event.md) and [Cancel Event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/cancel-event.md) as necessary. ## Sync calendars to an external system You can help business owners keep their external calendar up to date with their Wix calendars. To synchronize to the external system: 1. Subscribe to the [Events View Projection Updated](https://dev.wix.com/docs/rest/business-management/calendar/event-views-v3/events-view-projection-updated.md) event. 1. Based on the domain event's `actionEvent` type, create, update, or delete the corresponding event in the external calendar: - `eventAddedOrUpdated`: Create or update the event in the external calendar if its `revision` is higher than that of the event stored in the external calendar. - `eventRemoved`: Soft delete the event in the external calendar to avoid inconsistencies, as a hard delete might cause a mismatch if an updated event arrives later than a delete event. 1. Call [Get Events View](https://dev.wix.com/docs/rest/business-management/calendar/event-views-v3/get-events-view.md) to retrieve the `endDate` of the Wix calendar's event view. 1. Call [Query Events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/query-events.md) to retrieve information about all events in the current event view. - Specify the `endDate` value from the event view as `toLocalDate`. - You may specify `fromLocalDate` as needed. - You can specify additional query filters based on your use case. See the [filtering article](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/supported-filters-and-sorting.md) for a complete list of supported filters. 1. Continue listening to the [Events View Projection Updated](https://dev.wix.com/docs/rest/business-management/calendar/event-views-v3/events-view-projection-updated.md) event. Create, update, or soft delete events in the external calendar as described in step 2. ## Create a participant dashboard Enable business owners to manage their events' participation details through a dashboard. Note that Wix Bookings automatically provides this functionality. To create a participant dashboard: 1. Call [Query Events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/query-events.md), specifying `fromLocalDate` and `toLocalDate` as filters. For additional filter options, refer to the [filtering article](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/supported-filters-and-sorting.md). 1. Display the events to the business owner and let them select an event for participation management. 1. Call [Query Participations](https://dev.wix.com/docs/rest/business-management/calendar/participations-v3/query-participations.md), specifying the event ID as filter. 1. Display the participant list to the business owner, enabling them to modify it as needed. 1. Call [Create Participation](https://dev.wix.com/docs/rest/business-management/calendar/participations-v3/create-participation.md), [Update Participation](https://dev.wix.com/docs/rest/business-management/calendar/participations-v3/update-participation.md), or [Delete Participation](https://dev.wix.com/docs/rest/business-management/calendar/participations-v3/delete-participation.md) to adjust the list as necessary. ## Block Wix Bookings resources You could extend Wix Bookings functionality by blocking time across multiple [Bookings resources](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/about-resources.md). To block Bookings resources: 1. Call [Query Resources](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/query-resources.md) to retrieve the schedule IDs of the relevant resources. 1. Set up a combined schedule for all affected resources by calling [Create Schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/create-schedule.md). Specify a descriptive `name` and set `appId` to the Wix Bookings app ID `13d21c63-b5ec-5912-8397-c3a5ddb27a97`. Save the returned `scheduleId`. 1. Call [Create Event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/create-event.md). Specify a `start` and `end` time, the `scheduleId`, and all relevant `resourceId`s. To make the blocked time recurring, also specify a `recurrenceRule`. ## Integrate Google Meet with Wix Bookings appointments You can add Google Meet conferencing to Wix Bookings appointments. By default, Wix Bookings supports only Zoom conferencing. To integrate Google Meet with Wix Bookings appointments: 1. For the relevant appointment-based service, call [Update Service](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/update-service.md) to set `conferencing.enabled` to `false`. This prevents Wix Bookings from automatically adding default conferencing details to the service. 1. Subscribe to [Events View Projection Updated](https://dev.wix.com/docs/rest/business-management/calendar/event-views-v3/events-view-projection-updated.md). 1. Filter events to identify those for the relevant service: - Ensure `actionEvent.body.appId` equals the Wix Bookings app ID `13d21c63-b5ec-5912-8397-c3a5ddb27a97`. - Check that `event.externalScheduleId` equals your target service ID. 1. Based on the domain event's `actionEvent` type, create, update, or delete the corresponding Google Meet meeting: - `eventAddedOrUpdated`: 1. Check if the event already includes Google Meet conferencing. 1. If conferencing is missing, create a Google Meet meeting using Google's APIs. 1. If the event already has conferencing, update the Google Meet meeting using Google's APIs. For example, when participants are added or removed or when the meeting is rescheduled. 1. Call [Update Event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/update-event.md) to add or update the Google Meet conferencing details for the calendar event. Specify the event `id`, `revision`, and `conferencingDetails` with `type` set to `CUSTOM`, along with the meeting URLs in `hostUrl` and `guestUrl`. Optionally, you can also set `conferencingDetails.externalId` for your own management purposes. - `eventRemoved`: Delete the corresponding Google Meet meeting using Google's APIs.