Skip to main content

Overview

The suggest endpoint helps you find optimal time slots for new jobs within your existing planned routes. This feature enables dynamic scheduling by identifying the best insertion points for unplanned work while minimizing disruption to current plans.
Perfect for appointment booking systems, field service scheduling, and dynamic route optimization scenarios.
Exactly one job may be unassigned. Suggest answers the question “where does this job go?”, so the request must contain exactly one job without initialResource. Every other job needs initialResource (and normally initialArrival) to describe the schedule you are inserting into.Leaving two or more jobs unassigned is rejected. A request with no unassigned job is rejected too — there is nothing to suggest.The one exception is a job relation: you may leave every job named by a single relation unassigned, and the solver suggests a placement for the group as a whole.

How It Works

The suggest endpoint analyzes your current route plan and evaluates all possible insertion points for new jobs. For each potential slot, it calculates:
  • Impact on overall route efficiency
  • Constraint violations (if any)
  • Resource utilization changes
  • Travel time implications
The response provides ranked suggestions with detailed scoring, allowing you to offer customers the most efficient appointment options.

API Implementation

Request Structure

Response Format

Complete Example

Key Concepts

Planned vs Unplanned Jobs

Jobs must be explicitly marked as planned using initialResource. The single job that omits it is the one suggestions are generated for.
  • Planned jobs: have initialResource set, and normally initialArrival as well
  • The unplanned job: omits initialResource — exactly one job per request, or one whole job relation
  • Only that job receives suggestions
initialArrival is a sequencing hint, not a pin. The solver re-times planned jobs as early as the shift allows, so a job you sent with initialArrival: 09:00 can come back at 08:01. If a booking is already promised to a customer, express it as a hard time window on that job rather than relying on initialArrival to hold it.

Suggestion Scoring

Each suggestion includes a comprehensive score breakdown:

Insertion Points

The executedAfter field indicates where the job would be inserted:
  • Job name: Insert after the specified job
  • Resource+Date format: Insert at the beginning of the resource’s route for that date

Best Practices

1

Send the whole day, not just the new job

Every job already booked for that resource and day belongs in jobs with initialResource set (and initialArrival for the right sequence). Suggestions are only as good as the schedule you describe — omit the existing bookings and the solver has nothing to insert around.
2

Leave exactly one job unassigned

The new job is the only one without initialResource. Two unassigned jobs is a rejected request, not two sets of suggestions; run one request per job you want placed.
3

Set appropriate limits

Use maxSuggestions to balance between offering choices and API performance. Start with 5-10 suggestions. There is no upper bound — asking for more than exist returns all of them.
4

Handle infeasible suggestions

When onlyFeasibleSuggestions is false, check the feasible flag and hardScore to identify problematic suggestions.

Common Use Cases

Dynamic Appointment Booking

Offer customers available time slots that minimize disruption:

Emergency Service Integration

Find the best slot for urgent work:

Performance Considerations

The suggest endpoint evaluates multiple insertion points, making it more computationally intensive than standard solve operations. Consider caching results for frequently requested scenarios.
  • Use time windows to constrain the search space
  • Cache suggestions for common scenarios
  • Consider async processing for large-scale suggestions

Solve API

Complete route optimization from scratch

Evaluate API

Score existing route plans

Job Relations

Define dependencies between jobs

Time Windows

Constrain job scheduling times