Lab Notes / Technical field journal

Designing Relationships Around a Service Workflow

Using relational thinking to keep a service job connected from intake through follow-up.

Date
Topic
Database design
Tools / environment
Python, Flask, SQLAlchemy, PostgreSQL
Related project
SmartFix

01

Goal

Model the relationships needed to carry a service job through requests, estimates, scheduling, invoices, and follow-up tasks without losing the context that connects them.

02

What I was working through

A customer request should not turn into disconnected data as it moves through Request → Estimate → Schedule → Invoice → Follow-Up. SmartFix needed persistent relationships so later stages could still refer to the request and decisions that started the work. Scheduling state stays on the request while estimates, invoices, and follow-up tasks keep their own responsibilities.

03

What I learned

Useful data models are shaped by the workflow, not just the fields on a form. Each entity needs a distinct responsibility, but its relationships matter just as much. Keeping shared context connected—and avoiding unnecessary copies of workflow state—makes application behavior easier to reason about and maintain.

04

Result

In SmartFix, request context can continue into estimating, scheduling, invoicing, and follow-up work. The interface can show a connected service history because the underlying records remain related instead of becoming isolated documents.

EvidenceEstimate-to-invoice continuity
SmartFix finalized invoice linked to request 21 and estimate EST-2026-0008
The finalized invoice identifies both its originating request and accepted estimate, making the relationship between workflow stages visible in the interface.

Takeaway

What I carried forward

Relational design is not background plumbing. It determines whether a multi-stage workflow behaves like one coherent system or a collection of disconnected records.