Job Feature Lifecycle (Start to Finish)
This document describes the end-to-end lifecycle of a Job in Attune Logic β from creation to completion, invoicing, and post-close reporting. The exact steps vary by industry / appType (Trucking vs Service/Repair), but the lifecycle pattern is consistent.
1) Creation (Job is born)β
- Entry points
- Web app (
@attunelogic-service): Jobs are commonly created via the Job Create flow (modal-driven). - Scheduler / Dispatch: Creating a scheduled βeventβ can create a Job (and later updates schedule fields and assignments).
- Web app (
- Initial data
- Client (who the work is for)
- Industry identifiers
- Trucking: load/order identifiers (e.g.,
loadNumber,orderNumber) - Service/Repair: appointment fields (date/time), service type, priority
- Trucking: load/order identifiers (e.g.,
- Initial status (often βNewβ or βPendingβ, depending on config and workflow)
2) Planning & Scope (make the job actionable)β
Service/Repair (scope = job items / services)β
- Add job items to define scope (quote/services/parts/labor-like lines)
- Some workflows require approval (quote approval β work execution)
- Build out operational fields (notes, original call, customer instructions, etc.)
Trucking (scope = legs + routing + charges)β
- Add one or many legs (stops/deliveries) for multi-stop loads
- Legs drive routing/mileage and charge calculations
- Confirm pricing source (global vs client rates; flat vs per-mile where applicable)
See:
docs/developer/features/trucking-loads-and-legs.mdand (web-app deep dive)@attunelogic-service/docs/JOB_LEG_CREATION.md
3) Pricing & Documents (quote / proposal phase)β
- Service/Repair
- Roll up totals (labor, fees, parts, accessories, tax)
- Send proposal / work order documents to customer (where configured)
- Trucking
- Compute charges based on mileage and rate model
- Confirm accessorials and final totals
4) Dispatch, Scheduling, and Assignmentβ
- Assign the Job to resources:
- Service/Repair: technicians
- Trucking: drivers (and sometimes leg-level assignment rules)
- Scheduler updates may adjust:
- start/end time windows, appointment date/time
- assigned resources
- status transitions depending on workflow rules
5) Execution (stage/status progression)β
Jobs progress through configured stages. UI behavior (available actions, validations, modals) is status-dependent and appType-dependent.
Trucking status canonicalization (important)β
Trucking uses canonical snake_case status values for Jobs/Legs and normalizes legacy spellings for backward compatibility.
See: docs/developer/development/trucking-status-canonicalization.md
Typical lifecycle shape (conceptual)β
New/Pending β Booked/Scheduled β Assigned β In Progress / En Route β Completed β Invoiced β Archived
During execution, common updates includeβ
- appointment/ETA adjustments
- assigned resources changes
- field notes and customer updates
- items/legs updates (completion, adjustments, media attachments)
6) Activity layer (tasks, notes, timeline)β
Throughout the lifecycle, Jobs can have attached operational features:
- Tasks
- job-scoped task lists (and optional task templates/groups)
- Notes / Activity
- operational notes, internal communication, history
- Timeline
- status changes and meaningful activity used for UI and traceability
7) Closeout (completion + invoicing)β
- Transition Job to Completed
- Finalize totals and attach required proof (photos, signatures, POD/BOL, etc.)
- Create Invoice (where applicable)
- Job links to Invoice (e.g., an
invoiceIdreference)
- Job links to Invoice (e.g., an
8) Post-close reporting & analyticsβ
Closed jobs feed reporting and operational analytics, such as:
- completion rates and cycle time
- driver/technician utilization
- dispatch performance and schedule adherence
- client history and repeat work patterns
9) Tenant + security context (always on)β
Across the lifecycle, access and behavior are governed by:
- Auth / roles (who can create, edit, dispatch, approve, invoice)
- Customer config and appType (which stages exist, required fields, validations)
- Multi-tenant isolation (all job data scoped to a parent company / tenant)
Related docsβ
docs/developer/development/job-management.mddocs/developer/api/job-items-status-management.mddocs/developer/features/trucking-loads-and-legs.mddocs/developer/features/trucking-dispatch-driver-workflow.md