Rev Cloud Blueprint - Comprehensive Testing Framework for Salesforce Revenue Cloud

A comprehensive Visual Studio Code extension for automating regression testing across the entire Salesforce Revenue Cloud ecosystem - Pricing, Configurator, Order Decomposition, and Billing.
🎯 Vision & Overview
Rev Cloud Blueprint is a VS Code extension that revolutionizes testing for Salesforce Revenue Cloud by providing:
- ✅ Automated Pricing Testing with cross-org validation
- 🏗️ Hierarchical Test Organization with custom grouping
- 🔄 Snapshot-Based Regression Testing with Git version control
- 🌐 Multi-Org Authentication via Salesforce CLI integration
- 📊 Enhanced HTML Reports with accordion layout, save/export functionality
- 💾 Report Management with HTML save and PDF export capabilities
- 🔄 Automated Apex Execution for pricing recalculation
- 🚀 Revenue Cloud Place Sales Transaction API integration
- 🎨 Beautiful User Experience with progress tracking and validation
⚠️ Important Limitations
Current Version (v1.x) Scope: This extension is specifically designed for Pricing Testing only.
❌ Not Currently Supported
- ❌ Product Configurator Testing: Configuration rules, bundles, and product selection logic are not supported
- ❌ Billing Module Testing: Invoice generation, payment processing, and revenue recognition are not supported
- ❌ Order Management Testing: Quote-to-order conversion, order decomposition, and fulfillment workflows are not supported
- ❌ Cross-Org Testing: Testing across different Salesforce orgs is not currently supported - all testing occurs within a single org environment
✅ What IS Supported
- ✅ Pricing Testing: Quote pricing calculations, line item pricing, and pricing rule validation
- ✅ Single-Org Workflows: Complete testing workflows within one Salesforce org
- ✅ Snapshot Management: Create, compare, and manage pricing test snapshots
- ✅ API Integration: Revenue Cloud Place Sales Transaction API for pricing calculations
Future versions will expand support to additional Revenue Cloud modules as outlined in the roadmap.
📖 Table of Contents
- 🎯 Vision & Overview
- ⚠️ Important Limitations
- 🚀 Getting Started
- 📋 How to Use
- ⚙️ Configuration
- 🗺️ Roadmap
- 📚 Additional Resources
- 📄 License
- 🙏 Acknowledgments
🚀 Getting Started
📋 Prerequisites
- VS Code: Version 1.74.0 or higher
- Salesforce CLI: Latest version (
npm install -g @salesforce/cli
)
- Revenue Cloud: Enabled in your Salesforce orgs
- Node.js: Version 18.x or higher (for development)
⚡ Quick Installation
Install from VS Code Marketplace:
- Open VS Code → Extensions (Ctrl+Shift+X)
- Search "Rev Cloud Blueprint"
- Click Install
Authenticate Salesforce Orgs:
# Production (source)
sfdx auth:web:login -a ProductionOrg
# Development/Test (target)
sfdx auth:web:login -a DevOrg
# Verify authentication
sfdx org:list
Verify Installation:
- Open any workspace in VS Code
- Look for "Rev Cloud Blueprint" in the Explorer sidebar
- Click the ➕ button to test functionality
📋 How to Use
1. 📸 Creating Pricing Snapshots
Step 1: Initiate Snapshot Creation
- In VS Code Explorer, find "Rev Cloud Blueprint"
- Click the ➕ "Create Pricing Snapshot" button
- Extension will load available Salesforce orgs
Step 2: Select Source Org
- Choose your source org (Production, UAT, or reference environment)
- Extension validates authentication and Revenue Cloud access
- Progress bar shows org loading status
Step 3: Enter Quote Details
- Quote ID: Enter the Salesforce Quote ID (15 or 18 character format)
- Description: Provide meaningful test description (e.g., "Annual discount with multi-year terms")
Step 4: Review Generated Snapshot
- Extension creates JSON file:
revcloud_blueprint/pricing/snapshots/snapshot_<orgalias>_<quoteid>_<description>.json
- Contains:
{
"metadata": {
"sourceOrgId": "00D000000000001",
"sourceOpportunityId": "006000000000001",
/* Source org, quote ID, timestamp */
},
"expectedResults": { /* Pricing totals, line-level results */ },
"recreationPayload": {
"sourceOpportunity": {
"Id": "006000000000001",
"Name": "Enterprise Deal Q4",
"Account": { "Id": "001000000000001", "Name": "Acme Corp" }
},
/* Products, quantities, Pricebook2 name */
}
}
2. 🧪 Running Pricing Tests
Method 1: Individual Test
- Locate Snapshot: In the Rev Cloud Blueprint tree view, find your snapshot
- Click Play Button: Click ▶️ "Run Pricing Test"
- Select Target Org: Choose destination org for testing
- Smart Opportunity Selection: Extension intelligently handles opportunity selection (see below)
- Monitor Progress: Watch real-time progress indicators
- Review Results: HTML report opens automatically with detailed comparison
🎯 Smart Opportunity Management
The extension includes intelligent opportunity management that adapts based on your testing scenario:
When Testing in the Same Org (Source = Target)
When you select the same org as both source and target, the extension presents you with smart options:
"Use same opportunity" - Uses the opportunity from the original snapshot
- When to choose: Testing pricing configuration changes without data dependencies
- Benefit: Ensures consistent account, currency, and relationship context
- Display: Shows opportunity name and ID for easy identification
"Use different opportunity" - Enter a different opportunity ID
- When to choose: Testing same products/pricing with different account context
- Benefit: Validates pricing logic across different customer scenarios
- Prompt: "Enter different OpportunityId for this test"
When Testing in Different Org (Source ≠ Target)
When testing across orgs, the extension automatically prompts for opportunity ID:
- Reason: Opportunities are org-specific and cannot be reused across orgs
- Prompt: "Enter OpportunityId for [target-org-name]"
- Validation: 15 or 18 character Salesforce ID format verification
3. 📊 Understanding Enhanced Test Results
New Enhanced Report Features
- ✅ Accordion Layout: Collapsible line items for handling 100+ line items efficiently
- 💾 Save Report: Save HTML reports to
revcloud_blueprint/pricing/results/
- 📄 PDF Export: Export reports to PDF with all accordions expanded
- 📋 Expand/Collapse All: Quick control for accordion management
- 📊 Comprehensive Summary: Detailed test metadata and execution information
Report Layout
[Test Name - e.g., "FTI"] [💾 Save] [📄 Export to PDF]
✅ PASSED
Test Summary:
─────────────────────────────────────────────────────────
Source Quote ID: 0Q0UD000001KCFZ0AW Created Quote: Regression Test (0Q0XX...)
Source Org: myentdev Test Date: 26/08/2025, 12:52:43
Target Org: myentdev Overall Status: ✅ Passed
─────────────────────────────────────────────────────────
Success Rate: 100.0% (34/34 fields) Execution Time: 25.16s
Line Items: 7/7 matching
Bundles: 2, Standalone: 3
Quote-Level Comparison
[Comparison table with Expected/Actual/Status/Variance columns]
Line Items Comparison [📋 Expand/Collapse All]
└── 🔽 Bundle: Enterprise Suite ✅ Passed (2/2 children passed)
├── 📦 Bundle Parent: Enterprise Suite ✅ Passed
│ [Parent item details when expanded]
├── ├─ Advanced Analytics ✅ Passed
│ [Child item details when expanded]
└── └─ Premium Support ✅ Passed
[Child item details when expanded]
└── 🔽 Bundle: Professional Package ❌ Failed (1/2 children passed)
├── 📦 Bundle Parent: Professional Package ✅ Passed
├── ├─ Basic Analytics ✅ Passed
└── └─ Standard Support ❌ Failed
[Failed child item details when expanded]
└── 📄 Standalone Product A ✅ Passed
└── 📄 Standalone Product B ✅ Passed
└── 📄 Add-on Service ✅ Passed
Hierarchical Structure Features
- 🔽 Bundle Groups: Parent line items with child items grouped underneath
- 📦 Bundle Parents: Show aggregate status and child count summary
- ├─ Child Items: Visually indented with tree-like structure under parents
- 📄 Standalone Items: Individual line items without parent-child relationships
- Smart Sorting: Bundles appear first (sorted by name), then standalone items
- Aggregate Status: Bundle passes only if parent AND all children pass
- Visual Hierarchy: Color coding and indentation for clear parent-child relationships
- 💾 Save Report: Creates HTML file in results directory for permanent storage
- 📄 Export to PDF: Opens expanded version in browser for PDF printing
- 📋 Expand/Collapse All: Controls all accordion states simultaneously
⚙️ Configuration
🔧 Extension Settings
Access via: Ctrl+Shift+P
→ "Preferences: Open Settings" → Search "Rev Cloud Blueprint"
Core Configuration
{
"revCloudBlueprint.pricing.productExternalIdField": "ProductCode",
"revCloudBlueprint.pricing.attributeDefinitionExternalIdField": "Code",
"revCloudBlueprint.pricing.attributePicklistValueExternalIdField": "Code",
"revCloudBlueprint.api.version": "v64.0",
"revCloudBlueprint.verboseLogging": true,
"revCloudBlueprint.pricing.snapshotDirectory": "revcloud_blueprint/pricing/snapshots"
}
Setting Details
Setting |
Default |
Description |
productExternalIdField |
"ProductCode" |
External ID field on Product2 for cross-org matching |
attributeDefinitionExternalIdField |
"Code" |
External ID field on AttributeDefinition |
attributePicklistValueExternalIdField |
"Code" |
External ID field on AttributePicklistValue |
api.version |
"v64.0" |
Salesforce API version for Connect APIs |
verboseLogging |
false |
Enable detailed debug logging |
pricing.snapshotDirectory |
"revcloud_blueprint/pricing/snapshots" |
Directory for snapshot storage |
🏗️ Project-Specific Field Configuration
Each project requires custom field configuration via .revcloud/settings.json
in your workspace root. This defines which fields are captured from source quotes and which fields are compared in test reports.
Configuration Structure
The configuration defines two types of fields for both Quote and QuoteLineItem objects:
- 📥 Snap Fields (Input) - Fields captured in snapshots and used for quote recreation
- 📊 Report Fields (Output) - Fields captured in snapshots and compared in test reports
Example Configuration (.revcloud/settings.json
)
{
"pricing": {
"snapFields": {
"description": "Input fields captured and used for pricing test recreation",
"quote": {
"description": "Custom Quote fields required for pricing calculation",
"fields": [
"ContractTerm__c",
"Custom_Quote_Field__c"
]
},
"quoteLineItem": {
"description": "Custom QuoteLineItem fields required for pricing calculation",
"fields": [
"Custom_LineItem_Field__c"
]
}
},
"reportFields": {
"description": "Output fields captured and compared in test reports",
"quote": {
"description": "Quote-level pricing outputs to verify",
"fields": [
"NetAmount",
"GrandTotal"
]
},
"quoteLineItem": {
"description": "QuoteLineItem-level pricing outputs to verify",
"fields": [
"NetUnitPrice",
"NetTotalPrice"
]
}
}
}
}
How It Works
- Snapshot Creation:
- Captures Snap Field values (inputs) from source Quote/QuoteLineItems for recreation
- Captures Report Field values (outputs) from source Quote/QuoteLineItems for comparison
- Test Recreation: Snap field values are applied to newly created Quote/QuoteLineItems
- Pricing Engine: Your pricing procedures receive the required field values and calculate fresh outputs
- Test Report: Compares expected vs actual values for all configured report fields
Field Configuration Process
- Identify Snap Fields (Input): Review your pricing procedures to determine which custom fields they reference as inputs
- Identify Report Fields (Output): Determine which pricing output fields you want to verify in test reports
- Update Configuration: Add fields to appropriate sections in
.revcloud/settings.json
- Test: Create a new snapshot and run a pricing test to verify correct field capture and comparison
Common Field Types
Quote Level Fields:
- Contract/Term fields (e.g.,
ContractTerm__c
)
- Business process fields (e.g.,
Business_Unit__c
)
- Pricing configuration fields (e.g.,
Pricing_Model__c
)
QuoteLineItem Level Fields:
- Service type fields (e.g.,
ServiceType__c
, ServiceType__c
)
- Pricing method fields (e.g.,
PriceMethod__c
, PricingMethod__c
)
- Business categorization (e.g.,
Product_Category__c
, Revenue_Type__c
)
🗺️ Roadmap
✅ Completed (v1.0) - Pricing Module
- ✅ Core Pricing Testing: Complete snapshot-based pricing validation
- ✅ Cross-Org Intelligence: External ID resolution, Pricebook2 matching, currency matching
- ✅ Revenue Cloud Integration: Place Sales Transaction API with graph-based payload structure
- ✅ Dynamic Schema Discovery: Automatic field detection using
sf sobject describe
- ✅ Currency Matching: Automatic PricebookEntry currency validation
- ✅ QuoteLineItemAttribute Support: Full attribute capture and API payload generation
- ✅ Enhanced HTML Reports: Accordion layout with compact design for handling 100+ line items
- ✅ Report Management: Save to HTML and PDF export functionality
- ✅ Automated Apex Execution: Built-in pricing recalculation with REST API integration
- ✅ Progress Indicators: Real-time progress tracking with smooth animations
- ✅ Developer Experience: VS Code integration, comprehensive debug logging, modular architecture
🔄 Planned Features
v1.x - Enhanced Pricing
v2.0 - Product Configurator Module
v3.0 - Order Decomposition Module
v4.0 - Billing Module
📚 Additional Resources
📖 Documentation
🔗 External References
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Salesforce Revenue Cloud Team - For providing comprehensive API documentation and support
- VS Code Extension Community - For excellent development tools and resources
- TypeScript Team - For robust type safety and development experience
- Open Source Community - For the amazing libraries and tools that make this possible