How does Field Service inventory management track spare parts consumption across mobile work orders?
Answer
Basics: Technicians need the right part on the van. Inventory management tells you what each van and warehouse holds, what a job needs, what was used, and what must be replenished.
How it works:
- Create Locations (type Warehouse, Van, Site) with Inventory Location enabled; associate a van Location with the technician's Service Resource.
- Create ProductItem records (Product2 at a Location) with QuantityOnHand.
- On the Work Order, add ProductRequired for expected parts.
- The technician records ProductConsumed (with the ProductItem and QuantityConsumed), which reduces on-hand quantity.
- Use ProductRequest and ProductRequestLineItem to request parts, ProductTransfer to move stock between locations, and ReturnOrder for returns; each change writes ProductItemTransaction records.
Advanced / deep dive: ProductItem transactions give the audit history for reconciliation. Serialized products use serial numbers (SerializedProduct) for traceability and warranty. Replenishment is typically a process: scheduled Flow or Apex compares QuantityOnHand with a reorder threshold and creates ProductRequests. Field Service is not a full inventory/ERP system, so integrate with ERP for purchasing and costing. Mobile: technicians can create ProductConsumed offline, so conflicts occur if stock was adjusted centrally; design reconciliation. Performance: in large orgs, index ProductItem queries by LocationId and Product2Id.
Code / config example:
// Record parts consumed for a work order (bulk-safe)
List<ProductConsumed> used = new List<ProductConsumed>();
for (ProductItem pi : [SELECT Id FROM ProductItem WHERE Id IN :itemIds]) {
used.add( (WorkOrderId = woId, ProductItemId = pi.Id, QuantityConsumed = ));
}
insert used;