Docs
  • Solver
  • Models
    • Field Service Routing
    • Employee Shift Scheduling
    • Pick-up and Delivery Routing
  • Platform
Try models
  • Field Service Routing
  • User guide
  • Input datasets
  • Model input

Field Service Routing

    • Introduction
    • Getting started: Hello world
    • User guide
      • Terms
      • Use case guide
      • Planning AI concepts
      • Integration
      • Constraints
      • Understanding the API
      • Demo datasets
      • Input datasets
        • Model configuration
        • Model input
        • Planning window
        • Time zones and daylight-saving time (DST)
      • Routing with Timefold’s maps service
      • Input validation
      • Model response
      • Key performance indicators (KPIs)
      • Metrics and optimization goals
    • Vehicle resource constraints
      • Shift hours and overtime
      • Lunch breaks and personal appointments
      • Fairness
      • Route optimization
      • Technician costs
      • Technician ratings
    • Visit service constraints
      • Time windows and opening hours
      • Skills
      • Visit dependencies
      • Multi-vehicle visits
      • Movable visits and multi-day schedules
      • Priority visits and optional visits
      • Visit service level agreement (SLA)
      • Visit requirements, area affinity, and tags
        • Visit requirements
        • Technician coverage area
        • Tags
    • Recommendations
      • Visit time window recommendations
      • Visit group time window recommendations
    • Real-time planning
      • Real-time planning: extended visit
      • Real-time planning: reassignment
      • Real-time planning: emergency visit
      • Real-time planning: no show
      • Real-time planning: technician ill
      • Real-time planning: pinning visits
    • Real-time planning (preview)
      • Real-time planning: extended visit (preview)
      • Real-time planning: reassignment (preview)
      • Real-time planning: emergency visit (preview)
      • Real-time planning: no show (Preview)
      • Real-time planning: technician ill (Preview)
      • Real-time planning: pinning visits (preview)
    • Scenarios
      • Long-running visits
      • Configuring labor law compliance
    • Changelog
    • Upgrade to the latest version
    • Feature requests

Model input

The modelInput is where you add your data about available technicians and the visits to be scheduled and optimized.

The JSON shows an example modelInput. Note, most of the values are missing.

{
  "modelInput": {
    "locationSetName": "Belgium",
    "vehicles": [
      {
        "id": "Van"
      }
    ],
    "visits": [
      {
        "id": "Visit A"
      }
    ],
    "visitGroups": [
      {
        "id": "Group 1"
      }
    ],
    "skills": [
      "Plumber"
    ],
    "tags": [
      {
        "name": "First-aid cert"
      }
    ],
    "planningWindow": {
      "startDate": "2027-02-01T00:00:00-04:00",
      "endDate": "2027-02-08T00:00:00-04:00"
    },
    "freezeTime": "2022-02-02T12:15:50-04:00",
    "pinNextVisitDuringFreeze": "ALWAYS"
  }
}
  • locationSet references a pre-calculated location/distance matrix that speeds up processing. If specified, all locations in the model must be a subset of the referenced pre-calculated location set. If unspecified, a new time/distance matrix will be calculated for the request. See locations sets for more details.

  • vehicles contains information about the technicians and the shifts they work. See Vehicle resource constraints for more details.

  • visits contains information about the visits that require a service. See Visit service constraints for more details.

  • visitGroups contains information about visits that must be grouped together. See Multi-vehicle visits for more details.

  • skills allows technicians with the correct skills to be matched with visits that require those skills. See Skills for more details.

  • tags convey additional information about visits and technicians, for instance, whether or not a technician has clearance for a particular job. See Tags for more details.

  • planningWindow is the period of time the schedule is being planned for. See Planning window for more details.

  • freezeTime is the time at which to freeze all visits in the schedule during real-time planning. See Real-time planning: pinning visits for more details.

  • pinNextVisitDuringFreeze controls which visit are pinned during real-time planning when freezeTime is set. See Real-time planning: pinning visits for more details.

Next

  • See the full API spec or try the online API.

  • Learn more about field service routing from our YouTube playlist.

  • Learn about the Model input.

  • Learn about configuration parameters and profiles.

  • © 2026 Timefold BV
  • Timefold.ai
  • Documentation
  • Changelog
  • Send feedback
  • Privacy
  • Legal
    • Light mode
    • Dark mode
    • System default