en
Use casesTrades
Developer view · Dispatch & FSM software

Trades

You built the dispatch board an HVAC, plumbing or electrical shop runs on. At 9:07 a no-heat call lands on a full board — four techs, eleven jobs — and only your gas-certified tech can take it.

You may be an ocean away from that cold house — but your code decides whether it gets heat today. Re-planning a board by certification, parts and travel under a promised arrival window is the code you don’t want to own. Your app flags the call priority: "p0"; Crisphive re-plans the day against certs, parts, arrival windows and travel; your app confirms and dispatches.

You’re building
Dispatch and field-service-management (FSM) products for trades shops
On the API for
Dispatchers, techs on the road, and the customer with no heat

Try it in your language

Pick a scenario, switch the server SDK. Every snippet is the actual call the API reference generates — with trades values filled in.

AC tune-up · schedule routine work

POST/job-requestsFull reference
import { Configuration, JobRequestBusinessApi } from "@crisphive/sdk";

const config = new Configuration({ accessToken: "chsk_test_4eC8xQ9mZ2pL7Ka0rT" });
const api = new JobRequestBusinessApi(config);

const res = await api.createJobRequest({
  jobRequestCreateRequest: {
    "customer_id": "a1b2c3d4-0000-4a01-8c01-000000000001",
    "description": "AC tune-up — routine",
    "job_dates": [
      {
        "date": "2026-07-24",
        "periods": [
          {
            "business_view": [],
            "period": "morning"
          }
        ]
      }
    ],
    "job_type_id": "b2c3d4e5-0000-4a02-8c02-000000000002",
    "priority": "p3",
    "skill_ids": [
      "c3d4e5f6-0000-4a03-8c03-000000000003"
    ],
    "sla_deadline": "2026-07-30T17:00:00"
  },
});
const { error_code, message, data } = res.data;

Switch to Go, Ruby, PHP, Java or .NET — the class names, model types and method casing all follow that SDK’s generated conventions. Swap chsk_test_ for chsk_live_ and the same code runs against production.

Three ways this bites

These are the mornings a trades board is judged on — each one burns wrench time on a broken promise, a second truck roll, or a blown window. Every one maps to a field the API already carries.

1
No-heat call hits a full board

The pain ·A dispatcher hand-rebuilds the day for 40 minutes while techs idle in trucks — and a confirmed window breaks anyway.

Crisphive ·Flag it priority: "p0" and the emergency re-plan preview re-plans every affected tech in one call — nothing dispatched until you confirm.

2
Nearest tech, wrong ticket

The pain ·Dispatch sends the closest tech to a furnace job he can’t legally touch — a second truck roll, double the travel for zero extra billable work.

Crisphive ·The job’s skill_ids gate the assignment — only techs whose skills cover the gas ticket are eligible.

3
The parts stop nobody planned

The pain ·A mid-route detour to the wholesaler adds 35 unplanned minutes of windshield time and quietly blows the next two arrival windows.

Crisphive ·Model the wholesaler grab in dependencies with real time, so the plan — and the travel — account for it up front.

Reading the cascade call

The A no-heat call just hit scenario above is the re-plan itself — it previews the moves so nothing is dispatched until you confirm. Its fields map to the story like this:

FieldWhat it is
emergency_job_idThe no-heat call driving the re-plan — the SLA-bound job that has to be honoured.
technician_idThe tech in play for that job — here, the gas-certified one.
start_atWhen the call lands — 09:07 in the story.
modeHow hard the solver may push to fit the response (here, allow overtime).
displacement_modeWhat may happen to the jobs it moves (here, reschedule them rather than drop them).

The urgency flag from the intro — priority: "p0" — is set when you book or update the job on POST /job-requests (the AC tune-up scenario shows a routine p3). The full priority ladder and the allowed values for mode and displacement_mode live in each endpoint’s Full reference.

Hard constraints, not suggestions

A board that ignores these isn’t planning — it’s sending an uncertified tech to a gas appliance. Each one is a first-class field in the API.

The ruleWhat the API enforces
Gas & trade certsA furnace needs a gas ticket; a panel needs an electrical licence. Only techs whose skill_ids cover the job get assigned.
Arrival-window SLAsA confirmed customer window is a hard sla_deadline. The solver protects booked windows before it touches routine work.
Parts & the supply runNo plan promises a job whose part is off the truck. A wholesaler grab is modelled in dependencies with real time.
Travel, mob & demobDrive time, mobilisation and demobilisation are modelled per leg — wrench time is what’s left, and the plan shows it.
Break & hours rulesLegal break windows and shift limits are hard constraints. The compliant day is the only day the API returns.

What you ship

You ship a dispatch board that re-plans itself.

  • No hand-rolled constraint engine — certs, arrival windows, parts and travel are API fields.
  • Deterministic means testable: assert on the exact board in CI, replay the Tuesday that broke.
  • Customer copy comes back with the plan, ready to send verbatim.

What their day feels like

One emergency stops wrecking the whole day.

  • The dispatcher stops rebuilding the board by hand.
  • Confirmed windows are protected; no uncertified tech gets a gas job.
  • The no-heat house has heat by noon — routine jobs slide, not the promise.

Every job has stakeholders

A no-heat call touches far more than the tech who takes it. Every booking is a web of people who feel it when the board drifts — and a tighter operation quietly serves all of them.

In plain sight
The customer

The homeowner gets a window that actually holds and an honest ETA — not a four-hour guess.

The dispatcher

Confirms a re-plan in one click instead of rebuilding the board by hand under pressure.

The owner / MD

More billable wrench time per truck and fewer emergency write-offs — the operation runs leaner.

Often invisible — until they’re not
Auditors & bookkeeping

Deterministic, replayable plans mean every callback and overtime line reconciles — no black-box scheduling to explain away, and drift is easy to point to.

Reputation & reviews

Windows kept and promises honoured surface as five-star reviews, not “they never showed” complaints.

The crew & retention

Techs stop absorbing the chaos of a hand-juggled day — fewer blown lunches and death-march afternoons keep good people on the tools.

What you get back, and what gets pushed

The A no-heat call just hit preview returns the whole plan in data: moves and reassignments (which job shifts, from and to which tech and time), a total_moves count, and warnings such as TECH_NOT_FEASIBLE — so you can show the board the re-plan before you dispatch it.

To hear about changes the moment they happen — a job completed, a booking rescheduled — register a webhook endpoint and Crisphive POSTs each event to your URL with a Crisphive-Signature header. Verify it against your whsec_… secret over the raw body before you trust the payload — Webhooks has the event shape and copy-paste verify snippets.

Cascades, previews, reads and MCP access are never billed — call the solver on every disruption without architecting around your own bill. The core is a deterministic solver: same inputs, same plan, every time. The LLM only sits at the edges, turning a plan into the message your customer reads.

Start building

The snippet above imports @crisphive/sdk — grab the package for your language, drop in a key, and the same call runs. Every response comes back in one { error_code, message, data } envelope.