# 3.2 RFQ Management Requirements

## Core Goals
- Provide standardized RFQ templates to accelerate consistent request creation.
- Distribute RFQs automatically to pre-qualified vendors based on category or performance.
- Schedule reminders for vendors who have not responded before the deadline.
- Track the RFQ lifecycle from issuance through closure with real-time status updates.

## Functional Expectations
- Template management should support reusable content blocks and configurable terms.
- Distribution logic must reference vendor qualification data and send notices via email or portal alerts.
- Reminder jobs should be configurable per tenant (frequency, cadence, channel).
- Lifecycle tracking should expose timestamps for sent, acknowledged, responded, and closed states.

## Implementation Notes
- Store RFQ metadata and template references in dedicated tables to keep history auditable.
- Use workflow or job schedulers to trigger reminders and update status transitions.
- Integrate with reporting to surface RFQ volumes, response rates, and turnaround times.
- RFQ templates live in the new `rfq_templates`, `rfq_template_sections`, and `rfq_template_attachments` tables. The dedicated **RFQ Templates** module (ModalBuilder JSON seeded via `sql/defaults.sql`) exposes:
  - An overview tab to manage template metadata with quick filters.
  - A sections tab for defining ordered content blocks (scope, evaluation, commercial terms) using markdown/HTML and visibility flags per delivery channel.
  - A preview tab that renders sections in sort order so administrators can review the final narrative.
  - An attachments tab for boilerplate documents (NDA, compliance pack) with conditional inclusion rules.
- Form Builder assets `RFQ Template`, `RFQ Template Section`, and `RFQ Template Attachment` allow tenants to extend layouts without code. Administrators can also clone the ModalBuilder JSON to craft alternative views or wizards while pointing at the same tables.
- When issuing an RFQ, controllers should merge selected template sections by `sort_order`, render markdown to HTML for emails, and honour `include_in_print` / `include_in_email` flags alongside attachment inclusion rules.
