Understand, Troubleshoot, and Fix Pricing Errors in CPQ Quotes
Learn how to use the Quote Line Microscope to diagnose, troubleshoot, and resolve pricing errors in Salesforce CPQ with detailed execution diagrams and direct links to CPQ records
Why troubleshoot pricing errors in CPQ quotes?
Accurate pricing is critical to the quoting process in Salesforce CPQ. Errors in price calculations can lead to:
Incorrect quotes sent to customers
Delays in deal closure due to rework
Revenue leakage or compliance issues
Frustration for sales teams and customers
Identifying the source of pricing issues can be complex due to the interplay of price rules, price conditions, price actions, and custom logic. Understanding how these components execute during a quote calculation is essential to diagnosing and resolving errors effectively.
When to troubleshoot pricing errors?
Use this guide when you need to:
Develop new price calculations: Test if price calculations execute as intended during development.
Troubleshoot pricing anomalies: Investigate and resolve price calculations that seem incorrect or unexpected.
Gain confidence before quote approval: Understand how the final price was calculated to validate accuracy before sign-off.
Prerequisites
Before troubleshooting, ensure you have:
Elements.cloud Managed Package installed and configured
Salesforce CPQ Managed Package installed
Quote Line Microscope (2nd-generation managed package extension) installed
Quote Line Microscope Admin permission set assigned to your user
Global logging enabled for the Quote Line Microscope
How to troubleshoot pricing errors using the Quote Line Microscope
Step 1: Set up and enable Quote Line Microscope logging
To capture price rule execution details, you must enable logging through the Quote Line Microscope Settings page:
Access the settings:
Enable global logging:
Under the Logging Rules and Actions tab, locate the Enable Logging control (toggle or button) and activate it.
Enabling logging will:
Dynamically create the necessary Price Rules and Price Actions to capture execution details.
Not automatically enable logging for individual Quotes or Quote Lines—these must be enabled manually as needed.
A success notification will confirm logging activation.
Disable logging (when needed):
Use the Disable Logging control to stop capturing logs.
Disabling logging will:
Deactivate or delete the dynamically-created Price Rules and Actions.
Disable any active logging on individual Quotes or Quote Lines.
Preserve existing Quote Line Logs and Price Rule Execution Diagrams.
A success toast will confirm successful deactivation.
Manage dynamically-created rules:
Select and manage Quote Calculator Plugins:
In the plugin selector, choose a Quote Calculator Plugin (Custom Script) from the dropdown list or select “None.”
If a plugin is already selected, the page will pre-populate it on load.
Update the active plugin as needed; a success toast will confirm changes, or an error notification will appear if an update fails.
Tip: Keep an eye on accumulated logs. Over time, Quote Line Logs and Price Rule Execution Diagrams can grow in volume—regularly clean up old records to maintain system performance.
Step 2: Capture and review execution data
Navigate to a Quote Line record.
Use the Quote Line Microscope Lightning Web Component (LWC) to enable logging for the specific record.
Update the Quote Line to trigger the price calculation process.
Logs will automatically capture details such as:
Executed Price Rules and their evaluation order
Evaluated conditions and their results
Executed Price Actions and field updates performed
Invoked Quote Calculator Plugins (if configured)
Step 3: Generate and review the Price Rule Execution Diagram
Select "Create Diagram" from the Quick Action on the Quote Line Record.
Alternatively, in the Quote Line Microscope component, select the captured log corresponding to the quote line update. Then request Elements.cloud to render the Price Rule Execution Diagram.
Access the diagram through the provided URL or directly within Salesforce after rendering is complete.
The diagram provides visibility into:
Execution phases: On Initialization, Before Calculate, On Calculate, and After Calculate
Executed Price Rules: Displayed in order with evaluation details and descriptions
Custom logic execution: Through Quote Calculator Plugins
Potential error points: Highlighted sections where logic execution failed or conditions returned unexpected results
Step 4: Drill down for detailed insights
Click on any Price Rule box in the diagram to explore:
Quick navigation to CPQ records:
Use these insights to identify:
Conditions returning unintended results due to logic errors
Misconfigured Price Actions targeting incorrect fields or using outdated formulas
Issues arising from incorrect rule evaluation order or unintended logic overlaps
Step 5: Investigate and fix identified issues
Click through diagram links to open relevant CPQ records directly.
Edit Price Conditions to correct logic or field references.
Update Price Actions to fix formulas or ensure they target the appropriate fields.
Reorder Price Rules to align with the desired sequence of execution.
Refactor custom plugins if the Quote Calculator Plugin introduces unexpected behavior.
Pro Tip: The direct links from the diagram to CPQ records significantly reduce troubleshooting time by letting you jump straight to the logic that needs adjustments.
Validate fixes by re-running the calculation and reviewing the updated execution diagram to confirm the issue is resolved.
Step 6: Manage logs and maintain system cleanliness
Regularly review and delete old logs and Price Rule Execution Diagrams to prevent data buildup.
Use the settings page to manage log records while ensuring essential troubleshooting data remains accessible during active investigations.
Conclusion
The Quote Line Microscope offers an in-depth view into price calculation logic, helping CPQ administrators and developers quickly identify, troubleshoot, and resolve pricing errors. With clickable diagrams linking directly to CPQ records, you can rapidly navigate to and adjust the logic that needs refinement—ensuring accurate pricing and smoother quote approvals.