Provides setup, recipes, API calls, and extension code for the CrestApps Orchard Core Dispatch module. Covers service visits, technician assignment, dispatch board, route optimization, field service APIs, and AI tools.
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 Dispatch module. Each work order gets a visit; the visit is given technicians and a start, moved along its field statuses, and shown on a board with everyone's day.
CrestApps.OrchardCore.Dispatch (or the CrestApps.OrchardCore.Cms.Core.Targets bundle, which includes it, Work Orders, Assets, Workforce and Geo) in the web/startup project.orchardcore-staff) that hold one of the capabilities in DispatchSettings.TechnicianCapabilities (Technician by default) and work published Workforce shifts; nothing can be assigned until a schedule is published for their team.CrestApps.OrchardCore.Dispatch.Abstractions; services (DefaultDispatchService, DefaultDispatchCandidateFinder, DefaultDispatchOptimizer, DispatchOptimizationService, FieldSyncService) are in CrestApps.OrchardCore.Dispatch.Core.IDispatchService. It takes a distributed lock per worker (DISPATCH_RESOURCE_Worker_{id}) and on the visit, re-checks availability inside the lock, and saves before releasing it.orchardcore-or-tools add-on rather than replacing the service.orchardcore-work-orders, maps and travel times by orchardcore-geo, equipment and van stock by orchardcore-assets, staff members and capabilities by orchardcore-staff, teams and shifts by orchardcore-teams and orchardcore-workforce, skills by orchardcore-skills.{ "steps": [...] }.sealed modifier, except View Models.| Feature | ID | Depends on |
|---|---|---|
| Dispatch | CrestApps.OrchardCore.Dispatch | CrestApps.OrchardCore.WorkOrders, CrestApps.OrchardCore.Workforce, CrestApps.OrchardCore.Geo |
| Technician Mobile | CrestApps.OrchardCore.Dispatch.Mobile | CrestApps.OrchardCore.Dispatch, CrestApps.OrchardCore.Workforce.Portal, OrchardCore.Media |
| Field Service API | CrestApps.OrchardCore.Dispatch.Api | CrestApps.OrchardCore.Dispatch |
{
"steps": [
{
"name": "Feature",
"enable": [
"CrestApps.OrchardCore.Workforce.ShiftPlanning",
"CrestApps.OrchardCore.Dispatch",
"CrestApps.OrchardCore.Dispatch.Mobile",
"CrestApps.OrchardCore.Dispatch.Api"
],
"disable": []
}
]
}
| Feature on | What it adds |
|---|---|
OrchardCore.SignalR | Open boards reload when any visit changes (DispatchHub); otherwise every minute. |
OrchardCore.Workflows | Visit Assigned, Visit Status Changed and Visit At Risk events. |
CrestApps.OrchardCore.Skills | Required skills (lowest level) and certifications checked on the day, read from the staff member (SkillSubject.Staff). |
CrestApps.OrchardCore.Assets.Fleet | Required equipment (asset types) booked on Equipment calendars (FleetDispatchEquipmentService). |
OrchardCore.Sms, OrchardCore.Email | Customer notices by text when the contact has a phone, else email. |
CrestApps.OrchardCore.AI | The seven field service AI tools. |
OrchardCore.DataPipelines.Core | The Field Service report data source. |
CrestApps.OrchardCore.Reports | The Reports > Field Service > KPIs menu item (FieldServiceReportsAdminMenu). |
CrestApps.OrchardCore.Staff.Compensation | The Labor cost column of the Visits data set (each crew member's StaffPayRates.CostOn(day) times the time on site). |
CrestApps.OrchardCore.Scheduling | Booking capacity (DispatchCapacitySlotFilter). |
CrestApps.OrchardCore.Inventory with Technician Mobile | Stock locations for parts used, the technician's van first (IFieldStockSource). |
Dispatch registers the Technician staff capability (DispatchConstants.TechnicianCapability, through services.AddStaffCapability(...)). Tick it on the Capabilities card of a staff member, or add your own pools (such as Inspector) under Staff > Capabilities and pick them in Settings > Dispatch (TechnicianCapabilities). Suggestions, the optimizer, the visit list, territory members, the API, the AI tools and the work order Technicians card all go through DispatchResources.ListWorkersAsync, which searches active staff (StaffQuery with Status Active and the Capabilities), so office staff never appear.
IStaffTimeZoneResolver (the staff member's own), then their team's or a parent team's, then the dispatch time zone. The day's route starts at the staff member's geocoded HomeBase, else their team's location.dispatch/board?capability=Inspector); the optimizer works with the people the board shows.DispatchStaffLifecycleObserver (an IStaffLifecycleObserver) unassigns their scheduled and dispatched visits for the coming year.WorkforceStaffSettings) get the Technician capability once; untick it for anyone who isn't a technician. New staff members never get it automatically.WorkOrderTechnicians_Edit, Content:6) to the work order editor with staff pickers for PreferredWorkerIds and ExcludedWorkerIds (staff member ids); a person in both lists is kept away.Give technicians the capability in a recipe through the Workforce Workers section (it saves staff members):
{
"steps": [
{
"name": "Workforce",
"Workers": [
{ "displayName": "Ana Field", "employeeNumber": "2002", "jobTitle": "Service technician", "capabilities": [ "Technician" ], "teamMemberships": [ { "teamName": "Field Operations" } ] }
]
}
]
}
ServiceVisit lives in the Dispatch YesSql collection: Number (V-000001, series Dispatch.Visit), WorkOrderId with copies of the work order's number, summary, type, priority, territory and due time, Status, DurationMinutes, StartUtc, EndUtc, ArrivalStartUtc, ArrivalEndUtc, LeadWorkerId, WorkerIds, CrewSize, RequiredEquipmentTypeIds, EquipmentAssetIds, EtaUtc, AtRiskReason, Notices, Pinned, TravelMinutes, TravelKm, IncompleteReason, ReturnVisitId, CalendarEvents and History.
VisitStatus is Unscheduled, Scheduled, Dispatched, EnRoute, OnSite, Paused, Completed, Incomplete or Canceled, moved only along VisitStatusRules.
IDispatchService method | Does |
|---|---|
CreateAsync(workOrder, actor) | An unscheduled visit (also done automatically for new work orders when CreateVisitsForNewWorkOrders is on). |
CreateMissingAsync(actor) | A visit for every open work order without one. |
AssignAsync(visitId, VisitAssignment, actor) | WorkerIds (first leads), StartUtc, optional DurationMinutes and Pinned. Checks published shift, breaks, time off, other visits with travel and buffer, crew size and equipment; sets the arrival window, the lead's trip and a Job event on each worker's team calendar; moves the work order to Scheduled. |
UnassignAsync, PinAsync | Back to unscheduled; pinned visits are not moved by the optimizer. |
ChangeStatusAsync(visitId, status, note, actor) | En route and on site start the work order; canceling needs a reason and removes job events; incomplete needs a reason and makes a return visit. |
IDispatchCandidateFinder.FindAsync lists every active staff member with a technician capability between two times: ruled-out ones with the reason (excluded, missing skill or certification, outside a strict territory, no shift, time off, not free long enough), the rest with their earliest start (SlotFitter) and a score from the DispatchObjective weights. Travel comes from IGeoService.
dispatch/board): a row per technician with shift bands, time off and visits, the unscheduled list, and a Leaflet map. Drag to assign (quarter-hour steps), Find technician, and Optimize the day.IDispatchOptimizationService.ProposeAsync(day, workerIds, includeUnscheduled) builds a DispatchProblem and runs the last registered IDispatchOptimizer (DefaultDispatchOptimizer by default: cheapest insertion plus move, swap and reverse within OptimizerSeconds). Nothing changes until ApplyAsync(moves, actor), which assigns each move through AssignAsync.NoticesEnabled, VisitNoticeService sends Scheduled, Reminder (from ReminderHour), EnRoute, Completed and Canceled texts with {Company}, {Number}, {Date}, {Window}, {Technician}, {Eta} and {TrackingUrl}. The tracking page track/{token} needs no sign-in, is signed with data protection, lasts a week and stops when the visit is over.AtRiskMinutes).Settings > Dispatch (site settings group dispatch, DispatchSettings): TechnicianCapabilities (the Dispatch staff with list; empty means Technician), CreateVisitsForNewWorkOrders (true), ArrivalWindowMinutes (120), HorizonDays (7), BufferMinutes (10), StrictTerritory, TimeZoneId, Objective (TravelWeight 5, UrgencyWeight 3, ProficiencyWeight 2, PreferredWeight 4, BalanceWeight 2), AtRiskMinutes (15), OptimizerSeconds (5), NoticesEnabled, TrackingEnabled (true), ReminderHour (17), ScheduledText, ReminderText, EnRouteText, CompletedText, CanceledText, BookingWorkOrderTypeId.
{
"steps": [
{
"name": "Settings",
"DispatchSettings": {
"TimeZoneId": "America/New_York",
"TechnicianCapabilities": [ "Technician" ],
"ArrivalWindowMinutes": 120,
"BufferMinutes": 10,
"StrictTerritory": true,
"NoticesEnabled": true,
"Objective": { "TravelWeight": 5, "UrgencyWeight": 3, "ProficiencyWeight": 2, "PreferredWeight": 4, "BalanceWeight": 2 }
}
}
]
}
| Menu | Route | Permission |
|---|---|---|
| Field Service > Dispatch Board | dispatch/board (data from dispatch/board/data, moves to dispatch/board/move) | ViewDispatch |
| Field Service > Visits | dispatch/visits, dispatch/visits/{id} | ViewDispatch |
Reports > Field Service > KPIs (with CrestApps.OrchardCore.Reports on) | dispatch/kpis | ViewDispatch |
| Settings > Dispatch | site settings group dispatch | ManageDispatchSettings |
| Get started (not in the menu, linked from the board; checks for staff with the Technician capability and linked users) | dispatch/get-started | ManageDispatchSettings |
| My Work Field page (Technician Mobile) | ~/Admin/my-work/field | Use the My Work portal, and a staff member linked to the user |
| Permission | Display name | Implied by | Default role |
|---|---|---|---|
ManageDispatchSettings | Manage dispatch settings | none | Administrator |
ManageDispatch | Dispatch visits | ManageDispatchSettings | Administrator |
ViewDispatch | View visits and the dispatch board | ManageDispatch | Administrator |
Settings step (above); the Dispatch settings deployment step exports them.FieldServiceSample, not a setup recipe) enables Geo, Assets with Fleet, Work Orders, Workforce with Shift Planning and My Work, Dispatch and Technician Mobile, and adds a team with a dispatcher and three technicians, a shift template, two territories, asset types and assets, a shared WorkOrders service level policy (ServiceLevelPolicies step), a checklist, a sub-status and two work order types with fixed ids. Give the technicians the Technician capability and publish a schedule before dispatching. Its full shape is in references/field-service-sample.md.Category Dispatch. Each receives VisitId, Number, WorkOrderId, WorkOrderNumber, Status, LeadWorkerId, WorkerIds, StartUtc, EndUtc, ArrivalStartUtc and ArrivalEndUtc.
| Activity class | Display name | Event name | Extra input |
|---|---|---|---|
VisitAssignedEvent | Visit Assigned | VisitAssigned | PreviousStatus, Moved |
VisitStatusChangedEvent | Visit Status Changed (can be limited to statuses) | VisitStatusChanged | PreviousStatus |
VisitAtRiskEvent | Visit At Risk | VisitAtRisk | Reason |
With CrestApps.OrchardCore.AI on, these are selectable on an AI profile under Field Service; all but the last run as the signed-in user with the admin page's permission.
| Tool name | Title | Permission |
|---|---|---|
workOrderCreate | Create a work order | ManageWorkOrders |
workOrderStatus | Work order status | ViewWorkOrders |
workOrderSummarize | Summarize a work order | ViewWorkOrders |
dispatchFindTechnician | Find a technician | ViewDispatch |
dispatchOptimizeAndExplain | Optimize and explain a day (call again with apply and approved visit numbers) | ManageDispatch |
dispatchRescheduleVisit | Reschedule a visit | ManageDispatch |
dispatchWhereIsMyTechnician | Where is my technician (customer-facing; finds visits only by the caller's phone or tracking token) | none |
The Field Service API feature maps api/work-orders/v1, api/dispatch/v1, api/geo/v1 and (with Assets) api/assets/v1 under the Api authentication scheme, with the admin pages' permissions, enum names as strings and RFC 9457 problem details. Technician Mobile adds the offline Field page and api/dispatch/v1/mobile (GET pack, POST sync, POST consent, POST pings). Endpoint tables and request bodies are in references/field-service-api.md.
Technician Mobile reads DispatchMobileOptions from the tenant configuration section CrestApps:Dispatch:Mobile (described in the module's ConfigurationSchema.json):
{
"OrchardCore": {
"CrestApps": {
"Dispatch": {
"Mobile": {
"OfflineDays": 2,
"PingIntervalSeconds": 60,
"LocationRetentionDays": 30,
"ReceiptRetentionDays": 30,
"ConsentNoticeVersion": "1",
"MaxFileKilobytes": 4096,
"MaxCommandsPerSync": 200
}
}
}
}
}
With Scheduling on, DispatchCapacitySlotFilter (an IAppointmentSlotFilter) narrows the slots of every appointment type a work order type lists under Bookings: a slot stays only while enough technicians are on a published shift and free for the whole job (skills, certifications, crew size, length), less one for each unassigned (New or Ready) overlapping booking of the type, and Remaining is lowered to match. Appointment types no work order type lists keep their slots.
Reports > Field Service > KPIs (FieldServiceKpiService, last 30 days by default, at most a year, at most 5,000 visits and 5,000 work orders) shows first-time fix, on-time arrival, jobs per technician a day, return visits, travel against time on site, response and resolution compliance, time to repair, revenue per work order, repeat work and parts used by stock location.
With OrchardCore.DataPipelines.Core, the FieldService report data source offers FieldServiceWorkOrders (ViewWorkOrders) and FieldServiceVisits (ViewDispatch, with the lead Technician name and a Labor cost column from staff pay rates), and with Assets FieldServiceAssets, FieldServiceMeterReadings and FieldServiceServiceHistory. Add data sets with IFieldServiceReportDataSet. See orchardcore-report-builder.
| Seam | Use it to |
|---|---|
IVisitObserver | React after visit events (DispatchConstants.Events: VisitCreated, VisitAssigned, VisitUnassigned, VisitStatusChanged, VisitAtRisk). |
IDispatchOptimizer | Plug a better solver (Name, SolveAsync(DispatchProblem)); the last registered wins. |
IDispatchEquipmentService | Equipment from somewhere other than Fleet. |
IVisitNoticeSender | Another customer notice channel (Channel, CanSend, SendAsync). |
IDispatchSettingsProvider | Settings from somewhere other than site settings. |
IFieldFileStore, IFieldStockSource, IFieldAssetSource | Technician app photo storage, stock locations and equipment. |
DisplayDriver<WorkOrderPanels> | A panel on the work order page (Dispatch adds WorkOrderVisits at Content:5). |
DisplayDriver<ServiceVisit> | A panel on the visit page dispatch/visits/{id}, built with IDisplayManager<ServiceVisit> and the Detail display type. A visit has no editor form. |
public sealed class VisitEquipmentPanelDisplayDriver : DisplayDriver<ServiceVisit>
{
public override IDisplayResult Display(ServiceVisit visit, BuildDisplayContext context)
=> Initialize<VisitEquipmentPanelViewModel>("VisitEquipmentPanel", model =>
{
model.Number = visit.Number;
model.EquipmentAssetIds = visit.EquipmentAssetIds;
}).Location("Content:5");
}
public class VisitEquipmentPanelViewModel
{
public string Number { get; set; }
public IList<string> EquipmentAssetIds { get; set; } = [];
}
// Startup: services.AddDisplayDriver<ServiceVisit, VisitEquipmentPanelDisplayDriver>();
public sealed class LogVisitNoticeSender : IVisitNoticeSender
{
private readonly ILogger _logger;
public LogVisitNoticeSender(ILogger<LogVisitNoticeSender> logger)
{
_logger = logger;
}
public string Channel => "Log";
public bool CanSend(VisitNoticeMessage message) => !string.IsNullOrEmpty(message.Email);
public Task<string> SendAsync(VisitNoticeMessage message, CancellationToken cancellationToken = default)
{
_logger.LogInformation("{Kind} notice for visit {Number}: {Text}", message.Kind, message.Visit.Number, message.Text);
// Return null when sent, or the reason it failed.
return Task.FromResult<string>(null);
}
}
// Startup: services.AddScoped<IVisitNoticeSender, LogVisitNoticeSender>();
| Symptom | Check |
|---|---|
| Board shows no technicians | Give staff members a capability listed in Settings > Dispatch (Technician by default), make them active, and clear the board's capability filter. |
| Every technician is ruled out | Publish a schedule for the team; check skills, certifications, territory (StrictTerritory) and time off. |
| Field page refuses the user | The user must be linked to a staff member (UserId) and hold Use the My Work portal. |
| Assign refused with "This job needs 2 people." | The type's CrewSize; pass enough WorkerIds. |
| Assign refused "No ... is free then." | Fleet has no free active schedulable asset of the required type. |
| Two dispatchers, one wins | Expected: the lock per worker re-checks; the loser is told who is in the way. |
| Board does not update live | Enable OrchardCore.SignalR. |
| No customer texts | NoticesEnabled, OrchardCore.Sms or OrchardCore.Email, and a contact phone or email on the work order. |
Field page answers moved or canceled | The server wins: the visit was reassigned or canceled; it leaves the device with the next pack. |
| Recipe records lose links on rerun | Use 26-character lowercase Orchard Core ids for every ItemId. |
The CrestApps.OrchardCore.Dispatch meter counts crestapps.dispatch.visit.events (tags event, status) and crestapps.dispatch.observer.failures (tags observer, event); the at-risk, reminder and location retention tasks report through the shared background task metrics. See orchardcore-opentelemetry.
Related skills: orchardcore-work-orders, orchardcore-staff, orchardcore-geo, orchardcore-assets, orchardcore-or-tools, orchardcore-workforce, orchardcore-teams, orchardcore-skills, orchardcore-scheduling, orchardcore-calendars, orchardcore-inventory, orchardcore-report-builder, orchardcore-ai-tools.
What SKILL.md sets; muted values are Claude Code's defaults
/crestapps-orchardcore:orchardcore-dispatchfrom 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./orchardcore-addressesSkill for the CrestApps Orchard Core Addresses module (CrestApps.OrchardCore.Addresses, Addresses.Countries, Addresses.GooglePlaces). Covers the immutable Address value shared by customers, checkout, orders, shipping and taxation, per-country address formats from Google address data with AddAddressesCore, IAddressFormatProvider and AddressFormat, IAddressValidator and AddressProblem, IAddressFormatter, the AddressEditor shape with IAddressEditorService and AddressEditorOptions, CreateAddressEditorAsync and CreateAddressDisplayAsync, ICountryService and managed Country content items, address suggestions through IAddressAutocompleteProvider, ContactInfo, NamedAddress and IShippingAddressBook, the Google Places provider with its protected API key, the address-autocomplete rate-limit group, and the ManageAddressSuggestions permission. Use it when requests mention Orchard Core addresses, international address formats, address validation, a country list, address autocomplete or Google Places./orchardcore-advanced-seoSkill for the CrestApps Orchard Core Advanced SEO module (CrestApps.OrchardCore.Seo), which publishes schema.org structured data as one JSON-LD graph per page and for NLWeb answers. Covers the Schema.org part (SchemaOrgPart, SchemaOrgPartSettings with SchemaType and property mappings from Content, Fixed, Editor or Liquid sources), the StructuredDataSettings site settings and their deployment step, the ManageAdvancedSeoSettings permission, Orchard Core SEO, Search, Products and Reviews integration, the getSchemaOrgOptions, configureContentTypeSchemaOrg and configureSiteStructuredData AI tools, describing pages in code with IPageStructuredData, the structured-data tag helper and the structured_data Liquid filter, and extending with IStructuredDataProvider, ContentPartStructuredDataProvider and SelfDescribingParts. Use this skill when requests mention schema.org, JSON-LD, structured data, rich results, Google required properties, product or article markup, or Advanced SEO in Orchard Core./orchardcore-agentic-commerceSkill for the CrestApps Orchard Core Agentic Commerce module (CrestApps.OrchardCore.AgenticCommerce), which lets AI agents such as Gemini and ChatGPT buy from the store with the Universal Commerce Protocol (UCP), the Agentic Commerce Protocol (ACP) and the AP2 mandates extension (preview). Covers every feature (UCP, account linking, catalog and cart, MCP and A2A bindings, ACP, Agent Product Feeds, AP2), the /.well-known/ucp and /.well-known/acp.json discovery documents, checkout session endpoints, agent platforms and their sign-in, AgenticCommerceSettings, store signing keys in Secrets, idempotency, payment handlers (Stripe shared payment tokens, Google Pay, test credentials), delegated 3-D Secure, embedded checkout, signed order updates, the AgentPlatforms recipe step, and extending with IAgentPaymentHandler, IUcpProfileContributor, IUcpCheckoutExtension and IAgentOrderPublisher. Use it when requests mention agentic commerce, selling through AI agents, UCP, ACP, AP2, agent checkout or agent product feeds./orchardcore-agreementsSkill for the CrestApps Orchard Core Agreements module (CrestApps.OrchardCore.Agreements), support and maintenance contracts with accounts. Covers the Agreement record with its SA- number, status, period and covered hours (a block or a monthly allowance with rounding), Content > Agreements, the account Service tab, the ManageAgreements and ViewAgreements permissions, the Agreements recipe and deployment step, module terms in Properties with IAgreementTermsValidator, IAgreementUsageProvider and IAgreementBalanceService, the hourly lifecycle task with IAgreementObserver, account manager notifications, and the Agreement Usage and Burn-down reports. Use this skill when requests mention service agreements, support contracts, prepaid or retainer hours, entitlements or agreement expiry. Strong matches include Agreement, AgreementHours, AgreementStatus, AgreementBalance, AgreementUsage, IAgreementManager, IAgreementObserver and TicketAgreementTerms.Other plugins' skills for the same job