Service visits
A scheduled or actual on-site appointment for one service order, with location, window, and assigned crew.
Fields
The API name is what the API, MCP and the CLI use.
| Name | API name | Type | Required | Description |
|---|---|---|---|---|
| ID | id | Record ID | Yes | |
| Order | serviceorderId | Reference | Yes | |
| Window start | dateStart | Date | Yes | Calendar date without time of date. |
| Window end | dateEnd | Date | Yes | Calendar date without time of date. |
| Branch | customerbranchId | Reference | ||
| Employee | employeeId | Reference | ||
| Created by | createdBy | User | ||
| Created at | createdAt | Date and Time | Yes | |
| Updated by | updatedBy | User | ||
| Updated at | updatedAt | Date and Time | Yes | |
| Started by | startedBy | User | ||
| Started at | startedAt | Date and Time | ||
| Ended by | endedBy | User | ||
| Ended at | endedAt | Date and Time | ||
| Blocked by | blockedBy | User | ||
| Blocked at | blockedAt | Date and Time | ||
| Archived by | archivedBy | User | ||
| Archived at | archivedAt | Date and Time |
Relations
Owned records (solid line) are deleted with their owner. Grouped records (dashed line) can exist alone.
| Field | Points to | Kind |
|---|---|---|
Order serviceorderId | Service orders | owned by |
Branch customerbranchId | Customer branches | reference |
Employee employeeId | Employees | reference |
Actions
What you can do with a record. Every action also sends the webhook event servicevisits.<action>. Reads (find, get, count) work on every table.
| Name | API name | Description | Where |
|---|---|---|---|
| Create | create | Add a new visit. | App · WebMCP · API · MCP · CLI |
| Edit | update | Save changes to this visit. | App · API · MCP · CLI |
| Start | start | Start this visit and open the work. | App · API · MCP · CLI |
| End | end | End this action. The work stops. This cannot be undone. | App · API · MCP · CLI |
| Delete | delete | Delete this visit and the data that belongs with it. This cannot be undone. | App · WebMCP · API · MCP · CLI |
States
How a record moves from state to state. Archive and block can happen in any state.