What is a Work Order in Field Service and how does it organize technician tasks?
Answer
Basics: Think of the Work Order as the job ticket. It links to the Account, Contact, Asset being serviced, Case, and Entitlement. A Work Order Line Item breaks a job into tasks, and a Service Appointment represents each time window a technician visits.
How it works:
- Create a Work Order manually, from a Case action, from a Maintenance Plan, or via Flow/API.
- Choose a Work Type that sets estimated duration and default skills; fields like Priority, Service Territory and Status are set.
- Add Work Order Line Items (tasks) and required skills/products (SkillRequirement, ProductRequired).
- Generate a Service Appointment; scheduling assigns a technician (ServiceResource) through an Assigned Resource.
- Technician completes work and records ProductConsumed, time and a service report; status rolls forward and the Work Order closes.
Advanced / deep dive: Hierarchy: Work Orders can have parent-child structure and Line Items can also be parent-child for complex jobs. Status categories (New, In Progress, Completed, Canceled, and so on) are mapped from custom status values and drive automation and scheduling behavior. Entitlements and milestones can enforce SLAs on work orders. Because scheduling lives on appointments, one Work Order may have multiple visits (for example diagnosis, then repair). Use triggers/flows carefully: bulk work order creation from maintenance plans can reach governor limits if handlers query in loops.
Code / config example:
List<WorkOrderLineItem> items = new List<WorkOrderLineItem>();
for (WorkOrder wo : [SELECT Id FROM WorkOrder WHERE Id IN :woIds]) {
items.add(new (WorkOrderId = wo.Id, Subject = ,
WorkTypeId = inspectionWorkTypeId));
}
insert items;