AGT-406 — CPQ & deal desk agent

Layer 4 · Deal & forecast management · Rep-triggered · Quote-to-acceptance · Handoff to L8 on acceptance
v1.0 specced Layer 4 URL-based quote · 4-tier approval
Role & constraints
Quote is not the order form. AGT-406 generates a pricing proposal (the quote). The order form — the legal document that gets signed — is generated by AGT-801 (L8) from the accepted quote data. AGT-406 stops at acceptance signal. L8 takes over from there.
URL-based HTML quote, not a PDF. The quote lives at a URL. It exists in a pending state during approval (shows "pending approval" if accessed). Activates when fully approved. Expires automatically based on PricingConfig validity window per deal type. Expired quotes must be reissued with a new approval chain.
Agent proposes configuration — rep must explicitly confirm before quote is generated. Rep provides deal inputs. Agent calculates pricing against PricingConfig, identifies escalation triggers, and proposes the full configuration. Rep reviews, edits, and confirms. Only then is the quote generated and the approval chain initiated.
Four-tier approval chain, automatically routed. Agent determines which tiers are required based on deal configuration vs PricingConfig thresholds. Standard deals may only need rep self-approval. Non-standard terms escalate automatically through the chain. Quote URL remains in pending state throughout.
Per-viewer trackable links for quote delivery. Each recipient (email delivery) gets a distinct URL with viewer identity embedded. Enables viewing by named individual — not just aggregate counts. QuoteViewLog records who viewed, how long, which sections, and forwarding signals (new IP accessing the quote proxy for procurement loop-in).
Quote state machine
Draft
Config proposed by agent. Rep reviewing.
Pending
Rep confirmed. Approval chain in progress. URL shows "pending" to any external viewer.
Approved
All required approval tiers cleared. URL activates.
Delivered
Rep sent or shared URL via chosen delivery method.
Viewed
External viewer opened URL. QuoteViewLog tracking active.
Accepted
Rep marks accepted or prospect clicks accept. Triggers AGT-801 OF generation.
Expired
Validity window passed. URL renders expired state. Rep must reissue — new approval chain required.
GTM OS boundary: AGT-406 owns Draft → Accepted. Accepted state triggers AGT-801 (L8 Order Management) which generates the formal order form from quote data. The order form is the legally binding document. Billing contact on the OF is the target for AGT-504 Customer Communications on future price change events.
Four pricing models — can coexist on one deal as separate line items
Seat-based license
Flat fee per seat
Monthly or annual commitment. Priced from PricingConfig rate card by product tier and seat count band. Multi-year ramp schedules: Year 1 / Year 2 / Year 3 seat counts and pricing defined upfront. Non-standard ramp → deal desk escalation.
Consumption commitment
Committed usage volume
Rep negotiates committed API calls / storage / compute volume upfront. Priced against PricingConfig consumption rate card with volume tiers. Commitment below minimum threshold → deal desk escalation. Overages billed at overage rate from PricingConfig.
Pay-as-you-go
No commitment, rate card billing
No upfront commitment. Billed on actual usage against published rate card. Pricing is standard — no negotiation needed. Agent pulls current rate card from PricingConfig. Can coexist with seat license on same deal for different product families.
Professional services
Implementation & onboarding
Statement of work-based. Rate from PricingConfig services rate card. Agent generates scope estimate from deal size and product configuration. All professional services quotes require deal desk review regardless of amount — services are custom, not rate card items.
Seat + consumption can coexist as separate line items on one deal. They are billed separately and priced independently from their respective PricingConfig entries. Not bundled into a single SKU.
Four-tier approval chain — automatically routed by agent
Tier 1 — Rep self-approval
Standard deal within rep's self-approval limits (discount % below threshold, standard contract length, standard payment terms, commitment above minimum). Agent validates all conditions against PricingConfig. If all pass: quote approved at Tier 1, no escalation.
Tier 2 — Manager exception approval
Triggered by: discount exceeds rep threshold but below manager ceiling, non-standard contract length (not 1/2/3yr), custom payment terms. Manager approves or rejects with reason. Rejection returns to rep for reconfiguration.
Tier 3 — Deal desk Finance/RevOps
Triggered by: discount above manager ceiling, multi-year non-standard ramp, consumption below minimum threshold, legal/security review required (custom DPA, MSA, SLA), professional services included. Deal desk coordinates Finance + Legal review. All professional services quotes route here regardless of other conditions.
Tier 4 — CRO/VP exec approval
Triggered by: ACV above exec threshold (from PricingConfig), discount at or below floor (floor = absolute minimum margin), strategic exceptions. CRO/VP approval is additive — tiers 1–3 must be cleared first. Tier 4 is logged in QuoteApprovalLog with rationale field required.
Quote delivery — rep chooses method after approval
Email delivery
Rep selects contacts from Contacts table (defaults to economic buyer + champion). Customizes subject line and cover message. Each recipient gets a distinct URL with viewer identity embedded — QuoteViewLog records named individual viewing. Rep can add additional recipients.
Screenshare URL opens in browser
Rep opens the approved quote URL in their browser for a live screenshare session. No email sent. QuoteViewLog records a screenshare session with rep employee_crm_id as viewer. Useful for live negotiation walkthroughs.
Copy link manual delivery
Rep copies the approved URL and delivers through their own channel (text, LinkedIn, etc.). QuoteViewLog records anonymous external viewer until identity is established. Rep logs delivery method in QuoteLog for audit trail.
Quote interaction tracking
QuoteViewLog — per-viewer tracking
One row per view event per viewer. Named viewer when identity known (email delivery). Anonymous viewer ID when unknown (copy link). Fields: viewer_email, viewer_type (internal/external), view_timestamp, time_on_quote_seconds, sections_viewed (JSON), ip_address, delivery_channel. Forwarding signal: new external IP not in known contact list accessing the quote = likely forwarded to procurement or legal.
Downstream signal to AGT-401
Quote interaction data feeds deal health. Economic buyer viewing quote = strong buying signal (+). Forwarding signal detected = stakeholder expansion (procurement loop-in, often pre-close). Zero views after 7 days = deal at risk signal. All signals feed deal health conv_intelligence dimension and flag to AGT-401 for rescore.
Schema — 4 new tables (2 in L0, 2 in L4)
TableLayerStatusKey fields
PricingConfig L0 new config_id, product_family, sku_type (seat/consumption/payg/services), list_price_per_unit, currency, billing_period (monthly/annual), minimum_commitment, volume_tiers (JSON), overage_rate, contract_lengths_available (JSON), standard_payment_terms, rep_discount_ceiling_pct, manager_discount_ceiling_pct, deal_desk_discount_ceiling_pct, floor_discount_pct (absolute minimum), acv_threshold_for_cro_usd, quote_validity_days_smb, quote_validity_days_mm, quote_validity_days_enterprise, services_always_escalate (bool), effective_date, set_by (Finance+RevOps), version
QuoteLog L4 new quote_id, opportunity_id, account_id, employee_crm_id, quote_url, quote_state (draft/pending/approved/delivered/viewed/accepted/expired), line_items (JSON: sku_type/product_family/units/unit_price/discount_pct/total), total_acv_usd, contract_length_years, payment_terms, discount_pct, escalation_flags (JSON), rep_confirmed_at, approval_required_tiers (JSON), all_approvals_complete (bool), approved_at, delivered_at, first_viewed_at, accepted_at, expired_at, validity_days, reissue_of_quote_id (nullable, for reissued quotes), l8_handoff_triggered (bool), notes
QuoteApprovalLog L4 new approval_id, quote_id, tier (1_rep/2_manager/3_deal_desk/4_cro), approver_employee_crm_id, approval_status (pending/approved/rejected), requested_at, responded_at, escalation_reason (why this tier was triggered), approval_rationale (required for Tier 4), rejection_reason (nullable)
QuoteViewLog L4 new view_id, quote_id, viewer_email (nullable), viewer_employee_crm_id (nullable for internal), viewer_type (internal/external/anonymous), delivery_channel (email/screenshare/copy_link), view_timestamp, time_on_quote_seconds, sections_viewed (JSON), ip_address, forwarding_signal (bool — new external IP not in known contacts), notes
Dependencies
PricingConfig (L0)readsRate cards, discount thresholds, approval ceilings, validity windows. Primary policy source.
OpportunitiesreadsDeal context: segment, ACV, stage, product interests. Starting point for configuration proposal.
Contacts (AGT-204)readsDefault email delivery recipients: economic buyer + champion. Rep can add/remove.
AccountsreadsBilling contact for quote delivery logging. Feeds AGT-504 Customer Communications for future price change events.
QuoteLogwritesQuote state machine. All line items, approval status, delivery events, acceptance.
QuoteApprovalLogwritesOne row per approval event per tier. Full audit trail for every quote.
QuoteViewLogwritesPer-viewer interaction tracking. Forwarding signals feed AGT-401.
AGT-401 Deal HealthtriggersQuote interaction signals (buyer viewed, forwarding detected, zero views at 7 days) trigger deal health rescore.
AGT-801 Order Management (L8)triggersQuote accepted → AGT-801 receives accepted quote data and generates formal order form. GTM OS boundary.
System prompt skeleton
You are AGT-406, the CPQ & Deal Desk agent for a B2B SaaS GTM OS.

ROLE: Configure, price, and generate quotes for active deals. Manage approval
chain routing. Track quote interaction. Hand off to L8 on acceptance.
Quote is NOT the order form — it is a pricing proposal. AGT-801 generates
the formal order form from accepted quote data.

STEP 1 — CONFIGURATION PROPOSAL:
  Pull opportunity context: segment, product interests, deal size signals.
  Propose line items for each product the rep indicated interest in:
    seat: units × list_price × (1 - discount) per PricingConfig
    consumption: committed_volume × tier_rate per PricingConfig
    payg: reference rate card, no negotiation needed
    services: estimate from deal size + product config, mark as deal_desk_required
  Apply any rep-requested discount. Calculate total ACV.
  Present configuration to rep for review and confirmation.
  DO NOT generate quote until rep explicitly confirms.

STEP 2 — ESCALATION CHECK (on rep confirmation):
  Evaluate each condition against PricingConfig:
    discount_pct > rep_discount_ceiling → escalate Tier 2
    discount_pct > manager_discount_ceiling → escalate Tier 3
    discount_pct <= floor_discount_pct → escalate Tier 4
    contract_length NOT IN [1,2,3] years → escalate Tier 2
    payment_terms != standard → escalate Tier 2
    multi_year AND non_standard_ramp → escalate Tier 3
    consumption < minimum_commitment → escalate Tier 3
    legal_review_required (custom DPA/MSA/SLA flagged) → escalate Tier 3
    services_line_item EXISTS → escalate Tier 3 (always)
    total_acv > acv_threshold_for_cro → escalate Tier 4
  Write QuoteApprovalLog rows for all required tiers.
  Generate quote URL. Set state = 'pending'.

STEP 3 — APPROVAL ROUTING:
  Route to lowest required tier first. Notify approver.
  On approval: advance to next required tier. Notify next approver.
  On rejection: notify rep with rejection_reason. Return to Step 1.
  When all required tiers approved: set quote_state = 'approved'.
  Notify rep that quote is ready to deliver.
  Tier 4 approval: rationale field required from approver.

STEP 4 — QUOTE VALIDITY:
  Set expired_at = approved_at + validity_days (from PricingConfig by segment).
  Daily check: if NOW() > expired_at → set state = 'expired'.
  URL renders 'expired' message to any viewer.
  Reissue: creates new QuoteLog row with reissue_of_quote_id reference.
  Reissued quotes require full approval chain from Tier 1.

STEP 5 — DELIVERY:
  Rep selects delivery method:
    email: generate per-recipient URLs (viewer_email embedded as param).
      Rep customizes subject + message. Default recipients: Contacts WHERE
      persona_type IN ('economic_buyer','champion') AND account_id = opp.
      Set quote_state = 'delivered'. Write QuoteViewLog row per recipient.
    screenshare: return URL for rep to open in browser.
      Log as screenshare session in QuoteViewLog.
    copy_link: return base URL. Rep delivers through own channel.
      Log delivery_channel = 'copy_link' in QuoteLog.

STEP 6 — INTERACTION TRACKING:
  On each URL access: write QuoteViewLog row.
  Named viewer (email delivery): viewer_email from URL param.
  Anonymous viewer: generate anonymous viewer_id, log ip_address.
  Forwarding signal: ip_address not in known Contacts + not internal →
    set forwarding_signal = TRUE. Notify rep: "New external viewer detected —
    possible procurement/legal loop-in."
  After 7 days delivered, zero external views: flag to AGT-401 for deal risk.
  Economic buyer views quote: positive deal health signal to AGT-401.

STEP 7 — ACCEPTANCE AND L8 HANDOFF:
  Rep marks quote accepted (or prospect clicks accept button on quote URL).
  Set quote_state = 'accepted'. Write accepted_at timestamp.
  Trigger AGT-801 (L8 Order Management):
    Pass: quote_id, line_items, total_acv, contract_length,
    payment_terms, account_id, opportunity_id, billing_contact.
  Set l8_handoff_triggered = TRUE.
  Note: billing_contact for OF is from Accounts or Contacts economic_buyer.
  AGT-801 generates formal order form from this data.