Service Orders
A Service Order (SO) is a Service Request line that’s been turned into a paid (or no-pay) commitment to a vendor. The test database has 45,504 service orders.
At a glance
- An SO converts a Service Request line into a real commitment to a vendor.
- Lifecycle: CSR picks line → assigns vendor + deadline → SO row inserted → confirmation tracked separately for the homeowner and the vendor → trade does work → bill flows to BC like any construction PO.
- Linked many-to-many to SR lines via
ServiceOrderServiceRequestLine. - Trades see SOs as work orders in the Trade Portal (
work-orders.aspx).
How a SO is created
Section titled “How a SO is created”1CSR picks a Service Request line needing trade work.
2Selects a vendor (
AssignedVendorID) and a deadline (DeadlineDate).3SO row inserted into
ServiceOrder with an SONumber, SOAmount, and SONote.4Linked to one or more SR lines via
ServiceOrderServiceRequestLine.5Confirmation tracked separately for the contact (
ConfirmContact) and the vendor (ConfirmVendor).6Trade does work; CSR enters
CompletedDate.7Bill flows to BC through the same transmission pipeline as construction POs.
Tables
Section titled “Tables”The header is ServiceOrder; the link to SR lines is ServiceOrderServiceRequestLine. Reporting and the CSR dashboard run off the vw* views.
Full Service Order table reference
| Table | What |
|---|---|
ServiceOrder | The header. |
ServiceOrderServiceRequestLine | Many‑to‑one bridge to lines. |
vwServiceOrder | Joined reporting view. |
vwServiceOrderManagement | The CSR dashboard. |
vwServiceOrderRequestLine, vwServiceOrdersNotCompleted | Open work. |
ServiceOrderNotification (utility) | Sends emails / texts. |
The ServiceOrder columns
Section titled “The ServiceOrder columns”The ServiceOrder row carries identity, timeline, money, and confirmation fields. Most queries only touch AssignedVendorID, DeadlineDate, and CompletedDate.
All ServiceOrder columns
| Column | Purpose |
|---|---|
ServiceOrderSysID | PK. |
ServiceRequestSysID | Parent request. |
AssignedVendorID | Trade who will do the work. |
IssuedDate, ScheduledDate, DeadlineDate, CompletedDate | Timeline. |
ScheduledTime | Free-form (e.g. “9–11 AM”). |
SONumber, SOAmount, SOEstimate, SOTaxAmount, Taxable | Money. |
ConfirmContact, ConfirmVendor | Two-sided confirmation. |
SONote | Free-form notes. |
Where in the apps
Section titled “Where in the apps”| App | Where |
|---|---|
| Blazor Warranty | Pages/ServiceOrders/ |
| Trade Portal | work-orders.aspx (vendor sees open SOs as work orders) |
| SMART 2.0 | service/ — primary |
| Blazor Warranty | Service order dispatch in some divisions |
Common queries
Section titled “Common queries”Service orders past deadline and not completed
SELECT so.SONumber, so.AssignedVendorID, v.VendorName, so.DeadlineDate, sr.ProjectID, sr.BuildingID, sr.UnitIDFROM dbo.ServiceOrder soJOIN dbo.ServiceRequest sr ON sr.ServiceRequestSysID = so.ServiceRequestSysIDJOIN dbo.Vendor v ON v.VendorID = so.AssignedVendorIDWHERE so.CompletedDate IS NULL AND so.DeadlineDate < CAST(GETDATE() AS date)ORDER BY so.DeadlineDate;