Provides setup, recipes, API calls, and extension code for the CrestApps Orchard Core Scheduling module. Covers appointment types, staff/room/equipment resources, availability, booking, sessions, waitlists, and the scheduling API.
Ships in crestapps-orchardcore. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are an Orchard Core expert. Generate accurate setup, recipes, API calls and extension code for the CrestApps Scheduling module. It works out open times from each resource's working hours (or its shifts on a calendar) less its busy time on the shared calendar, books them under locks so a resource is never taken twice, and puts every appointment on the resource's calendar as an event.
CrestApps.OrchardCore.Scheduling (or the CrestApps.OrchardCore.Cms.Core.Targets bundle, which includes it and Calendars) in the web/startup project.CrestApps.OrchardCore.Calendars; calendars, free/busy and calendar workflows are covered by orchardcore-calendars.CrestApps.OrchardCore.Scheduling.Abstractions (models, IAppointmentService, ISchedulingAvailabilityService, IAppointmentSlotFilter, IAppointmentObserver, SchedulingPermissions); stores and services in CrestApps.OrchardCore.Scheduling.Core.IAppointmentService. It locks, re-checks availability, versions resources and writes the calendar event in the same session. Register people for dated sessions through ISchedulingSessionService.ILocalClock, the DateTime shape) and convert entered times back with ILocalClock.ToUtcLenientAsync; see orchardcore-time-zones.Scheduling YesSql collection. Appointment events go on Appointments calendars (Source = Scheduling, SourceId = appointment id, Editable = false).ManageToken link.orchardcore-bookings, not Scheduling. Work orders from bookings are orchardcore-work-orders; technician capacity is orchardcore-dispatch; shifts come from orchardcore-workforce.{ "steps": [...] }.sealed modifier, except View Models.| Feature | ID | Depends on | Adds |
|---|---|---|---|
| Scheduling | CrestApps.OrchardCore.Scheduling | CrestApps.OrchardCore.Calendars | Appointment types, resources, availability, appointments, holds, waitlist, the Appointments calendar type, admin screens |
| Scheduling Self-Service | CrestApps.OrchardCore.Scheduling.SelfService | Scheduling | Public book/{slug} pages and book/manage/{id}/{token} links |
| Scheduling API | CrestApps.OrchardCore.Scheduling.Api | Scheduling | /api/scheduling/v1 |
{
"steps": [
{
"name": "Feature",
"enable": [
"CrestApps.OrchardCore.Calendars",
"CrestApps.OrchardCore.Calendars.Reminders",
"CrestApps.OrchardCore.Scheduling",
"CrestApps.OrchardCore.Scheduling.SelfService",
"CrestApps.OrchardCore.Scheduling.Api"
],
"disable": []
}
]
}
| Feature on | What it adds |
|---|---|
OrchardCore.Workflows | Appointment events and tasks; Appointment Starting Soon also needs CrestApps.OrchardCore.Calendars.Reminders |
CrestApps.OrchardCore.AI | Four customer-facing AI tools |
OrchardCore.DataPipelines.Core | The Scheduling Report Builder data source |
OrchardCore.Recipes.Core / OrchardCore.Deployment | The Scheduling recipe step / deployment step |
CrestApps.OrchardCore.Recipes | SchedulingRecipeStepSchema and SchedulingDeploymentStepSchema |
CrestApps.OrchardCore.Staff | The resource editor picks a staff resource's person with the StaffPicker (else the calendar user search); saving fills an empty name and time zone from the staff record and gives the person the Bookable staff capability ("Takes appointments as a scheduling resource"), creating a staff record when the user has none. See orchardcore-staff. |
| Learning Classes | A class item's sessions are Scheduling sessions with source Learning.Class. |
| Workforce | A team's Workforce calendar holds Shift events that resources in Shifts mode read; breaks inside shifts are busy (ShiftSegmentBusyTimeSource) |
CrestApps.OrchardCore.WorkOrders | A work order type lists AppointmentTypeIds; each confirmed booking makes a work order, moves it when rescheduled and cancels it with the booking |
CrestApps.OrchardCore.Dispatch | DispatchCapacitySlotFilter offers a work-order appointment slot only while a qualified technician can take the job |
| Menu | Route | Permission |
|---|---|---|
| Calendars > Appointments | scheduling/appointments, scheduling/appointments/new, scheduling/appointments/{id} (actions post to {id}/do) | ViewAppointments (list, detail), ManageAppointments (book, act) |
| Calendars > Appointment Types | scheduling/types, scheduling/types/edit/{id?} | ManageScheduling |
| Calendars > Scheduling Resources | scheduling/resources, scheduling/resources/edit/{id?} | ManageScheduling |
| Calendars > Waitlist | scheduling/waitlist, scheduling/waitlist/add | ManageAppointments |
| Permission | Display name | Implied by | Default role |
|---|---|---|---|
ManageScheduling | Manage scheduling | none | Administrator |
ManageAppointments | Manage appointments | ManageScheduling | Administrator, Editor |
ViewAppointments | View appointments | ManageAppointments | Administrator, Editor (through Manage appointments) |
| Record | Key properties |
|---|---|
SchedulingResource | Name, Kind (Staff, Room, Equipment, Other), UserId (a staff member's user; their own calendars also make them busy), CalendarId, TimeZoneId, AvailabilityMode (WorkingHours, Shifts), ShiftCalendarIds (legacy single ShiftCalendarId still read), WorkingHours (Day, Start, End as HH:mm; several per day, gaps are breaks), DateOverrides (Date, Closed, Start, End), Enabled, BookingVersion |
AppointmentType | Name, Description, Slug, DurationMinutes (30), SlotIntervalMinutes (30), BufferBeforeMinutes, BufferAfterMinutes, MinimumNoticeMinutes (60), HorizonDays (60), MaxPerDay (0 = none), MaxPerWeek (0), MaxUpcomingPerCustomer (0), CancelNoticeMinutes (0), RescheduleNoticeMinutes (0), Capacity (1; more is a group session), ResourceIds, Assignment, ResourceRequirements, RequiresConfirmation, HoldMinutes (10), AllowSelfService, Location, Color, Enabled |
AppointmentResourceRequirement | Name, ResourceIds (preference order), Assignment, Weights (resource id to round-robin weight, 1 when absent) |
Appointment | AppointmentTypeId, ResourceIds, StartUtc, EndUtc, TimeZoneId, Status, HoldExpiresUtc, CustomerName, CustomerEmail, CustomerPhone, UserId, Notes, CalendarEventId, ManageToken, Source (Admin, SelfService, Api, AI, Workflow, or a module's own), SourceId, CancelReason; for a session registration SessionId, Attendance (Unmarked, Attended, Partial, Absent), MinutesAttended |
WaitlistEntry | AppointmentTypeId, FromUtc, ToUtc, CustomerName, CustomerEmail, CustomerPhone, UserId, Status (Waiting, Notified, Booked, Removed, OfferExpired), NotifiedUtc; for a session SessionId, AppointmentId (the offered place), OfferExpiresUtc, Source, SourceId |
SchedulingSession | AppointmentTypeId, Title, Meetings (StartUtc, EndUtc), Capacity (1), Location, MeetingUrl, ResourceIds, RegistrationOpensUtc, RegistrationClosesUtc, WaitlistMode (AutoPromote default, Notify, None), OfferHours (24), Status (Scheduled, Cancelled), Source, SourceId, CalendarEventId |
Every index provider is declared .ExclusiveToDocumentType(); all but AppointmentResourceIndex (one row per booked resource) are also .SingleRecordPerDocument(). WaitlistEntryIndex only holds entries without a SessionId; session registrations and waits have their own SessionRegistrationIndex and SessionWaitlistIndex (migration 3).
AppointmentStatus is Held, Requested, Confirmed, Completed, NoShow, Cancelled or Expired. AppointmentAssignment is AnyAvailable (first free in list order), RoundRobin (fewest appointments in the last 30 days divided by weight) or AllTogether (every resource at once, such as a doctor and a nurse).
Saving a resource in the editor without a calendar creates an Appointments calendar for it (Source = Scheduling, SourceId = resource id). A resource with no calendar can't be booked.
ISchedulingAvailabilityService.FindSlotsAsync(type, fromUtc, toUtc, resourceId, maxResults, excludeAppointmentId) returns AppointmentSlots (StartUtc, EndUtc, free ResourceIds, Remaining places):
MinimumNoticeMinutes and HorizonDays.WorkingHours less DateOverrides, in the resource's time zone; or in Shifts mode the Shift events on its ShiftCalendarIds that name its user as an attendee (a person on two teams gets hours from both).ICalendarAvailabilityService.GetBusyAsync for the resource's calendar and user (including every ICalendarBusyTimeSource), each interval widened by the type's buffers. A booked appointment also keeps its own type's buffers clear, so a later booking can't fall inside them (a group session's own start is still offered while it has places).SlotIntervalMinutes from the start of each open range. The appointment itself must fit inside open hours (buffers may run outside, only clear of busy time), and MaxPerDay / MaxPerWeek (Monday to Sunday in the resource's zone) must not be reached.AllTogether group). An appointment makes every one of its resources busy.IAppointmentSlotFilter can then drop slots or lower Remaining, never add any; booking and rescheduling check against the same filtered slots.{
"resourceRequirements": [
{ "name": "Staff", "resourceIds": [ "4sresdrsmith00000000000001", "4sresdrjones00000000000001" ], "assignment": "RoundRobin", "weights": { "4sresdrsmith00000000000001": 2 } },
{ "name": "Room", "resourceIds": [ "4sresroom10000000000000001", "4sresroom20000000000000001" ], "assignment": "AnyAvailable" }
]
}
Groups are picked in order and never take the same resource twice; the appointment's ResourceIds hold the picks in group order and its event goes on the first one's calendar. A chosen resourceId narrows only its own group. A type without ResourceRequirements behaves as one group of ResourceIds + Assignment (GetResourceRequirements(), GetAllResourceIds()). A resource may be in only one group of a type.
IAppointmentService member | Does |
|---|---|
BookAsync(AppointmentRequest) | Book, or with Hold = true hold for HoldMinutes; Requested when the type RequiresConfirmation |
ConfirmAsync(appointment, actor) | Confirm a held or requested appointment |
RescheduleAsync(appointment, startUtc, resourceId, actor, selfService) | Move; keeps resources when all are still free and valid |
CancelAsync(appointment, reason, actor, selfService) | Cancel and free the time (offered to the waitlist) |
CompleteAsync(appointment, noShow, actor) | Took place, or no-show |
ExpireHoldsAsync() | End holds that ran out (background task every minute) |
For an appointment with a SessionId, IAppointmentService hands off to the session service: confirming a held place accepts the offer, cancelling gives the place to the session's waitlist, completing records attendance, and rescheduling is refused (register in another session instead).
AppointmentRequest: AppointmentTypeId, StartUtc, ResourceId, CustomerName, CustomerEmail, CustomerPhone, UserId, Notes, TimeZoneId, Source, SourceId, Actor, Hold, SelfService. Results are AppointmentResult (Appointment, Errors, Succeeded, Conflict).
Every booking and reschedule locks SCHEDULING_RESOURCE_{id} for every resource it could take plus their calendars' CALENDAR_{id} keys (and SCHEDULING_CUSTOMER_{typeId}_{identifier} with a per-customer limit) in one ordinal-ordered set, re-checks availability, picks resources, bumps every taken resource's BookingVersion with YesSql's concurrency check, then writes the appointment and its calendar event (tentative while held or requested) with CalendarLocksHeld. A booking for a customer who already has that type at that time is a Conflict, so retries can't take a second place.
var result = await _appointmentService.BookAsync(new AppointmentRequest
{
AppointmentTypeId = typeId,
StartUtc = slot.StartUtc,
CustomerName = "Admin",
CustomerEmail = "[email protected]",
Source = "Portal",
Actor = User.Identity?.Name,
SelfService = true,
});
if (result.Conflict)
{
// The time was taken meanwhile; offer the slots again.
}
Applied only to self-service calls (AppointmentRequest.SelfService = true, selfService: true on cancel and reschedule):
| Property | Self-service rule |
|---|---|
MaxUpcomingPerCustomer | At most this many held, requested or confirmed future appointments of the type per customer (matched by user id, email or phone, under a customer lock) |
CancelNoticeMinutes | No cancelling within this many minutes of the start |
RescheduleNoticeMinutes | No moving within this many minutes of the start |
The booking page and manage link are always self-service; AI tools are unless the user has ManageAppointments; admin screens, the API and workflows never are. CustomerCanCancel / CustomerCanReschedule tell a page whether to offer the actions. MinimumNoticeMinutes, HorizonDays, MaxPerDay and MaxPerWeek shape open times for everyone.
AllowSelfService, Enabled and a Slug gets /book/{slug} (route SchedulingBook): pick a day and time (site time zone), enter name, email, phone and notes. The customer lands on /book/manage/{id}/{token} (SchedulingManage) to move or cancel without signing in. Otherwise 404.Waiting entry whose range covers it is marked Notified and Waitlist Slot Available is raised. A group session shares one calendar event per time (SourceId = session:...).A SchedulingSession is a dated occurrence of an appointment type that several people register for (a class, a workshop, a webinar): one or more meetings, its own capacity, a registration window and a waitlist. A module that needs sessions builds on them instead of keeping seats of its own. ISchedulingSessionService (DefaultSchedulingSessionService, registered by AddSchedulingCore()) runs every register, cancel, accept and pass-on under one distributed lock per session on fresh counts, so a session never takes more than its capacity.
var session = new SchedulingSession
{
AppointmentTypeId = workshopTypeId,
Title = "Forklift safety, morning group",
Capacity = 12,
ResourceIds = [instructorResourceId],
Meetings = [new SchedulingSessionMeeting { StartUtc = startUtc, EndUtc = startUtc.AddHours(3) }],
WaitlistMode = SchedulingWaitlistMode.AutoPromote,
Source = "Training.Course",
SourceId = courseId,
};
var errors = await _sessionService.SaveAsync(session, actor);
var result = await _sessionService.RegisterAsync(new SessionRegistrationRequest
{
SessionId = session.ItemId,
UserId = userId,
Source = "Training.Course",
SourceId = courseId,
Actor = userName,
});
if (result.Waitlisted)
{
// Full: result.WaitlistEntry holds the place in line.
}
A registration is an Appointment with SessionId (one per person for every meeting); the session's single calendar event sits on its first resource's calendar with the registered people as attendees. Changes reach IAppointmentObserver after commit, with WaitlistSlotAvailable when a place frees up. The appointment holds background task also calls ExpireOffersAsync every minute. The full member list, waitlist modes and attendance are in references/scheduling-sessions.md.
| Seam | Use it to |
|---|---|
IAppointmentService / ISchedulingAvailabilityService | Book and find open times from another module |
ISchedulingSessionService | Keep dated sessions, their registrations, waitlist offers and attendance |
IAppointmentSlotFilter | FilterAsync(AppointmentSlotFilterContext, slots) narrows offered slots (context has AppointmentType, ExcludeAppointmentId); register with services.AddScoped<IAppointmentSlotFilter, T>() |
IAppointmentObserver | OnChangedAsync(AppointmentChange) after commit: Kind (Held, Requested, Confirmed, Rescheduled, Cancelled, Completed, NoShow, HoldExpired, WaitlistSlotAvailable), Appointment, AppointmentType, PreviousStartUtc, WaitlistEntry, Actor |
DisplayDriver<AppointmentType> / DisplayDriver<SchedulingResource> | Add a section to the appointment type or resource editor, both built with IDisplayManager<T>; built-in fields are AppointmentTypeFields_Edit / SchedulingResourceFields_Edit at Content:1 |
| Calendar seams | Appointments are calendar events; ICalendarBusyTimeSource closes slots, ICalendarEventObserver sees appointment events |
public sealed class LunchSlotFilter : IAppointmentSlotFilter
{
public Task<IReadOnlyList<AppointmentSlot>> FilterAsync(AppointmentSlotFilterContext context, IReadOnlyList<AppointmentSlot> slots, CancellationToken cancellationToken = default)
{
if (context.AppointmentType?.Slug != "consultation")
{
return Task.FromResult(slots);
}
IReadOnlyList<AppointmentSlot> kept = slots
.Where(slot => CalendarTime.ToLocal(slot.StartUtc, "America/New_York").Hour != 12)
.ToList();
return Task.FromResult(kept);
}
}
// Startup: services.AddScoped<IAppointmentSlotFilter, LunchSlotFilter>();
An observer, an editor section driver with validation, and more are in references/scheduling-extensions.md.
Activities are in the Scheduling category; each event can be limited to AppointmentTypeIds.
| Events | Tasks (outcomes) |
|---|---|
AppointmentRequestedEvent, AppointmentConfirmedEvent, AppointmentRescheduledEvent, AppointmentCancelledEvent, AppointmentCompletedEvent, AppointmentNoShowEvent, AppointmentHoldExpiredEvent, WaitlistSlotAvailableEvent, AppointmentStartingSoonEvent (needs Calendar Reminders) | Find Appointment Slots (Found, None), Book Appointment (Done, Taken, Failed), Confirm Appointment (Done, Failed), Reschedule Appointment (Done, Taken, Failed), Cancel Appointment (Done, Failed), Get Appointment (Found, NotFound), Add to Waitlist (Done, Failed) |
Input holds Appointment, AppointmentId, AppointmentTypeId, AppointmentTypeName, ResourceIds, StartUtc, EndUtc, Status, customer fields, UserId, Notes, CalendarEventId, ManageToken, Source, CancelReason, Actor, PreviousStartUtc; the waitlist event holds WaitlistEntryId and the freed StartUtc. Appointments booked by tasks have Source = Workflow.
/api/scheduling/v1 (Orchard Core Api scheme):
| Method and route | Does | Permission |
|---|---|---|
GET types | Types with resourceRequirements | ViewAppointments |
GET types/{id}/slots?from=&to=&resourceId= | Open times, at most 31 days | ViewAppointments |
POST appointments | Book from an AppointmentRequest body; 201 | ManageAppointments |
GET appointments/{id} | One appointment | ViewAppointments |
POST appointments/{id}/confirm | Confirm | ManageAppointments |
POST appointments/{id}/reschedule | { "startUtc": "...", "resourceId": null } | ManageAppointments |
POST appointments/{id}/cancel | { "reason": "..." } | ManageAppointments |
A taken time or duplicate booking is 409 Problem Details; a missing body or backwards range is 400.
With CrestApps.OrchardCore.AI on, the Scheduling category has listAppointmentTypes, findAppointmentSlots, bookAppointment and changeAppointment. They work for anonymous visitors but only with enabled self-service types (unless the caller has ManageAppointments); changeAppointment needs the manage code or the email or phone on the appointment. See orchardcore-ai-tools.
With OrchardCore.DataPipelines.Core on, the Scheduling data source (Scheduling) has Appointments, AppointmentResources (one row per resource booked), AppointmentTypes and SchedulingResources (need ViewAppointments) and WaitlistEntries (needs ManageAppointments). Notes, cancel reasons, manage links and working hours are never exposed. See orchardcore-report-builder.
The Scheduling step (needs OrchardCore.Recipes.Core) imports Resources, AppointmentTypes, Appointments and Waitlist in that order, each created or, when itemId matches, replaced in place. Properties are camelCase; enums by name. Run it after the Calendars step.
{
"steps": [
{
"name": "Scheduling",
"Resources": [
{
"itemId": "4sresdrsmith00000000000001",
"name": "Dr. Smith",
"kind": "Staff",
"calendarId": "4cdrsmithappointments00001",
"timeZoneId": "America/New_York",
"availabilityMode": "WorkingHours",
"workingHours": [ { "day": "Monday", "start": "09:00", "end": "17:00" } ],
"enabled": true
}
],
"AppointmentTypes": [
{
"itemId": "4stypeconsultation00000001",
"name": "Consultation",
"slug": "consultation",
"durationMinutes": 30,
"slotIntervalMinutes": 30,
"resourceIds": [ "4sresdrsmith00000000000001" ],
"assignment": "AnyAvailable",
"allowSelfService": true,
"enabled": true
}
]
}
]
}
The Scheduling deployment step (category Calendar) exports resources and types, with IncludeAppointments (false) appointments without manage links, and with IncludeWaitlist (false) the waitlist. Full examples (shifts, overrides, groups, policies, appointments) are in references/scheduling-recipes.md.
| Symptom | Check |
|---|---|
| No times offered | Type has resources, resources are Enabled, working hours cover the day, the day is inside notice and horizon, nothing busy on the resource's or user's calendars, and no slot filter drops it. |
| "The resource has no calendar to put the appointment on." | The recipe step never creates calendars; create an Appointments calendar in the Calendars step and set calendarId. |
| Imported appointments are missing from the calendar | The step writes records only; export and import the Calendars step with events too. |
| Shift staff never offered | Set ShiftCalendarIds; the Shift events must name the resource's UserId as attendee, and the Workforce schedule must be published. |
| Booking page 404 | Enable Self-Service; the type needs Enabled, AllowSelfService and a slug. |
| Customer limit or notice not enforced | Policies apply only to self-service calls; staff, API and workflows bypass them. |
| Editor refuses to save | A section driver added a model error, or a resource is in two requirement groups. |
| "A place in a dated session moves with the session" | Session registrations can't be rescheduled; cancel and register in another session. |
| Session registration refused | Outside RegistrationOpensUtc..RegistrationClosesUtc (empty closes at the first meeting; IgnoreWindow for staff), the session is cancelled, or it is full with WaitlistMode None or JoinWaitlistWhenFull = false. |
| User picker in the resource editor is empty | Without Staff it calls the calendar user search (route CalendarsUserSearch), which needs AccessCalendars and AccessAdminPanel; emails are matched only for callers with ViewUsers. |
Scheduling records the crestapps.scheduling.observer.failures counter on the Scheduling meter when an observer throws; see orchardcore-opentelemetry.
Related skills: orchardcore-staff, orchardcore-calendars, orchardcore-workforce, orchardcore-teams, orchardcore-work-orders, orchardcore-dispatch, orchardcore-bookings, orchardcore-ai-tools, orchardcore-report-builder, orchardcore-learning (Learning Classes run their dated sessions on Scheduling).
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
orchard-core, scheduling, appointments, booking, resource-management
/crestapps-orchardcore:orchardcore-schedulingfrom crestapps-orchardcore
npx claudepluginhub crestapps/crestapps.agentskills --plugin crestapps-orchardcore137 skills in this plugin
/orchardcore-accountsSkill for the CrestApps Orchard Core Accounts module (CrestApps.OrchardCore.Accounts) with its Account Members, Account Team, Account E-mail Domains and Account Locations features. Covers the Account type and AccountPart, the account picker and search, IAccountChildTypeRule, account page sections (AccountPageTabs, AddPageSection, Notes), members and IAccountMemberService, account invitations, the account owner and team picked from staff, e-mail domains, locations with a billing location, the account's billing profile and party members, the Accounts recipe and deployment steps, and the admin menu. Use this skill when requests mention accounts, the businesses or households records belong to, an account page tab, members, invitations, owners, domains or locations. Strong matches include AccountPart, AccountPageTabs, IAccountMemberService, IAccountInvitationService, AccountInvitation, AccountTeamPart, AccountEmailDomainsPart, IAccountEmailDomains, AccountLocationsPart and ManageAccountMembers./orchardcore-accounts-b2bSkill for the CrestApps Orchard Core Accounts B2B module (CrestApps.OrchardCore.Accounts.B2B), business selling on an Account content item. Covers B2BAccountPart and B2BAccount, buyers as account members and ship-to addresses as account locations, terms (deposit, net days, credit limit) through the account-terms tender billed to the account, the account's billing profile, purchase order numbers, quotes, price lists through IBuyerPriceProvider, order limits, approvals and budgets, OCI punchout, the account/business page and API, the PriceLists recipe and deployment steps, the B2BAccounts report source, and the move from the removed Companies module. Use this skill when requests mention B2B, wholesale or business buyers, net terms, purchase orders, price lists, order approvals or punchout. Strong matches include B2BAccountPart, B2BAccount, AccountTerms, AccountTermsTenderProvider, B2BAccountBillingProfileSource, IB2BAccountStore, PriceList, B2BPriceProvider, B2BApprovalService and ManageB2BAccounts.Other plugins' skills for the same job