ZT-530 · Fix the Installation prescheduling flow
| Status | Done |
| Ticket | ZT-530 |
| Requested by | Michael Lowry (from Installation Scheduling feedback, Nataly Barreiro) |
| Made by | Michael Lowry (Albatross audit data: rule 3828, rule groups 3222 and 3223, controls 1312, 1318 and 1340, 2026-11-02 21:25–21:32 UTC); requested by Michael Lowry |
| Date made | 2026-11-02 |
| Sections affected | 08 · Installation (Installation block, Install Appointment event) |
| Project types | Residential (the Installation block is Residential only) |
Request
Feedback from Installation Scheduling (Nataly Barreiro):
28458 — everything is approved here, can I get this pushed out of preschedule 28731 — everything is approved here as well and is showing up in preschedule 28750 — I can not press scheduled here. It is still sitting in preschedule, everything is approved
Michael asked Claude to diagnose the configuration and propose a fix.
Target flow from Christina (Installation Scheduling):
- Permit and NEM approved: Scheduling Audit/Review → Ready to Schedule Full Install → Install Scheduled.
- Permit and NEM not approved: Prescheduling Audit/Review → Ready to Preschedule → Prescheduled.
The fix below produces both paths. Queue mapping: Scheduling Audit/Review = block Ready for Install Audit; Ready to Schedule Full Install = Install Appointment Ready to Schedule; Prescheduling Audit/Review = block Ready for Prescheduling Audit; Ready to Preschedule = Install Appointment Ready to Preschedule.
Decisions from Michael (2026-11-02):
- If permits are approved after the preschedule audit but before Prescheduled is pressed, the job goes straight to Ready to Schedule Full Install. No second Scheduling Audit/Review is needed.
- NEM pre-approval counts as NEM approved on both paths.
- After Prescheduled, the appointment moving to Ready to Order Materials by itself when permits are approved is correct. Nobody re-books it.
Proposed solution None given.
Review
Checked against production (Phoenix) on 2026-11-02. The flow comes from ZT-401. Installation is block 11 and Install Appointment is event 41.
How the flow is configured today
Create Install into Preschedule (auto) (Permitting) creates the Installation block at Ready for Prescheduling Audit (status 375), which feeds the Prescheduling Audit/Review queue (Scheduling, 1 day).
Ready to Preschedule (auto) (1312) fires when the block is at Ready for Prescheduling Audit and Pre-Install Audit Passed is set. It does two things:
- creates the Install Appointment at the appointment status Ready to Preschedule (376);
- moves the block to the block status Ready to Preschedule (488).
Two statuses share that name.
Prescheduled (1314), on the appointment, only shows while the appointment is at Ready to Preschedule. It does the following:
- moves the block to Pending Install Day;
- moves the appointment to Pending Permit Approval;
- stamps Installation First Scheduled and Install Scheduled;
- sets Prescheduled = true.
Permit Approved (auto) (1315) later moves the appointment to Ready to Order Materials.
Scheduled - Order Materials (227) and Scheduled - No Materials Needed (749) only show while the appointment is not at Ready to Preschedule.
Prescheduling Expired, Ready to Audit for RTBS (auto) (1318) fires when the block is at Ready for Prescheduling Audit, All Permits Approved is set, there is no active Permitting block, and NEM is pre-approved or approved. It does the following:
- stamps Installation Ready to Schedule;
- moves the block to Ready for Install Audit;
- resets Ready to Schedule (auto) and Ready to Preschedule (auto).
Ready to Schedule (auto) (1040) then moves the block to Ready to Schedule.
Prescheduling Expired, RTBS (auto) (1340, on the appointment, added by Michael on 2026-10-19 18:50 UTC) fires when the appointment is at Ready to Preschedule and the block is not at Ready for Prescheduling Audit. It moves the appointment to Ready to Schedule. Its rule is labelled "...EQUAL Ready for Preschedule", but it checks status 375 (Ready for Prescheduling Audit). That rule (3586) is used nowhere else.
What happened to the three reported jobs
Before Nataly stamped the audit: All Permits Approved was set on 28731 (Oct 13), 28750 (Oct 14) and 28458 (Oct 15). NEM Application Approved was set in September.
Oct 16, ~19:36–20:25 UTC: Nataly stamped Pre-Install Audit Passed. In the same save, each appointment was created at Ready to Preschedule.
- The block stayed at Ready for Prescheduling Audit, so it stayed in the Prescheduling Audit/Review queue. That's why 28731 was "showing up in preschedule".
- With the appointment at Ready to Preschedule, Scheduled - Order Materials was hidden. That's why 28750 "can not press scheduled".
Oct 13–19: Prescheduling Expired, Ready to Audit for RTBS (auto) was true the whole time but didn't fire.
Oct 19, 19:12–19:17 UTC:
- A save by Nancy Castaneda (28750) and saves by the Zeo Integrations user (28458, 28731) moved each block to Ready for Install Audit, then Ready to Schedule.
- In the same save, each appointment moved to Ready to Schedule through the new 1340.
Later: 28458 is now Pending Install Day, 28731 is Ready to Schedule (not booked yet), and 28750 is Installation Complete.
Why 1318 didn't fire for three days is not proven. Auto controls are evaluated on every transaction on the project (see "When auto controls run" in
tools/DOC-GUIDE.md). So the permit saves on Oct 13–15 and Nataly's saves on Oct 16 should all have run it, and its condition must have been false at the time. The likely cause is an earlier version of its conditions:- Michael edited the rule Ready for Prescheduling Audit (3386), which 1318 uses, on Oct 20;
- KAJ edited 1318 itself on Oct 22.
Phoenix only shows the current versions, and control history queries for these jobs timed out. The current conditions are correct, so this shouldn't recur.
Problem 1: approved jobs start the preschedule path. Ready to Preschedule (auto) doesn't check permits. When the audit is stamped on a job whose permits and NEM are already approved, both it and Prescheduling Expired, Ready to Audit for RTBS (auto) are true, and the preschedule path wins. Since Oct 22 it also moves the block out of Ready for Prescheduling Audit, so 1318 can't fire afterwards either. Fix: add "not (permits approved, no active Permitting, NEM approved)", the same test 1318 uses, so those jobs take the normal RTBS path.
Problem 2 (live now): new preschedule appointments flip straight to Ready to Schedule. KAJ Jacobs edited Ready to Preschedule (auto), Prescheduling Expired, Ready to Audit for RTBS (auto), Ready to Schedule (auto) and Ready to Audit Before Installation (auto) on 2026-10-22, 19:31–19:32 UTC. These edits are not in the changelog. They predate the 2026-10-26 baseline, so the docs show the result but not the why.
- Since then, Ready to Preschedule (auto) moves the block to Ready to Preschedule (488). The block is then no longer at Ready for Prescheduling Audit, so Prescheduling Expired, RTBS (auto) fires in the same save and moves the new appointment to Ready to Schedule.
- Project 28894 shows this:
- Oct 28, transaction 21416276: block to Ready to Preschedule; the appointment was created at Ready to Preschedule and moved to Ready to Schedule.
- Oct 29: booked with Scheduled - Order Materials, block Pending Install Day, appointment Ready to Order Materials.
- All Permits Approved is still blank on 28894. It skipped Pending Permit Approval, so Permit Approved (auto) and Alert Scheduling for Missed Permit won't act on it.
- Fix: Prescheduling Expired, RTBS (auto) should also stay off while the block is at Ready to Preschedule. No rule for that block status exists yet.
Problem 3: a block at Ready to Preschedule is never moved on. Prescheduling Expired, Ready to Audit for RTBS (auto) only checks Ready for Prescheduling Audit. If permits are approved while the block is at Ready to Preschedule and the appointment hasn't been prescheduled, nothing moves it to RTBS. Fix: check either status.
Statuses and controls
- Changes:
- the conditions on Ready to Preschedule (auto), Prescheduling Expired, Ready to Audit for RTBS (auto) and Prescheduling Expired, RTBS (auto);
- one new global rule (block status Ready to Preschedule);
- two new rule groups: Permits and NEM Approved for Install (global) and Installation at a Prescheduling Status (Installation block).
- Albatross can't nest AND/OR in a control's condition, so the nested parts are rule groups. Reusing Installation Stagegate was considered and rejected. It also checks M0, Cash M1, M0 stipulations, credit expiry, PPCR and TDR, and it doesn't check for an active Permitting block. Using it would make the two controls disagree and bring Problem 1 back. It isn't used by any control today.
- No action changes.
- The conditions on Prescheduled, Scheduled - Order Materials and Scheduled - No Materials Needed stay as they are. They already key off the appointment status, which the fix keeps correct.
- Create Install Event RTBS (auto) (1049) only creates an appointment when the block is at Ready to Schedule and there is no open appointment. When 1318 moves a prescheduling block on, the existing appointment is still open (now Ready to Schedule), so no duplicate is created.
Downstream blocks: none created or read by these controls, apart from the Permitting and NEM fields they already read.
Fields: none change. Pre-Install Audit Passed (OSC 3955), All Permits Approved (OSC 666), NEM Application Approved (OSC 1117) and NEM Pre-Approval (OSC 3063) are read only.
Work queues
- Appointment-level queue Ready to Preschedule (event 41, status 376, SLA 5 days) covers appointments waiting to be prescheduled.
- Block status Ready to Preschedule (488) has no queue. That's fine once the appointment stays at Ready to Preschedule, so there's no queue change.
- After the fix, a block leaves Prescheduling Audit/Review as soon as the audit is stamped, as intended.
Customer and rep messages: none of the three controls sends anything. The usual Install Scheduled texts go out when the appointment is booked, unchanged.
Projects in flight
- 65 blocks at Ready for Prescheduling Audit. None has All Permits Approved, so none moves when the change goes in.
- 0 blocks at Ready to Preschedule.
- 0 appointments at Pending Permit Approval: nothing has been prescheduled successfully since Oct 22.
- 28871 and 28723: block at Ready for Prescheduling Audit, appointment at Ready to Preschedule, set up Oct 15, permits not approved. They're unaffected now and can still be prescheduled. When their permits are approved they go to Ready to Schedule if they haven't been prescheduled.
- 28894 needs an ops check (see above).
Money and integrations: none.
Reporting: the Prescheduled checkbox (OSC 5112) only gets set by Prescheduled. Any report of prescheduled installs undercounts the Oct 22 – fix window. Michael to confirm whether a report uses it.
Project types: Residential only.
Admin checklist
Albatross can't nest AND/OR inside a control's condition, so the nested parts go into rule groups. Each control's condition is then a flat list.
Rules and rule groups
- New global rule. Installation block, System Data, Process Block Object Status EQUAL Ready to Preschedule, Fail if none exist = false.
- Pick the Installation block's Ready to Preschedule, not the Install Appointment status with the same name.
- Make it global so it can be used on both the block and the Install Appointment.
- Albatross should show it as
(Process Block: Installation) System Data: Process Block Object Status EQUAL Ready to Preschedule (Fail if none exist = false).
- New global rule group: Permits and NEM Approved for Install
(Project) Custom Field: Project Milestones-All Permits Approved IS NOT NULL- AND NOT
There is an Active Permitting Block - AND group NEM Approved or Pre-Approval Checked. This group already exists; reuse it.
- New rule group on the Installation block: Installation at a Prescheduling Status
(Process Block: Installation) System Data: Process Block Object Status EQUAL Ready for Prescheduling Audit (Fail if none exist = false)- OR the new rule from step 1
Controls (conditions only; leave every action as it is)
- Installation block, Ready to Preschedule (auto)
(Process Block: Installation) System Data: Process Block Object Status EQUAL Ready for Prescheduling Audit (Fail if none exist = false)- AND
(Process Block: Installation) Custom Field: Installation Milestones-Pre-Install Audit Passed IS NOT NULL - AND NOT group Permits and NEM Approved for Install
- Installation block, Prescheduling Expired, Ready to Audit for RTBS (auto). Replace the whole condition with:
- group Installation at a Prescheduling Status
- AND group Permits and NEM Approved for Install
- Install Appointment, Prescheduling Expired, RTBS (auto)
(Event: Install Appointment) System Data: Project Process Block Event Object Status EQUAL Ready to Preschedule (Fail if none exist = false)- AND NOT
(Process Block: Installation) System Data: Process Block Object Status EQUAL Ready for Preschedule (Fail if none exist = false). This is the existing rule. Keep it: despite its label it checks Ready for Prescheduling Audit, and it's the copy created on the Install Appointment. The block's own Ready for Prescheduling Audit rule can't be used there. - AND NOT the new rule from step 1
Other
- No work queue change.
- Test in staging first, because three auto conditions change:
- Block at Ready for Prescheduling Audit and permits not approved. Stamp Pre-Install Audit Passed. Expect: block at Ready to Preschedule, the appointment stays at Ready to Preschedule, and Prescheduled shows.
- From test 1, approve permits on the Permitting block (NEM approved). Expect: block at Ready for Install Audit, then Ready to Schedule, the appointment at Ready to Schedule, and no second appointment. It should happen on the Permitting save, since any save on the project evaluates auto controls.
- Block at Ready for Prescheduling Audit with permits and NEM already approved. Stamp Pre-Install Audit Passed. Expect: the block goes to Ready to Schedule and the appointment is created at Ready to Schedule, not Ready to Preschedule.
- From test 1, press Prescheduled, then approve permits. Expect: block at Pending Install Day, the appointment at Pending Permit Approval, then Ready to Order Materials.
- Repeat tests 1 and 4 in production on test project 28349.
New SOP
- Installation Scheduling
- Stamp Pre-Install Audit Passed as today.
- If permits and NEM are already approved, the job goes straight to Ready to Schedule. Book it with Scheduled - Order Materials or Scheduled - No Materials Needed.
- If permits aren't approved yet, the appointment stays in the Ready to Preschedule queue. Book it with Prescheduled, at least 6 days after the Expected Permit Approval Date.
- When permits are approved, an appointment that hasn't been prescheduled yet moves to Ready to Schedule by itself.
- Ops lead (one-off): check project 28894. It was booked and materials were ordered without an approved permit.
- No change for other roles.
Rollback
- Ready to Preschedule (auto): remove AND NOT group Permits and NEM Approved for Install.
- Prescheduling Expired, Ready to Audit for RTBS (auto): set the condition back to
…EQUAL Ready for Prescheduling AuditAND…All Permits Approved IS NOT NULLAND NOTThere is an Active Permitting BlockAND group NEM done or preapproved. That group is the existing one with the same two NEM rules as before. - Prescheduling Expired, RTBS (auto): remove AND NOT the new rule, or turn the control off.
- The new rule and the two new groups can stay, unused.
Config check
Checked in production (Phoenix) on 2026-11-02 after Michael's edits (21:25–21:32 UTC). Everything on the checklist matches.
| Step | Result |
|---|---|
| 1. New global rule | Rule 3828 (Process Block: Installation) System Data: Process Block Object Status EQUAL Ready to Preschedule (Fail if none exist = false) points to block status 488, Fail if none exist = false, global. ✓ |
| 2. Permits and NEM approved for Install | Global group 3222: All Permits Approved AND NOT There is an Active Permitting Block AND group nem approved or pre-approval (1888). That group is a duplicate of NEM Approved or Pre-Approval Checked (1732) with the same two rules (NEM Application Approved IS NOT NULL OR NEM Pre-Approval EQUAL true), so the logic is identical. ✓ |
| 3. Installation at a Prescheduling Status | Group 3223 on the Installation block: Ready for Prescheduling Audit OR rule 3828. ✓ |
| 4. Ready to Preschedule (auto) | Ready for Prescheduling Audit AND Pre-Install Audit Passed AND NOT group 3222. Auto, not timed or repeatable. Actions unchanged: create Install Appointment at Ready to Preschedule; block → Ready to Preschedule. ✓ |
| 5. Prescheduling Expired, Ready to Audit for RTBS (auto) | Group 3223 AND group 3222. Actions unchanged: stamp Installation Ready to Schedule; block → Ready for Install Audit; reset Ready to Schedule (auto) and Ready to Preschedule (auto). ✓ |
| 6. Prescheduling Expired, RTBS (auto) | Appointment Ready to Preschedule AND NOT …EQUAL Ready for Preschedule AND NOT rule 3828. Action unchanged: appointment → Ready to Schedule. ✓ |
| 7. Work queues | No change, as planned. ✓ |
Extras found in the same window
- Rule 3824 has the same description as 3828 but was created on the Installation block (not global) at 19:32 UTC. Nothing uses it. It looks like a first attempt. Michael decided to leave it.
- Controls MCP - Finalize, MCP - Finalize (R&R), MCP - Cancel and MCP - Cancel (R&R) were created at the project level 17:10–17:25 UTC by Michael. They're always-on, set the project status to Finalized or Canceled, and are hidden on web and mobile. They're not part of ZT-530. Michael: they let the production write MCP change project status. They're hidden so no one uses them in the UI, and always-on so the MCP doesn't have to write data to enable them. They'll be recorded as their own changelog entry (project-level, no ticket).
Knock-on
- No Installation block or Install Appointment has moved through the changed controls since 21:30 UTC. The only appointment saves (28924, 25884) were ordinary scheduling of appointments already at Ready to Schedule.
- Staging tests (step 8) and the production test on 28349 (step 9): passed, per Michael (2026-11-02).