Technical reference
Key Components and Data Models
A look at the key components and data models in the Scheduler system.
This article provides a more detailed look at the key components of Schedulerlication, both on the backend and the frontend, as well as the high-level data model for the settings.
Key Backend Areas
controllers/settingsController.js: This controller is responsible for loading and saving the workflow settings.models/Settings_Schema.js: This file defines the schema for the workflow-scoped settings, which are isolated on a per-organisation basis.routes/searchRoutes.js: This file contains the API endpoints for the slot search functionality.controllers/bookingFormController.js: This controller handles the submission of the booking form and the integration with Zoho's lead conversion process.scripts/convertLead.js: This is a helper script for handling lead conversion, using the settings-driven mappings.
Key Frontend Areas
components/SettingsPage.js: This component provides the end-to-end interface for configuring a workflow.components/BookingForm.js: This component renders the required fields for the booking form and enforces any mandatory Deal fields that are not automatically mapped.components/SearchResultsPage.js: This component is responsible for rendering the results from the/searchAPI endpoint.
Settings Data Model
The settings for a workflow are stored in a data model with the following high-level structure:
workflowId,workflowNamesourceModule,destinationModule,createMeetingappFieldMapping[](fixed app fields to CRM targets)crmModuleFields[](copied module field catalogues with flags likeshowInBookingForm,required)fieldAgents[](selected CRM user IDs)validityFilter(destination criteria)defaultMeetingDuration,defaultWeeksInAdvancedefaultAppointmentSlots[](e.g., 10:00, 13:00, 16:00)notifications{ system, webhookUrl }