Skip to content
syntaqx

Field Operations, chapter 01 of 36

The Field Operations Business

How field businesses earn, from routes to repair, installs, contracts and delivery: route density, seasons, branches, franchises and the core data model.

23 min readUpdated

A field operations business sells work done at someone else's property. A person drives a vehicle to a house, a restaurant, a warehouse or a curb, does something there, and leaves with proof it was done. An HVAC technician replacing a capacitor in July, a plumber clearing a drain at 9 PM, a lawn crew on its fourth fertilizer round, a pool tech balancing chlorine every Tuesday, a cleaning team in an office after hours, a pest technician on a quarterly visit and a driver dropping a sofa in a two-hour window look nothing alike to their customers. They share one operating problem: labor and drive time are the cost, the work can only happen where the customer is, and the customer usually wants it inside a window they chose. Every system in this volume exists to sell that work, put the right person at the right property at the right time, prove what happened, and collect for it, while driving as little as possible in between.

The software is hard because scheduling, routing, recurring billing, offline mobile and regulated recordkeeping all interact: a cancelled visit changes a route, an arrival window, a customer text and whether an invoice goes out. This chapter is the map the rest of the volume uses: how the business makes money, why route density decides whether it makes any, seasons and branches, a customer's life, and the data model every later chapter extends. Terms are collected in the Glossary.

How to Read This Volume#

The chapters follow the work, in seven parts plus a reference:

The volume covers what field operations adds. The general engineering lives in the playbook, and chapters here link to it rather than repeat it: Multi-Tenancy (and its tenant hierarchies), Events & Async Messaging, Background Jobs, Time & Date Formats, Effective Dating & History, Addresses & Geocoding, Matching, Merging & Many Sources, Rules as Data, Audit Trails, Offline-First Sync, Notifications & Consent, Calls, Texts & Email, Electronic Signatures & Records, Subscriptions & Recurring Billing, Sales Tax & VAT, AI Agents in the Product, Webhooks, Support Access & Internal Tools and Data Pipelines & Analytics. Taking card and bank payments is its own volume, Payments.

The volume is US-centric: regulations are US federal and state law unless a passage says otherwise, and the vendors surveyed are the ones that sell into US field businesses. The data model travels; the legal specifics (cooling-off periods, pesticide records, licensing, calling rules) need local counsel elsewhere.

The System You're Building#

Read end to end, the volume describes the components of a field operations platform. Each has a chapter:

Component What it does Where
Org tree and core model Branches, accounts, properties, work orders, visits This chapter, Customers, Accounts & Properties
Agreements What was sold, on which terms Service Agreements & Plans
Repair and project work Flat-rate tickets, parts, device alerts, third-party payers, installs, change orders, SLAs, subs Repair, Install & Commercial Work
Delivery Items, instructions, attempts, loads and depots Last-Mile Delivery & Distribution
Recurrence engine Agreements into promised occurrences Recurring Schedules
Capacity and booking Who works where, what fits, which windows to offer Territories & Capacity, Booking Appointments
Optimizer and dispatch Routes, the objective they serve, then the live day Route Optimization, Weighing the Routing Objective, Dispatch & the Day of Service
Technician app Offline work, evidence, vans The Technician App, Proof of Service, Fleet, Inventory & Safety
Time and pay Classified hours, earnings by week, labor rules Technicians: Time, Pay & Labor Rules
Compliance records Controlled materials, credentials and coverage, consumer rules, history Regulated Materials, Licenses & Permits, Consumer Protection, Audit Trails & Records
Marketing Lead sources, campaigns, call tracking, attribution Marketing & Lead Sources
Sales Canvassing, prices, one-time work and upsells, signatures, commissions Door-to-Door Sales, Pricing & Sales Rules, One-Time Services & Upsells, Signing the Agreement, Sales Teams & Commissions
Customer surfaces Calls, messages and the portal The Contact Center, Customer Communications, Customer Self-Service
Money Invoices, autopay, failed payments, saves Billing Recurring Service, Collections & Retention
Platform Tenancy, integrations, AI agents, metrics, migration Platform Architecture, AI in Field Operations, Operating Metrics, Switching Platforms

Five Ways to Sell Work at a Property#

Most field businesses run one dominant model and dabble in a second. The model decides what the scheduler optimizes and what the records hold.

Model Priced as Schedule shape Typical trades
Recurring route-based Per visit, monthly or prepaid Generated from a plan, routed days or weeks ahead Pool, lawn, cleaning, pest
On-demand repair Flat rate or time and materials Booked into today's capacity; emergencies jump the queue HVAC, plumbing, electrical, appliance
Installs and projects Quoted, often financed, paid in milestones Multi-visit, multi-crew, gated by permits and materials HVAC replacement, roofing, solar
Commercial contracts Contract value on a schedule, plus extras Planned maintenance plus reactive calls with response times Fire and life safety, janitorial, facilities
Delivery and pickup Per stop or bundled in the price Same-day or next-day batches, re-planned through the day Retail, grocery, furniture, parts

Dynamics 365 Field Service names the same split (reactive, preventive, predictive and project-based service), and delivery platforms start from a smaller unit: Onfleet's task is one destination and one recipient, grouped into route plans.

Recurring route-based service is the economic engine of property care: a customer signs once and pays for years, so a sale is worth the lifetime of the agreement. Pool is the purest case, where Skimmer's route assignments are each technician's permanent weekly stops; Launch27 creates a cleaning booking for each customer every week or few weeks, discounted by frequency. In pest control, recurring service is 85.2% of U.S. residential revenue (Specialty Consultants, reported by PCT).

On-demand repair sells capacity instead of routes: how many arrival windows a business can promise today without breaking them, which ServiceTitan computes from technician shifts and the jobs already booked. The ticket is priced from a flat-rate pricebook (tasks with a set price, built from labor, parts and markup) rather than the clock; Successware calls the price book "what everything in the platform connects to." Maintenance memberships layer recurring revenue on top, filling slow seasons with tune-ups.

Installs and projects are small construction jobs: options, financing, a contract, a permit, then milestones (Enerflo for solar, JobNimbus for roofing). Money arrives in deposits and progress payments.

Commercial contracts add response times, many sites under one bill-to, and reports a customer's own auditors read. Salesforce links work orders to entitlements for SLAs; ServiceTrade's contracts carry separate recurrences for the work and the invoicing; Swept compares scheduled to actual janitorial hours to find underbid sites. Repair, Install & Commercial Work covers these three models.

Delivery stops take minutes, so a route holds dozens, and the business lives on same-day re-planning, proof of delivery and live ETAs: patterns field service keeps borrowing. Last-Mile Delivery & Distribution covers the model.

How Big It Is#

The Bureau of Labor Statistics counts the workers, which is the best common proxy for how many vans are on the road. Its Occupational Outlook Handbook pages report 2025 employment and May 2025 median pay:

Occupation Jobs (2025) Median pay (May 2025) Note from BLS
Janitors and building cleaners About 2,432,600 $36,840 Many work evenings, after offices empty
Delivery truck drivers and driver/sales workers About 1,511,400 $43,950 Early starts, late finishes, weekend and holiday work common
Grounds maintenance workers About 1,299,200 $40,080 Busiest in spring, summer and fall; some jobs seasonal
Plumbers, pipefitters and steamfitters About 510,600 $63,800 Often on call for emergencies; most states license plumbers
HVAC mechanics and installers About 440,900 $61,010 Overtime and irregular hours in peak heating and cooling seasons
Pest control workers About 108,700 $45,250 88% work for pest control services firms; most states require a license

Revenue figures are uneven by trade. Pest control's survey counts more than 17,000 firms, about two-thirds of them single-location, and that shape holds across trades: most buyers have one office and no IT staff, while the large operators are consolidators running many branches and brands.

Route Density and Unit Economics#

A technician's day is fixed: shift hours minus breaks. That time splits into three buckets, and only one of them earns money:

  • Service time, at the property doing the work.
  • Drive time, between properties and to and from the start location.
  • Dead time, waiting for a window to open, restocking at the supply house, paperwork, a gate nobody opened.

Route density is how little drive time sits between consecutive stops, and it's the lever operators talk about most: a FieldRoutes post cites a PCT survey in which 55% of participants ranked it first among ten productivity factors.

The arithmetic makes the reason obvious. An illustrative pool route, not an industry benchmark:

shift              8.0 h   (480 min)
service per stop   25 min
drive per stop     sparse route: 20 min   dense route: 8 min

stops per day      sparse: 480 / 45 = 10.7   dense: 480 / 33 = 14.5
revenue per stop   $60
revenue per day    sparse: $640              dense: $870
labor + vehicle    same either way

Labor and the vehicle cost the same whether the technician drives or works, so every minute moved from driving to servicing drops almost straight to margin. That one fact drives a surprising amount of the business:

  • Sales targets streets, not people. Lawn, pest and pool companies canvass where routes already run, because a new customer on an existing street adds a stop with almost no drive time (Door-to-Door Sales).
  • Pricing varies by geography, by zone or by declining addresses outside the service area.
  • Scheduling trades flexibility for density. A cleaning customer who insists on Tuesday at 9 AM can break a tight route, so preferred days are exceptions rather than defaults (Recurring Schedules).
  • Capacity isn't only hours. FieldRoutes tracks product capacity per route (gallons of spray against a tank). A truck full of time can still be empty of chemical, or of the part the next HVAC call needs.

Repair businesses measure revenue per technician per day and kept arrival windows instead, and delivery measures cost per stop (Operating Metrics). Density belongs to the whole book of business: a dispatcher can't make a sparse territory dense by optimizing harder (Territories & Capacity).

Seasons#

Almost every field business has a season, and the season shapes the software more than any feature request:

  • HVAC peaks in the first heat wave and the first cold snap. BLS notes overtime and irregular schedules in peak seasons, and maintenance memberships exist partly to schedule tune-ups into the shoulder months. Plumbing is steadier, but freezes bring burst-pipe surges.
  • Lawn and landscape compress a year's work into spring, summer and fall, with some crews switching to snow removal. Programs run as numbered rounds, and the off-season is spent selling prepayment and renewals.
  • Pool opens in spring and closes in fall in most of the country, and runs year-round in the Sun Belt, so one company can have two different calendars by branch.
  • Pest control follows insect activity: FieldRoutes subscriptions carry a seasonal start and end date, and GorillaDesk's recurring jobs can skip selected months.

For the platform, seasons mean uneven load and forecasts to staff it (Oracle Field Service forecasts workload from history); billing that doesn't match service, since a monthly payment smoothing a six-month lawn program creates prepaid balances (Billing Recurring Service); and seasonal staff set up in hours.

Branches, Regions and the Org Chart#

A one-truck business has one of everything. A business with a few hundred trucks organizes like this:

LEVEL WHAT LIVES HERE WHO WORKS IT COMPANY OR BRAND REGION BRANCH TERRITORY OR ROUTE TECHNICIAN, VAN brands, price lists, policy owner, finance P&L rollup, state rules regional manager licenses, stock, office, P&L branch manager, CSRs zip codes, route days dispatcher skills, license, stock technician THE BRANCH IS THE UNIT THAT MAKES OR LOSES MONEY A hierarchy of five levels, each indented under the last: company or brand, region, branch, territory or route, and technician with a van. Beside each level is what lives there, from brands and price lists at the top, through the branch's licenses, stock, office and profit and loss, down to a technician's skills, license and van stock, and who works at that level, from the owner to the technician.
The branch is where licenses, inventory, the office staff and the profit and loss meet, so most operational configuration lives there and rolls up.
  • The branch (office, location, service center) is the operating unit. It holds a state's business license and often the licensed supervisor the state requires (a master plumber, a certified pesticide applicator), a stock room, an office phone number, territories and its own profit and loss. ServiceTitan ties technicians, job types and zones to business units.
  • Territories carve a branch into areas a technician or crew owns on given days: Salesforce's service territories, or the teams and hubs of delivery platforms like Onfleet.
  • Regions and brands sit above. Consolidators keep acquired brands alive for local recognition, so one platform supports several brands with their own names, phone numbers, price lists and templates while one finance team reports across all of them.

Configuration resolves down this tree and reporting rolls up it, the pattern Multi-Tenancy describes in general: a price list set at the brand and overridden for one branch's market has to resolve to one answer in the technician's app, and a regional P&L has to sum exactly to its branches.

Multi-location roll-up is where that summing gets tested. The suites sell it as a tier: PestPac's enterprise plan lists "Multi-Branch" and managing "employees across branches & locations"; Housecall Pro's franchise product gives the franchisor "full network observability" and lets it "update and sync their price book from the office and deploy across the network"; ServiceTitan's franchise software lets franchisors "track sales, revenue, KPIs, and other critical numbers as they occur." My rule for the roll-up: every reported number carries the org unit and business date it was recorded under, and a branch that moves regions keeps its history where it was, or last year's regional totals change when the org chart does (Assign the Business Date Once).

Franchising looks like the same tree and isn't. A franchisee is a separate business with its own license, payroll and customers, working under the franchisor's brand, prices and software. Three things change:

  • Who owns the data is a contract term. The FTC's Franchise Rule makes the franchisor disclose, in Item 11 of the disclosure document, whether franchisees must use its computer systems and "Whether the franchisor will have independent access to the information that will be generated or stored" in them, with "any contractual limitations." Some agreements name the franchisor an owner of customer data; a federal court read one hotel franchise agreement that way in 2025. The platform has to enforce whatever the agreement says: a franchisor role that reads across franchisees, franchisee data that leaves with a franchisee who exits (or doesn't), and an audit trail of franchisor access. In a multi-tenant design that usually means each franchisee is its own tenant under the franchisor's tenant hierarchy, not a branch inside the franchisor's (Tenant Hierarchies).
  • Royalties are computed from the platform's revenue. Item 6 lists the fees in a table, and they're usually percentages of gross sales: a summary of Mr. Rooter's 2026 disclosure document reports a royalty of "6% of Gross Sales" plus a 2% marketing fee, and Lawn Doctor's is reported as "10% of net revenues/week" plus a technology fee. Each agreement defines gross or net sales its own way (refunds, sales tax, financing fees, roll-in sales at a special rate), so the royalty report is a versioned metric per franchise agreement, computed from invoiced and collected amounts in the ledger, with the period closed and stamped like a commission run (Operating Metrics).
  • Leads route by territory. A national number or website books for whichever franchisee owns the territory around the address, so the franchise territory map is data the booking flow reads, and the lead's source records that it came from the franchisor's channel (Marketing & Lead Sources, The Contact Center). An address no franchisee owns is a decision for the franchisor, not a booking for the nearest one.

Franchisor control over technicians' schedules and pay is also a joint-employer question. The NLRB's 2023 joint-employer rule was vacated by a federal court in March 2024 and the board withdrew its appeal, so the 2020 standard applies as of this writing; it's one more reason the franchisor's access to franchisee staff records is a configured, logged permission rather than a default.

The Life of a Customer#

LEAD SOURCE, CONSENT SOLD TERMS, CARD, REP INITIAL VISIT BASELINE VISIT RECURRING VISITS, BILLS RENEWAL PRICE, TERM RENEWED CANCELLED TERMINATED COOLING-OFF CANCEL, NON-PAY LAPSED WIN-BACK CAMPAIGN, A NEW LEAD WITH HISTORY THE PATH A CUSTOMER SHOULD TAKE EXIT OR WIN-BACK ENDED A customer's path from left to right: lead, sold, initial visit, recurring and renewal, with a renewed loop from renewal back to recurring. A dashed exit from sold goes to cancelled during the cooling-off period, and dashed exits from recurring and a lapsed renewal go to terminated, from which a win-back campaign returns to lead.
Each stage records something the next one depends on, and each exit is a moment the law, the commission plan or the retention team cares about.

The diagram draws the recurring path; a repair customer runs the same stages faster (lead, sold on a flat-rate ticket, one visit, then a membership offer or nothing).

Lead. Leads arrive from the door, the phone, the web and marketplaces: Google's Local Services Ads charge per valid lead, and Jobber creates a client and a request for each Thumbtack direct lead. Jobber's definition is a good one: a client stays a lead until they approve a quote, have a scheduled job, or are sent an invoice. Record the source on day one; marketing spend, lead credits and the win-back campaign all depend on it (Marketing & Lead Sources covers sources, credits and attribution).

Sold. The sale produces the agreement or approved estimate: service, frequency, price, term, renewal terms, payment method and the rep who sold it. A sale at the buyer's home can carry a federal right to cancel until midnight of the third business day, and state law adds more (Consumer Protection, Signing the Agreement).

Initial visit. The first service is longer, priced differently and sets the baseline: a pool's startup chemistry, a deep clean before recurring maid service, a pest inspection, the HVAC equipment recorded with model and serial numbers. It also sets expectations: a sloppy first visit tells the customer what the rest of the agreement will be like.

Recurring. Visits generate, get routed, happen, and bill. Most of a customer's lifetime and most of the platform's load is here: reminders, on-my-way texts, service reports, autopay, failed cards, reschedules.

Renewal. The agreement renews automatically, renews at a new price, or becomes a sales event (Aspire, built for landscape contracts, treats renewal as a re-quote). Automatic renewal is regulated in many states, so the agreed terms and every renewal notice need to be on file (Subscriptions & Recurring Billing).

Terminated and won back. Customers leave for price, service quality, a move or nonpayment. Ending an active agreement is a termination with a churn type (voluntary, involuntary or administrative) and a reason; cancelled is kept for an agreement that ends before it ever became active, as in the cooling-off window (Service Agreements & Plans has the states; Operating Metrics defines churn). A former customer who comes back isn't a new lead: they have history, possibly a balance, and a property the business already knows (Collections & Retention).

Who Uses Which Tool#

Role What they do What they need from the platform
Customer service rep Answers calls and texts, books, takes payments (increasingly beside an AI agent) Account and property on one screen, live availability (The Contact Center)
Dispatcher Builds tomorrow's routes, fixes today's Unassigned work, constraints, a map, optimization with locks
Technician or driver Does the work, records it, collects payment Today's route offline, property history, forms, parts and product logging
Sales rep or comfort advisor Closes at the door or at an in-home estimate Territories, good-better-best options, financing, e-signature
Branch manager Runs a branch's P&L, staff and quality Production, retention, AR, callbacks, compliance by technician
Billing and compliance Autopay, collections, regulated records, licenses Ledger by account, records in each regulator's format, expiry dates
Owner or finance Prices, buys, sells, reports to lenders Revenue by brand and branch, churn, deferred revenue

Every role needs the same account, property and agreement, cut for its job and scoped by the hierarchy above.

The Core Data Model#

Every platform in this market converges on the same handful of concepts under different names (Platform Architecture maps the vendors' names). This volume uses one set, and every later chapter extends it rather than redefining it:

Entity Table What it is
account accounts The party that pays (prose may say customer)
person people A customer-side human (a contact), linked to accounts and properties with a contact role
staff member staff_members An employee or contractor who logs in or does the work
property properties The place served: a house, a pool, an office floor, a dock door
asset assets Serviced equipment: a furnace, a backflow preventer, a pool pump
plan, plan version plans, plan_versions The product sold, versioned so an agreement keeps its terms
agreement agreements The contract for a plan version at a property (vendors say membership, maintenance plan)
recurrence recurrences The agreement's schedule rule: an iCalendar RRULE plus a window
occurrence occurrences One promised instance generated from a recurrence
service type service_types The catalog of what work orders perform: a quarterly pest service, a drain clearing, a furnace install
work order work_orders The work to be done, from an occurrence, a request, a sale or a callback
estimate estimates A priced quote, with options, linked to the work order it would fill
visit visits A scheduled time and assignment that performs a work order
resource resources What the scheduler books, of kind technician, crew, contractor or equipment; a technician resource references a staff member
route routes One resource's ordered visits for a day
WHO AND WHERE person account property asset ROLE 1..n 1..n WHAT WAS SOLD plan plan_version agreement recurrence RRULE plus window THE WORK occurrence work_order visit route GENERATES 1..n resource ONE DAY ALSO FROM A REQUEST OR A SALE VISIT STATES held, scheduled, dispatched, en_route, on_site, completed exits: not_completed, cancelled Data model: a person holds a contact role on an account, an account has properties, a property has assets; a plan has versions, and an agreement binds a plan version to a property with a recurrence; the recurrence generates occurrences, an occurrence becomes a work order, a work order has one or more visits, and visits are ordered into a resource's route for a day. The visit states run held, scheduled, dispatched, en route, on site, completed, with exits not completed and cancelled.
The canonical model used across this volume. The work order says what to do, bill and prove; the visit says when, in what window, by whom.

The split that matters most is work order versus visit. The work order is the unit of what was promised, priced and proven; the visit is the unit of time and assignment. Salesforce states it plainly ("work orders describe the work to be performed, service appointments represent the visits your team makes"), and Dynamics 365 gives work orders and bookings independent life cycles. Keep them separate even if most of your jobs take one visit, because the second visit (a part that wasn't on the truck, a retreatment, a callback, the second day of an install) is where single-table designs break.

Three more distinctions recur in every chapter. People are customers; staff are staff. people holds contacts on the customer side, and staff_members holds the employees and contractors who log in or do work, so a worker is always a staff_member_id, never a person_id. Resources are what gets scheduled: a technician resource points at its staff member, a crew is made of resources (Territories & Capacity), and vehicles are a separate vehicles table (Fleet, Inventory & Safety). Estimates are their own record. My default is an estimates row linked to the work order it would fill, holding the options and snapshotted lines (Pricing & Sales Rules); approving an option copies its lines onto the work order as priced lines. The alternative, estimated lines on the work order itself, is simpler until a customer sees three options and declines two.

The spine, in the playbook's naming conventions. Every table carries tenant_id. Columns each chapter owns (prices, recurrence rules, addresses, signatures) are added there:

CREATE TABLE org_units (                 -- brand, region, branch
  id         UUID PRIMARY KEY DEFAULT uuidv7(),
  tenant_id  UUID NOT NULL,
  parent_id  UUID REFERENCES org_units (id),
  kind       TEXT NOT NULL CHECK (kind IN ('brand', 'region', 'branch')),
  name       TEXT NOT NULL,
  time_zone  TEXT NOT NULL,              -- IANA name; sets the branch's business date
  created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE TABLE staff_members (             -- employees and contractors
  id         UUID PRIMARY KEY DEFAULT uuidv7(),
  tenant_id  UUID NOT NULL,
  branch_id  UUID NOT NULL REFERENCES org_units (id),
  name       TEXT NOT NULL,
  created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE TABLE resources (                 -- what the scheduler books
  id              UUID PRIMARY KEY DEFAULT uuidv7(),
  tenant_id       UUID NOT NULL,
  branch_id       UUID NOT NULL REFERENCES org_units (id),
  kind            TEXT NOT NULL CHECK (kind IN ('technician', 'crew', 'contractor',
                    'equipment')),
  staff_member_id UUID REFERENCES staff_members (id),  -- technician: required; contractor: optional
  name            TEXT NOT NULL,
  CHECK (kind <> 'technician' OR staff_member_id IS NOT NULL),
  CHECK (kind NOT IN ('crew', 'equipment') OR staff_member_id IS NULL)
);

CREATE TABLE accounts (                  -- who pays
  id         UUID PRIMARY KEY DEFAULT uuidv7(),
  tenant_id  UUID NOT NULL,
  branch_id  UUID NOT NULL REFERENCES org_units (id),
  kind       TEXT NOT NULL CHECK (kind IN ('residential', 'commercial')),
  name       TEXT NOT NULL,
  created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE TABLE people (                    -- customer-side contacts; roles link them
  id         UUID PRIMARY KEY DEFAULT uuidv7(),
  tenant_id  UUID NOT NULL,
  name       TEXT NOT NULL,
  created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE TABLE plans (                     -- the product: "Quarterly Pest", "Gold HVAC"
  id         UUID PRIMARY KEY DEFAULT uuidv7(),
  tenant_id  UUID NOT NULL,
  name       TEXT NOT NULL
);

CREATE TABLE plan_versions (             -- immutable once an agreement cites it
  id           UUID PRIMARY KEY DEFAULT uuidv7(),
  tenant_id    UUID NOT NULL,
  plan_id      UUID NOT NULL REFERENCES plans (id),
  version      INT NOT NULL,
  valid_during TSTZRANGE NOT NULL,       -- when it can be sold
  UNIQUE (plan_id, version)
);

CREATE TABLE service_types (             -- what a work order performs
  id         UUID PRIMARY KEY DEFAULT uuidv7(),
  tenant_id  UUID NOT NULL,
  name       TEXT NOT NULL
);

CREATE TABLE properties (
  id         UUID PRIMARY KEY DEFAULT uuidv7(),
  tenant_id  UUID NOT NULL,
  branch_id  UUID NOT NULL REFERENCES org_units (id),
  location   GEOGRAPHY(POINT),
  time_zone  TEXT NOT NULL,              -- IANA name, from the place
  created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE TABLE agreements (
  id              UUID PRIMARY KEY DEFAULT uuidv7(),
  tenant_id       UUID NOT NULL,
  account_id      UUID NOT NULL REFERENCES accounts (id),
  property_id     UUID NOT NULL REFERENCES properties (id),
  plan_version_id UUID NOT NULL REFERENCES plan_versions (id),
  status          TEXT NOT NULL CHECK (status IN ('draft', 'out_for_signature',
                    'signed', 'active', 'paused', 'on_hold', 'terminated',
                    'fulfilled', 'void', 'cancelled')),  -- fulfilled: one_time only
  status_reason   TEXT,                  -- required for cancelled, terminated, on_hold
  created_at      TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE TABLE work_orders (
  id                        UUID PRIMARY KEY DEFAULT uuidv7(),
  tenant_id                 UUID NOT NULL,
  property_id               UUID NOT NULL REFERENCES properties (id),
  agreement_id              UUID REFERENCES agreements (id),  -- null for one-off work
  service_type_id           UUID NOT NULL REFERENCES service_types (id),
  source                    TEXT NOT NULL CHECK (source IN ('occurrence', 'request',
                              'sale', 'callback')),
  callback_of_work_order_id UUID REFERENCES work_orders (id),  -- set for a callback
  status                    TEXT NOT NULL CHECK (status IN ('open', 'completed',
                              'cancelled')),
  hold_reason               TEXT CHECK (hold_reason IN ('part_needed', 'approval_needed',
                              'permit_needed')),               -- open but waiting
  created_at                TIMESTAMPTZ NOT NULL DEFAULT NOW(),
  CHECK ((source = 'callback') = (callback_of_work_order_id IS NOT NULL))
);

CREATE TABLE estimates (                 -- options and snapshotted lines; Pricing owns them
  id            UUID PRIMARY KEY DEFAULT uuidv7(),
  tenant_id     UUID NOT NULL,
  work_order_id UUID NOT NULL REFERENCES work_orders (id),
  status        TEXT NOT NULL CHECK (status IN ('draft', 'sent', 'approved',
                  'declined', 'expired')),
  created_at    TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE TABLE routes (                    -- one resource's day
  id            UUID PRIMARY KEY DEFAULT uuidv7(),
  tenant_id     UUID NOT NULL,
  resource_id   UUID NOT NULL REFERENCES resources (id),
  business_date DATE NOT NULL,           -- in the branch's zone
  UNIQUE (resource_id, business_date)
);

CREATE TABLE visits (
  id                     UUID PRIMARY KEY DEFAULT uuidv7(),
  tenant_id              UUID NOT NULL,
  work_order_id          UUID NOT NULL REFERENCES work_orders (id),
  resource_id            UUID REFERENCES resources (id),  -- null until assigned
  route_id               UUID REFERENCES routes (id),
  window_starts_at_local TIMESTAMP,      -- the promise, in the property's zone
  window_ends_at_local   TIMESTAMP,
  time_zone              TEXT NOT NULL,  -- the property's IANA zone
  status                 TEXT NOT NULL CHECK (status IN ('held', 'scheduled', 'dispatched',
                           'en_route', 'on_site', 'completed', 'not_completed', 'cancelled')),
  status_reason          TEXT CHECK (status_reason IN ('no_access', 'not_home',
                           'customer_declined', 'part_needed', 'weather',
                           'unsafe_condition', 'technician_unavailable', 'customer_asked',
                           'expired', 'address_not_found', 'id_check_failed',
                           'item_damaged')),  -- required for not_completed and cancelled
  hold_expires_at        TIMESTAMPTZ,    -- only while held
  arrived_at             TIMESTAMPTZ,    -- UTC instants of what happened
  completed_at           TIMESTAMPTZ,
  is_locked              BOOLEAN NOT NULL DEFAULT FALSE,  -- pinned; optimizers leave it
  created_at             TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

The visit states are this volume's vocabulary, not one vendor's. The platforms name the same life cycle differently, and the mapping is what an integration or a migration has to write down (Switching Platforms); agreement states get the same treatment in Service Agreements & Plans:

This volume Dynamics 365 booking Salesforce service appointment ServiceTitan appointment
held No default status None (not yet scheduled) No documented status
scheduled Scheduled Scheduled Scheduled
dispatched Scheduled, with the technician notified Dispatched (traveling to the site) Dispatched
en_route Traveling Dispatched Dispatched
on_site In Progress In Progress Working
completed Completed Completed Done
not_completed A custom status such as Partially Completed Cannot Complete Hold on the appointment or the job
cancelled Canceled Canceled Canceled (only with the whole job)

Two differences matter when mapping. ServiceTitan's Hold sits on the appointment and the job, where this volume puts the visit's end state and the work order's hold_reason on separate records; Dynamics 365 lets a custom booking status complete the booking while returning the work order to Unscheduled for follow-up, which is the same split as a completed visit on an open work order.

Visit end states share one reason catalog, visits.status_reason, and which state applies depends on what happened on site:

  • Work was performed (a repair, a diagnosis, part of an install): the visit is completed. If the work order isn't finished, it stays open with a hold_reason (part_needed, approval_needed, permit_needed) until it can be booked again.
  • Nothing could be done on site: the visit is not_completed with no_access, not_home, customer_declined, part_needed, weather or unsafe_condition.
  • Called off before the technician left: the visit is cancelled with weather, technician_unavailable or customer_asked. A booking hold that lapses is cancelled with expired.

The twelve reason values (with address_not_found, id_check_failed and item_damaged for delivery) are my starting catalog, not any vendor's list. Platforms let each company configure its own reasons, so the fixed catalog is what tenant labels map onto (Proof of Service).

Two reasons appear on both sides on purpose. part_needed is a completed visit with the work order on hold when the technician diagnosed and did what they could, and a not_completed visit when nothing useful happened before the missing part stopped the job; weather is a not_completed visit when the crew arrived and rain stopped the application, and a cancelled one when the office called the day off before anyone drove. The question is always whether billable or reportable work happened on site, because that decides whether the visit counts toward first-time fix, production and the technician's pay.

There is no separate outcome column; later chapters use these values and add only their own detail: proof requirements in Proof of Service, make-ups for missed recurring work in Recurring Schedules, same-day exceptions in Dispatch & the Day of Service. A callback is a new work order with source = 'callback' and callback_of_work_order_id pointing at the work it redoes, and first-time fix is computed per work order from that link (Operating Metrics). A part that wasn't on the truck is a hold, not a callback. Occurrences have their own states (upcoming, open, booked, completed, skipped, missed), defined in Recurring Schedules.

Design decisions behind it:

  • Separate the payer from the place. ServiceTitan's customer is the bill-to and its location the service site; Jobber's clients have zero, one or many properties. Collapse them and the first landlord with twelve rentals, or the restaurant group with forty kitchens, breaks the model. Who pays for a property changes over time, so that link is an effective-dated row in Customers, Accounts & Properties.
  • One-off work needs no agreement. A no-heat call, a water heater install and a furniture delivery are work orders with a null agreement_id. Repair, Install & Commercial Work adds the assets, parts and warranty claims around repair and installs; Last-Mile Delivery & Distribution adds items, delivery instructions and attempts for delivery. The work order is the unit dispatch, proof, billing and commissions all read.
  • Visit windows are local promises. "Tuesday 8 to noon" means 8 at the property, so the window is local time plus the property's IANA zone (Time & Date Formats), and chapters that need instants (booking's overlap check, the metrics warehouse) derive them from these columns rather than storing a second promise; things that already happened (arrived_at, completed_at) are UTC instants.
  • Effective-date what changes and gets disputed: territory membership, a plan's price, a property's payer, a technician's license, each with a valid_during range (Effective Dating & History).
  • Scope every row by tenant_id, and by branch_id wherever a rule can differ by branch, enforced in the database (Multi-Tenancy).
  • Emit life-cycle events. agreement.signed, agreement.activated, visit.completed, agreement.cancelled and agreement.terminated (with a reason) are what commissions, billing and reporting subscribe to (Events & Async Messaging). Each module polling the others' tables instead risks paying commissions on sales cancelled in the cooling-off window.

What goes wrong most often is building for one model and bolting on the next: a route system can't quote an install, and a repair system can't generate a year of visits. My rule: decide the shape of all five models early, even if you build one.

Chapters change tables that already hold rows, so their ALTERs are written to run on a live database: checks, required columns and foreign keys on existing columns are added NOT VALID, which checks new rows without scanning the old ones, and indexes and unique keys are built CONCURRENTLY. Once any backfill is done, each NOT VALID constraint is validated under a lock that doesn't block reads or writes (Zero-Downtime Migrations). For the check One-Time Services & Upsells adds to agreements:

ALTER TABLE agreements VALIDATE CONSTRAINT agreements_kind_check;

Auditing#

The business decisions in this chapter are the ones disputed later:

  • The sale. Who sold it, where, when, which plan version and price list, what the customer signed, and when the cancellation notice was delivered: the evidence in a cooling-off dispute, a chargeback and a commission claim.
  • Changes to commercial terms. Price, frequency, term, renewal setting and payment method, with before and after values. ServiceTitan's customer and location audit trail and FieldRoutes' Change Log Report both record user, field, timestamp and old and new values.
  • Organizational moves. A property moved between territories, an account moved to another branch, a technician reassigned. These change commissions, routes and which license covered the work, so record the path an entry had when it was written.

The mechanics (typed actors, append-only history, snapshots) are in Audit Trails; the field records regulators and courts ask for, and how long to keep them, are in Audit Trails & Records.

What This Means for the System You Build#

  • Support all five business models in the core, with recurring work on agreements and one-off work as work orders without one, so a tenant can run routes, repair, memberships, installs and contracts side by side.
  • Separate the work order from the visit, one to many, with the visit states named once and used everywhere.
  • Model the org tree explicitly, brand to region to branch, with configuration resolved down it and reporting summed up it.
  • Treat franchisees as their own tenants under the franchisor, with franchisor access, data ownership and royalty definitions taken from each franchise agreement.
  • Separate the account that pays from the property that's served, with many properties per account and the payer link effective-dated.
  • Store visit windows as local time plus the property's zone, and everything that already happened as UTC instants.
  • Treat route density as a first-class number: stops per route, drive time per stop and service time per stop, by territory and over time.
  • Plan for seasons: uneven load, prepaid and deferred balances, seasonal start and end dates on agreements, and fast onboarding for seasonal staff.
  • Record the source of every lead and the seller of every agreement, because marketing, commissions and retention all depend on them.
  • Emit life-cycle events and let billing, commissions and reporting consume them instead of polling.

References#

Specifications

Reference

In practice