# RFQ/EOI — Workflows and State

State Machine
- draft → open (Publish)
- open → paused (Pause); paused → open (Resume)
- open → closed (Close)
- open or closed → awarded (Award)
- any terminal → archived (Archive)
- closed → open (Reopen) optional with approval

Key Actions
- Create from template: snapshot sections and attachments into RFQ
- Publish: assign rfq_number, set status open, generate invites, send notifications
- Remind: select pending invites per cadence rules; record reminder events
- Close: block new or revised submissions; keep view-only access
- Award: header-level and line-level awards; allow multiple vendors; write award events
- Addendum: versioned change note; notify all invitees; ask for acknowledgment
- Q and A: vendors post questions; procurement posts answers visible to all invitees

Reminder Scheduling
- Defaults at org level (e.g., 7 days before due, 2 days before due, 3 days after invite if unopened)
- Per-RFQ overrides allowed
- Execution: select rfq_invites where status is invited or opened and due_at minus N days has passed; skip responded or declined; throttle by last_reminder_at

Notifications
- Publish: to invitees (email) and internal stakeholders
- Reminder: to invitees pending
- Addendum: to all invitees; requires acknowledgment in portal
- Award: to awarded vendors and internal stakeholders

Audit Events (rfq_events)
- publish, invite_sent, opened, responded, reminder_sent, closed, reopened, paused, resumed, awarded, addendum, qa_q, qa_a
- payload contains details such as recipients, counts, question ids, award scope

Approvals (optional)
- Pre-publish approval chain configurable at org level (out of scope for initial delivery but reserved)

