Quotes
A Quote is a commercial proposal sent to a customer. It describes what you are offering, at what price, and for how long the offer is valid. Quotes have a rich lifecycle -- from draft through acceptance, payment, and fulfillment -- and serve as the starting point of the sales pipeline in MIDDAG Account.
Why quotes matter
In B2B sales, customers rarely buy through a shopping cart. They request a proposal, review it internally, negotiate terms, and then approve. Quotes formalize this process: the sales team creates a proposal, the customer reviews it in the portal, and acceptance triggers the entire downstream chain -- order creation, payment processing, entitlement provisioning.
Quote lifecycle
Every quote moves through a defined set of states:
| State | What it means |
|---|---|
| Draft | Created but not yet sent. Admin can edit freely. |
| Sent | Delivered to the customer. A portal link is included in the notification email. |
| Viewed | Customer opened the quote in the portal. Timestamp recorded automatically. |
| Accepted | Customer confirmed acceptance in the portal. Irreversible by the customer. |
| Rejected | Customer explicitly declined. A reason is required (minimum 10 characters). |
| Expired | The validity date passed without customer action. |
| Paid | Payment confirmed via Stripe or Banco Inter. |
| Fulfilled | Entitlement provisioned. Terminal state for successful quotes. |
| Refunded | Payment was reversed after confirmation. Order cancelled, HubSpot synced. |
The quote-to-entitlement pipeline
When a customer accepts and pays a quote, this automated pipeline runs:
- Quote accepted -- customer clicks "Accept" in the portal.
- Order created -- a WooCommerce order is generated automatically from the quote's line items.
- Payment -- the customer pays using the available methods for their entity (Pix, Boleto, or credit card for MIDDAG BR; credit card for MIDDAG GLOBAL).
- Webhook confirms -- the payment gateway notifies the system.
- Entitlement provisioned -- the system creates entitlements based on the products in the order.
- Fulfilled -- the quote reaches its terminal state. The customer sees the new entitlement in the portal.
Line items
Each quote contains one or more line items. Each line item specifies:
- Product or service
- Quantity
- Unit price
- Discount (if any)
- Entitlement class that will be created upon fulfillment
Line items are read-only for the customer. Only the admin or the sales team (via HubSpot) can modify them.
Expiry handling
Quotes have a validity date (valid_until), defaulting to 30 days from the date sent. When the validity date passes:
- The quote transitions to
expiredautomatically. - Accept and reject buttons are disabled in the portal.
- The customer can request a resend via comments.
- The admin can resend an expired quote, which creates a fresh quote with a new validity period.
HubSpot integration
Quotes can originate from HubSpot. When the sales team creates or updates a quote in HubSpot CRM, a webhook notifies MIDDAG Account:
- Quote created in HubSpot -- a local record is created with line items, amounts, and validity mapped from HubSpot fields.
- Quote updated in HubSpot -- local record is updated to match.
- Status sync is bidirectional -- HubSpot sends creation and edits; MIDDAG Account sends back acceptance, rejection, and payment status.
HubSpot is the source of truth for sales data. Quotes originating from HubSpot are not editable in the WordPress admin.
Dual-entity routing
Each quote is routed to the correct legal entity (MIDDAG BR or MIDDAG GLOBAL) following the same routing rules as orders and invoices. The entity determines which Stripe account processes the payment and which payment methods are available.
Comments and negotiation
Customers can add comments to a quote in the portal, similar to a threaded discussion. This supports negotiation without leaving the platform. Comments are visible to both the customer and the sales team, and are synced to HubSpot when the quote originated there.
What admins see
In the WordPress admin, the quote management interface shows:
- Quote number and status
- Organization and contact
- Total amount and currency
- Entity (MIDDAG BR or MIDDAG GLOBAL)
- Validity date
- Source (manual or HubSpot)
Admins can create quotes manually, edit drafts, resend expired or rejected quotes, and monitor the pipeline. Manually created quotes receive no HubSpot link unless the admin associates a deal explicitly.
Related pages
- Orders -- created automatically when a quote is accepted and paid
- Entitlements -- provisioned after quote fulfillment
- Invoices -- financial records generated from quote payments
- Legal Entities -- how quotes are routed to the correct entity