Skip to content

Getting started

Core concepts

The vocabulary the rest of the documentation uses. Skim this once; refer back when terms come up.

Key points

  • Entities are people and things the engine schedules — participants, providers, vehicles, drivers
  • Events are scheduled activities — visits, appointments, bookings, dock slots
  • Resources are reusable assets allocated to events — rooms, equipment
  • Templates define what entities, events, and constraints exist for your domain
  • Constraints are rules the engine validates before any booking is created

Entities

An entity is anything the scheduler reasons about — a participant in a care program, a physician, a vehicle, a coworking member, a truck driver. Entities have a type, attributes, and relationships to other entities.

Here’s a participant entity as JSON:

entityjson
{
  "entityType": "participant",
  "externalId": "PT-9001",
  "attributes": {
    "name": "Mrs. Johnson",
    "care_plan_id": "CP-114782",
    "mobility_requirements": "wheelchair",
    "daily_hour_limit": 8
  }
}

The entityType tells the engine which template definition to use. The attributes object carries everything the constraints might evaluate against — care plan, mobility needs, hour limits, certifications, anything domain-specific.

Entities can be primary (the central party an event is for — a patient, a member, a shipment), provider (someone delivering service — a physician, a nurse, an instructor), or resource (something allocated rather than scheduled — a room, a vehicle, a desk). Templates define which roles exist for your domain.

Events

Events are scheduled activities — clinic visits, training sessions, dock appointments, hot desk bookings. Every event has a type, a time window, a primary entity, optional participants, and optional resources.

eventjson
{
  "eventType": "clinic_visit",
  "primaryEntityId": "ent_pt_9001",
  "startTime": "2026-05-08T10:00:00Z",
  "endTime": "2026-05-08T10:30:00Z",
  "participants": [
    { "entity_id": "ent_phy_56", "role": "provider" }
  ],
  "resources": [
    { "resource_id": "res_room_3" }
  ]
}

When you create an event, the engine validates the request against every constraint in your template. If any hard constraint fails, the event is not created and the API returns a structured error. If only soft constraints fail, the event is created but warnings come back attached for surfacing in your UI.

Events have lifecycle states — scheduled, confirmed, in_progress, completed, cancelled, no_show. Some event types have domain-specific lifecycles (a treatment order goes through prerequisites_check, for example) defined in the template.

Resources

Resources are entities that get allocated to events but aren’t the focus of them — exam rooms, training rooms, hot desks, transport vehicles, loading docks. The distinction matters because resources have capacity, can be allocated to multiple events over time, and have their own constraints (room type, equipment available, accessibility).

When the engine schedules an event, it allocates resources atomically with the booking. A clinic visit doesn’t book the physician first and the room second — both are allocated in the same decision, or neither is.

Templates

Templates are JSON files that define your domain. They specify which entity types exist, what attributes those entities carry, what event types are valid, what constraints apply, what notifications go out, and which integrations are wired up.

Templates are layered. Four tiers, each inheriting from the one below:

  • Platform — the universal base. Person, resource, location entities. Owned by the FlexiScheduler team.
  • Application — domain templates (Home Care, Medical Practice, etc.). Either ships with FlexiScheduler or is custom-built for your domain.
  • Customer — your organization’s customizations. Operating hours, custom attributes, integration credentials.
  • Instance — per-location or per-team variations. Local holidays, specific operating hours, feature flags.

You author templates as JSON. The Config Studio provides a visual editing surface for non-engineers, but the canonical format is JSON either way.

More on templates

The configuration framework page walks through the four tiers in more detail with real template code at each level.

Constraints

Constraints are the rules the engine validates before creating any event. They’re declared in templates, and every booking flows through the full constraint chain.

constraintjson
{
  "id": "daily_hour_limit",
  "type": "time_based",
  "category": "hard",
  "rule": "SUM(event.duration + travel) <= participant.daily_hour_limit",
  "scope": "per_day",
  "severity": "error",
  "message": "Daily hour limit of {limit} hours exceeded"
}

Constraints have a few key properties:

  • Category — hard (blocks the booking) or soft (attaches a warning).
  • Type — what kind of check it is. time_based, capability_check, capacity_check, availability_check, or extension (custom code).
  • Scope — what scale to evaluate at. per_event, per_day, per_week, etc.

Most templates have 5-15 constraints. The engine runs cheap constraints first and short-circuits on the first hard failure, so cost scales with how thoroughly a request gets validated, not with the total number of declared constraints.

How they fit together

A typical request walks through these concepts in order:

  • A client makes a request — “book this event for this primary entity at this time, with these participants and resources”
  • The engine looks up the relevant template (resolved through the four-tier inheritance chain)
  • Each constraint in the template runs against the request. Hard fails block; soft fails warn.
  • If everything passes, the event is created and resources are atomically allocated.
  • The response carries the created event, any warnings, and any notifications that were queued.

That’s the whole shape. The Quickstart walks through this flow with real API calls.