buildPriorityLabPayload. State today is built from inspection.property.state by trimming, taking only the first two characters, then uppercasing—so a stored full name Texas becomes Te.property.state on inspections is a plain string in inspectionSchema (via PropertySchema); other parts of the product do not enforce abbreviation at write time, so full names can land in Mongo from booking, imports, or edits.buildPriorityLabPayload in attik-backend/src/util/functions/priorityLab/buildPriorityLabPayload.ts is where state (and address, city, zipcode) are assembled for CreateUpdateAppointmentPayload before the Priority Lab API call.syncPriorityLabAppointment in attik-backend/src/util/functions/priorityLab/syncPriorityLabAppointment.ts invokes that builder during upserts; inspectionStream.ts and src/routes/inspection.ts (after save) enqueue work through queuePriorityLabJob in attik-backend/src/events/bullmq/priorityLabQueues.ts; manual sync uses POST /priority-lab/inspection/:id/sync in attik-backend/src/routes/priorityLab.ts.priorityLabApi.ts defines the payload shape sent to the vendor—confirm any vendor constraints on state length or format if documentation exists.PriorityLab.tsx (attik-frontend/src/app/tools/inspections/[id]/components/integrations/PriorityLab.tsx) surfaces sync status and manual resync; it does not build the address payload today. Changes are primarily backend unless UX copy should mention how state should be entered until normalization exists.attik-backend/tests/unit/priorityLab.computeAndPayload.test.ts already covers buildPriorityLabPayload with two-letter states; extend with cases that reproduce the customer issue (full state name, mixed case) once behavior is defined.attik-backend/src/util/functions/priorityLab/buildPriorityLabPayload.tsattik-backend/src/util/functions/priorityLab/syncPriorityLabAppointment.tsattik-backend/src/util/functions/priorityLab/priorityLabApi.tsattik-backend/src/events/streamHandlers/inspectionStream.ts (Priority Lab enqueue)attik-backend/src/routes/priorityLab.tsattik-backend/tests/unit/priorityLab.computeAndPayload.test.tsattik-frontend/src/app/tools/inspections/[id]/components/integrations/PriorityLab.tsxPlease authenticate to join the conversation.
Completed
Main App
2 months ago
Linear
Get notified by email when there are changes.
Completed
Main App
2 months ago
Linear
Get notified by email when there are changes.