Sales Quotes
Create commercial price proposals, evaluate customer credit limits and profit margins, and convert quotes to confirmed orders.
Routes:
/sales-quotes Sales Quotes
The Sales Quotes module manages the commercial quotation process. Sales representatives can prepare price proposals, evaluate gross profit margins, check customer credit limits, and seamlessly convert winning proposals into confirmed sales orders.
Quote Lifecycle & Architecture
In HeroBM, quotes and sales orders share a unified underlying entity (sales_orders table). A quote is simply an order residing in the Draft or Quoted lifecycle state:
stateDiagram-v2
[*] --> Draft : Create Quote
Draft --> Quoted : Send Quote to Customer
Draft --> Cancelled : Reject / Cancel
Quoted --> Confirmed : Accept / Convert to Order (Stock Reserved)
Quoted --> Cancelled : Customer Declined
1. Unified Entity Pipeline
- Creating a quote generates a standard order record in
DraftorQuotedstate. - Converting a quote executes the
confirmaction, advancing the status toConfirmed. No duplicate records or messy data migrations occur.
2. Live Margin & Credit Verification
- Real-Time Margin Tracking: As products and discounts are entered, each line calculates real-time gross margin based on the product’s active Moving Weighted Average Cost (WAC).
- Credit Limit Verification: The system evaluates total customer exposure (Open Invoices + Unbilled Confirmed Orders + This Quote) against their pre-configured credit limit.
3. CRM Opportunity Linkage
- Quotes can be initiated directly from a CRM Opportunity via
/sales-quotes/new?opportunityId=<id>. - The quote total automatically rolls up into the opportunity’s Live Deal Revenue, providing real-time visibility into pipeline performance.
Step-by-Step Workflows
1. Creating and Emailing a Quote
- Go to Sales → Quotes (
/sales-quotes). - Click New Quote (opens the order workbench at
/sales-orders/new). - Select the Customer. Price scale, currency, and tax positions load automatically.
- (Optional) Select or link an active CRM Opportunity.
- Set the Expiry Date (
valid_until). - Add items, enter negotiated prices or line discounts.
- Click Save as Quote (sets status to
Quoted). - Click Email to send the branded Typst PDF quotation directly to the customer.
2. Converting a Quote to a Confirmed Order
- Open the winning quote.
- Click Convert to Order (or Confirm Order).
- The order advances to
Confirmed, reserving available stock and queuing lines for warehouse picking.
Field Reference
| Field | Description |
|---|---|
| Customer | Account receiving the quotation. |
| Quote Number | Unique identifier (ORD-...). |
| Opportunity | CRM sales deal associated with the quotation. |
| Expiry Date | Commercial validity cut-off date. |
| Gross Margin % | Calculated profitability metric ((Price - WAC) / Price). |
| Status | Stage (Draft, Quoted, Confirmed, Cancelled). |
Field Reference & Data Dictionary
Key database fields, input parameters, and definitions associated with this workflow screen:
| Field / Parameter | Display Name | Description & Rules |
|---|---|---|
| customer_id | Customer Account | Debtor account. Automatically populates currency, credit limits, price scale, and default tax position. |
| valid_until | Quote Expiry Date | Date through which quoted pricing, promotional discounts, and terms are commercially guaranteed. |
| margin_percent | Real-Time Gross Margin | Calculated profit margin ((Price - Cost) / Price) updated dynamically per line. |
| opportunity_id | Sales Opportunity | Associated CRM sales deal tracking commercial revenue rollups. |
| state_code | Quote Status | State within the order pipeline (Draft or Quoted). |