Sequence Engine Patterns
Apply when adding automated follow-up sequences.
Design using SequenceEngine (lib/services/ops/SequenceEngine.js) patterns:
- •What triggers it? (srf.created, job.completed, booking_failed, etc.)
- •What stops it? (which receipt statuses cancel the sequence?)
- •How many steps? What channel for each? (sms, voice, email)
- •What delay between steps? (minutes, hours, days)
- •What template for each step? (add to SEQUENCE_TEMPLATES in SequenceEngine.js)
- •What pre-send checks? (receipt status, opt-out, rate limit, quiet hours)
- •Where does it start? (function-handlers.js createServiceRequest, vapi-webhook end-of-call, or ops-scheduler cron?)
Existing templates: NEW_LEAD, QUOTE_SENT, SCHEDULED_REMINDER, POST_JOB, LINK_FOLLOWUP. Follow the same { delay, action, template } step format.