CPQ Architecture
Salesforce CPQ (Configure, Price, Quote) is one of the most architecturally significant managed packages in the Salesforce ecosystem. It extends the standard sales process with complex product configuration, multi-step pricing logic, and approval workflows. For CTA scenarios, CPQ decisions are high-stakes — they affect data model, performance, governor limits, and long-term platform strategy.
CPQ End-of-Sale (March 2025)
Salesforce has officially ended new sales of the legacy CPQ managed package (SBQQ). Existing customers retain support and can renew licenses, but no new features will be developed. New customers are directed to Revenue Cloud (also referred to as Revenue Lifecycle Management), the core-native replacement. The “Advanced” qualifier previously used (Revenue Cloud / RCA) is no longer consistently applied in 2025-2026 materials. CTAs must understand both architectures — legacy CPQ remains widely deployed, but all greenfield recommendations should evaluate Revenue Cloud first.
CPQ Data Model
The CPQ managed package introduces approximately 30+ custom objects under the SBQQ__ namespace. These objects extend the standard Sales Cloud object model.
erDiagram
Product2 ||--o{ PricebookEntry : "listed in"
PricebookEntry }o--|| Pricebook2 : "belongs to"
Product2 ||--o{ SBQQ__ProductOption__c : "parent bundle"
Product2 ||--o{ SBQQ__ProductOption__c : "optional product"
Product2 ||--o{ SBQQ__ProductRule__c : "governed by"
Opportunity ||--o{ SBQQ__Quote__c : "has quotes"
SBQQ__Quote__c ||--o{ SBQQ__QuoteLineGroup__c : "organized into"
SBQQ__Quote__c ||--o{ SBQQ__QuoteLine__c : "contains"
SBQQ__QuoteLineGroup__c ||--o{ SBQQ__QuoteLine__c : "groups"
SBQQ__QuoteLine__c }o--|| Product2 : "references"
SBQQ__QuoteLine__c }o--o| PricebookEntry : "priced from"
SBQQ__Quote__c ||--o| Order : "generates"
Order ||--o{ OrderItem : "contains"
OrderItem }o--|| Product2 : "references"
SBQQ__Quote__c }o--|| Account : "sold to"
Account ||--o{ SBQQ__Subscription__c : "has"
SBQQ__Subscription__c }o--|| Product2 : "for product"
Order ||--o{ blng__Invoice__c : "billed as"
blng__Invoice__c ||--o{ blng__InvoiceLine__c : "contains"
Core Objects
| Object | API Name | Purpose |
|---|---|---|
| Quote | SBQQ__Quote__c | Container for product selections and pricing; replaces standard Quote |
| Quote Line | SBQQ__QuoteLine__c | Individual line item with product, quantity, and calculated price |
| Quote Line Group | SBQQ__QuoteLineGroup__c | Logical grouping of lines (e.g., “Hardware”, “Services”) |
| Product Option | SBQQ__ProductOption__c | Defines bundle components and their relationships |
| Product Rule | SBQQ__ProductRule__c | Validation, selection, filter, and alert rules for configuration |
| Price Rule | SBQQ__PriceRule__c | Automates field updates and price calculations on quote lines |
| Discount Schedule | SBQQ__DiscountSchedule__c | Volume-based and tiered discount definitions |
| Subscription | SBQQ__Subscription__c | Tracks active subscriptions for renewals and amendments |
| Contract | Contract (standard) | Extended by CPQ for contracted pricing and renewal tracking |
| Order | Order (standard) | Generated from ordered quotes; bridge to Billing |
Namespace Impact
All CPQ custom objects, fields, and Apex classes use the SBQQ__ namespace prefix. This means CPQ triggers, flows, and Apex code share transaction governor limits with your custom code. Cross-namespace SOQL queries count against the calling context’s limits. Plan your automation carefully to avoid hitting combined limits.
The Pricing Waterfall
CPQ calculates prices through a sequential waterfall. Each step cascades into the next — understanding this sequence is essential for debugging pricing issues and designing price rules.
flowchart TD
A["List Unit Price<br/>(from Price Book Entry)"] --> B["Contracted Price<br/>(negotiated price from Contract)"]
B --> C["Special Price<br/>(Contracted or List if no contract)"]
C --> D["Regular Price<br/>(after Discount Schedules)"]
D --> E["Customer Price<br/>(after Partner + Distributor Discount)"]
E --> F["Net Unit Price<br/>(after Additional Discount)"]
F --> G["Net Total<br/>(Net Unit Price x Quantity)"]
style A fill:#264653,stroke:#1d3557,color:#fff
style B fill:#2a9d8f,stroke:#21867a,color:#fff
style C fill:#e9c46a,stroke:#d4a843,color:#000
style D fill:#f4a261,stroke:#d4823e,color:#000
style E fill:#e76f51,stroke:#c45a3f,color:#fff
style F fill:#c1121f,stroke:#a00f1a,color:#fff
style G fill:#780000,stroke:#5c0000,color:#fff
Waterfall Field Reference
| Step | Field | How It Is Set |
|---|---|---|
| List Price | SBQQ__ListPrice__c | From PricebookEntry; starting point for all calculations |
| Contracted Price | SBQQ__ContractedPrice__c | From active Contract when SBQQ__GenerateContractedPrice__c is set on the Quote Line (controls whether contracted prices are created; PreserveBundle__c controls bundle structure on renewals, not contracted pricing) |
| Special Price | SBQQ__SpecialPrice__c | Contracted price if exists, otherwise list price |
| Regular Price | SBQQ__RegularPrice__c | After applying Discount Schedules (volume/tiered) |
| Customer Price | SBQQ__CustomerPrice__c | After Partner Discount and Distributor Discount |
| Net Unit Price | SBQQ__NetPrice__c | After Additional Discount (manual rep discount) |
Waterfall Customization
Three special fields alter the default waterfall order: ApplyPartnerDiscountFirst__c applies channel discounts off list price instead of regular price. ApplyAdditionalDiscountLast__c moves the manual discount to after customer price. ChannelDiscountsOffList__c bases channel discounts on list price. These are Number fields (0/1), not checkboxes. The first two belong on Quote Line; ChannelDiscountsOffList__c belongs on the Quote object.
Quote Calculation Sequence
When a user clicks Calculate in the Quote Line Editor, CPQ runs a defined sequence of operations.
| Stage | What Happens | Extensibility |
|---|---|---|
| 1. Before Calculate | Price Rules with Evaluation Event = “Before Calculate” fire | Price Rules |
| 2. Quantity Calculation | Calculates effective quantities from MDQ segments, percent-of-total | Automatic |
| 3. On Calculate | Price Rules with Evaluation Event = “On Calculate” fire | Price Rules |
| 4. Price Waterfall | List → Contracted → Special → Regular → Customer → Net | Discount Schedules |
| 5. After Calculate | Price Rules with Evaluation Event = “After Calculate” fire | Price Rules |
| 6. On Initialization | QCP onInit method (first calculation only) | QCP (JavaScript) |
| 7. Before/After Price Rules | QCP onBeforePriceRules and onAfterPriceRules methods | QCP (JavaScript) |
| 8. After Calculate (QCP) | QCP onAfterCalculate method — last in sequence | QCP (JavaScript) |
QCP Character Limit
Quote Calculator Plugins (QCPs) are JavaScript custom scripts stored in SBQQ__CustomScript__c. They have a 131,072 character limit (128 KB Long Text Area limit) per script record. For complex pricing, split logic across multiple QCP methods or use helper modules. QCPs execute client-side in the Quote Line Editor, so they cannot make server callouts.
Rules Architecture
CPQ provides three rule types that control product configuration and pricing without code.
Product Rules
| Rule Type | Purpose | Example |
|---|---|---|
| Validation | Block invalid configurations; prevents save | ”Cannot sell Support without a License product” |
| Selection | Auto-add, remove, show, or hide bundle options | ”Selecting Enterprise adds SSO option automatically” |
| Filter | Pre-filter dynamic lookup results | ”Show only products matching the selected region” |
| Alert | Warn but allow override (soft validation) | “This discount exceeds typical margin — confirm?” |
Price Rules
Price Rules inject values into quote line fields during calculation. They consist of Price Conditions (when to fire) and Price Actions (what to update). Unlike Product Rules, Price Rules can target any quote or quote line field — not just pricing fields.
Advanced Approvals (SBAA)
Advanced Approvals is a separate managed package (SBAA__ namespace) that extends CPQ with sophisticated approval workflows.
| Feature | Standard Approvals | Advanced Approvals (SBAA) |
|---|---|---|
| Parallel approvals | No | Yes — multiple approvers simultaneously |
| Approval chains | Limited | Multi-level sequential chains |
| Smart approval | No | Skips re-approval if unchanged fields |
| Dynamic approvers | No | Assigns approvers based on conditions |
| Recall and reassign | Basic | Full recall, delegate, reassign |
| Approval preview | No | Shows required approvers before submission |
CPQ + Billing Integration
The Order object is the bridge between CPQ and Salesforce Billing (blng__ namespace). When a quote is ordered, CPQ generates Order and OrderItem records that Billing picks up for invoicing and revenue recognition.
flowchart LR
subgraph CPQ["Salesforce CPQ (SBQQ)"]
Q[Quote] --> QL[Quote Lines]
QL --> O[Order]
O --> OI[Order Items]
end
subgraph Billing["Salesforce Billing (blng)"]
OI --> INV[Invoice]
INV --> IL[Invoice Lines]
IL --> PAY[Payment]
INV --> REV[Revenue Schedule]
end
subgraph ERP["ERP System"]
REV --> GL[General Ledger]
PAY --> GL
end
style CPQ fill:#e6f5f0,stroke:#2d6a4f
style Billing fill:#fef3e6,stroke:#f4a261
style ERP fill:#fce4e4,stroke:#e76f51
ERP as System of Record
Salesforce Billing is not a replacement for an ERP. It handles invoicing and payment collection, but the ERP remains the system of record for general ledger, financial reporting, and tax compliance. The CTA must design the integration boundary clearly — CPQ/Billing owns the customer-facing quote-to-cash process; ERP owns the back-office financial process.
CPQ vs Custom Pricing: When to Recommend Each
This is a frequent CTA scenario decision. Use this framework to justify your recommendation.
| Factor | Recommend CPQ | Recommend Custom |
|---|---|---|
| Product catalog | 50+ products with bundles and options | Simple catalog, fewer than 20 products |
| Pricing model | Multi-dimensional: volume, tiered, contracted, subscription | Flat pricing or single discount tier |
| Discount governance | Approval chains, floor prices, partner discounts | Simple manager approval sufficient |
| Sales team | Large team needing guided selling and guardrails | Small team with pricing authority |
| Quoting volume | 100+ quotes/month | Low volume, manual quoting acceptable |
| Compliance | Audit trail for pricing decisions required | Minimal compliance needs |
| Timeline | Can invest 3-6 months in implementation | Need pricing in weeks |
| Budget | Can afford CPQ licenses ($75+/user/month) | License cost is prohibitive |
| Existing stack | Already on Sales Cloud; Billing planned | Non-Salesforce CRM or ERP handles pricing |
CTA Presentation Tip
Never say “use CPQ” or “build custom” without the analysis. Present the decision as: “We evaluated Salesforce CPQ, Revenue Cloud, a custom pricing engine, and the ERP’s native quoting. Here’s why we recommend X for this customer’s specific context.” Show the board you considered alternatives.
CPQ vs Revenue Cloud vs Industries CPQ
With the CPQ end-of-sale, CTAs must understand all three options.
| Dimension | Legacy CPQ (SBQQ) | Revenue Cloud | Industries CPQ (Vlocity) |
|---|---|---|---|
| Architecture | Managed package (1GP) | Core-native platform | Managed package + OmniStudio |
| Product model | Bundles, options, MDQ | Products, offers, prices | EPC (Enterprise Product Catalog) |
| Pricing engine | JavaScript QCP + Price Rules | Native pricing engine | Cart-based pricing |
| New sales | End-of-sale (March 2025) | Actively sold | Sold with Industry Clouds |
| Best for | Existing implementations | Greenfield deployments | Telco, media, energy, utilities |
| Approvals | SBAA Advanced Approvals | Built-in approval flows | OmniStudio-based approvals |
| Order model | Quote → Order (separate) | Integrated quote-to-order | Asset-based ordering |
| Migration path | Migrate to Revenue Cloud | N/A (target state) | Separate trajectory |
Greenfield Recommendation
For new implementations in 2025-2026, recommend Revenue Cloud over legacy CPQ unless the customer has a compelling reason to use the legacy package (e.g., existing CPQ investment, partner ecosystem dependency, or specific features not yet in Revenue Cloud). Always verify feature parity — Revenue Cloud is still maturing.
Performance Considerations
CPQ performance is the most common pain point in large implementations. The Quote Line Editor runs calculations client-side, and complex configurations can hit governor limits server-side.
Known Performance Boundaries
| Metric | Comfortable Range | Caution Zone | Danger Zone |
|---|---|---|---|
| Quote lines per quote | < 100 | 100-200 | > 200 |
| Bundle options | < 50 per bundle | 50-100 | > 100 |
| Product rules | < 50 active | 50-100 | > 100 |
| Price rules | < 30 active | 30-60 | > 60 |
| Quote calculation time | < 5 seconds | 5-15 seconds | > 15 seconds |
| Product catalog size | < 5,000 products | 5K-20K | > 20K |
Optimization Strategies
| Strategy | Impact | Implementation |
|---|---|---|
| Large Quote Threshold | Reduces fields processed | Set SBQQ__LargeQuoteThreshold__c on CPQ Package settings |
| Minimize formula fields | Reduces calculation overhead | Replace formulas with Price Rule field updates |
| Reduce lookup relationships | Fewer cross-object queries | Denormalize frequently accessed data onto Quote Line |
| Async order generation | Prevents timeout on ordering | Enable SBQQ__AsynchronousOrderGeneration__c |
| Cacheable lookups | Reduces redundant SOQL | Use SBQQ__CacheDiscountSchedules__c |
| Lean quote line fields | Faster QLE rendering | Remove unused fields from QLE field sets |
| Batch product rule evaluation | Reduces rule processing | Group related rules; minimize rule scope |
The 200-Line Cliff
Quotes exceeding 200 line items frequently hit governor limits, timeout errors, or QLE rendering failures. If business requirements regularly produce quotes this large, architect a solution that splits quotes into multiple child quotes, uses asynchronous processing, or evaluates whether a non-CPQ architecture (custom or Revenue Cloud) better fits the scale requirements.
CTA Scenario Patterns
Scenario 1: Manufacturing Company — Configure-to-Order
Situation: A manufacturer sells industrial equipment with 500+ configurable options across 12 product families. Sales reps currently use spreadsheets, leading to 15% error rate on quotes and 3-day average quote turnaround.
What you would present:
- Recommend Salesforce CPQ with nested bundles — top-level bundle per product family, sub-bundles for option groups
- Product Rules (validation type) to enforce engineering constraints (e.g., motor size must match frame size)
- Price Rules to calculate shipping surcharges based on weight and destination
- Advanced Approvals with chain: Sales Manager → Engineering Review (if custom config) → Finance (if discount > 20%)
- Performance mitigation: Large Quote Threshold at 150 lines, async order generation, quote splitting for orders spanning multiple product families
Trade-off articulated: “CPQ adds license cost and implementation complexity, but eliminates the 15% error rate and reduces quote turnaround from 3 days to under 1 hour. The ROI justifies the investment within 6 months based on the customer’s quote volume.”
Scenario 2: SaaS Company — Subscription + Usage Billing
Situation: A SaaS company sells platform licenses (annual subscription) with usage-based API call pricing. They need mid-term amendments (add seats), auto-renewals, and integration with NetSuite for revenue recognition.
What you would present:
- CPQ + Billing end-to-end: CPQ for quoting and configuration, Billing for invoicing and usage rating
- MDQ (Multi-Dimensional Quoting) for subscription products with annual ramps
- Amendment and Renewal flows using CPQ’s
SBQQ__Subscription__cto track entitlements - Usage-based billing via Billing’s Usage Summary object for API call metering
- NetSuite integration via middleware (MuleSoft) for invoice and payment sync to GL
- Revenue Cloud evaluation note: If this is a greenfield implementation, evaluate Revenue Cloud for native usage rating and subscription management before committing to legacy CPQ + Billing
Trade-off articulated: “We chose the combined CPQ + Billing stack over NetSuite’s native quoting because the sales team lives in Salesforce, and quoting accuracy depends on CRM data (account tier, usage history). The trade-off is managing two managed packages (SBQQ + blng) with their combined governor limit footprint.”
Scenario 3: Channel Sales — Partner Pricing and Approvals
Situation: A technology company sells through 200+ channel partners. Each partner tier (Gold, Silver, Bronze) gets different discount levels. Partners submit quotes through a portal that need headquarters approval above certain thresholds.
What you would present:
- Partner Community with CPQ access via Experience Cloud for partner-submitted quotes
- Partner and Distributor Discounts in the pricing waterfall, configured per partner tier
- Advanced Approvals with dynamic approver assignment based on deal size and partner tier
- Contracted Pricing for strategic partners with pre-negotiated rates
- Floor pricing to prevent margin erosion — no quote can go below defined minimums regardless of stacked discounts
Trade-off articulated: “Partner portal with CPQ gives channel partners self-service quoting with guardrails. The trade-off is Experience Cloud licensing cost and the complexity of managing CPQ permissions in a portal context. The alternative — emailing spreadsheets — creates an unacceptable error rate and 48-hour turnaround.”
Related Topics
- Build vs Buy & AppExchange Strategy — Evaluation framework for managed packages including CPQ
- Declarative vs Programmatic — When to extend CPQ with Apex vs Price Rules
- Trade-Offs — Native vs AppExchange trade-off analysis
- Modern Platform Features — Revenue Cloud, OmniStudio, and platform evolution
- Integration — Middleware patterns for CPQ-to-ERP integration
- Security — Sharing and visibility in CPQ portal scenarios
- Data — Data model implications of managed package objects
Sources
- Salesforce Help: CPQ Object Relationships
- Salesforce Help: CPQ Quote Calculation Stages
- Salesforce Help: Large Quote Performance Settings
- Salesforce Help: Advanced Approvals
- Salesforce Help: Integrating CPQ and Billing
- Salesforce Trailhead: Product and Price Rules
- Salesforce Trailhead: Advanced Approvals and AOM
- Salesforce Trailhead: Partner and Distributor Discounts
- Salesforce Developer: Quote Calculator Plugin Methods
- Salesforce Ben: CPQ End of Sale Options
- Salesforce Ben: Industries CPQ Guide
- Nebula Consulting: CPQ Price Waterfall
- Coforge: Large Quote Technical Design
- CPQ Developers: Data Model