Skip to main content

Understand, Troubleshoot, and Fix Pricing Errors in CPQ Quotes

CPQ; Quote Line Microscope; Salesforce; Diagnose; Troubleshoot; Fix Pricing Errors; CPQ Quotes;

Updated over a week ago

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:

  1. Access the settings:

    • Navigate to the Quote Line Microscope Setup in Salesforce.

    • If you don’t see the settings tab or component, verify that you have the required Quote Line Microscope Admin permission set.

  2. 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.

  3. 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.

  4. Manage dynamically-created rules:

    • Use the settings page to view, inspect, and delete logging-related Price Rules and Price Actions.

    • The tables displaying these records automatically refresh when you enable or disable logging.

  5. 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

  1. Navigate to a Quote Line record.

  2. Use the Quote Line Microscope Lightning Web Component (LWC) to enable logging for the specific record.

  3. Update the Quote Line to trigger the price calculation process.

  4. 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

  1. Select "Create Diagram" from the Quick Action on the Quote Line Record.

  2. 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.

  3. 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

  1. Click on any Price Rule box in the diagram to explore:

    • Evaluated Price Conditions and their logic results

    • Associated Price Actions and the fields they updated

    • Complex nested conditions and hierarchical field references

  2. Quick navigation to CPQ records:

    • Each box in the diagram is linked directly to the corresponding Salesforce CPQ record.

    • This allows you to quickly access and review the specific Price Rule, Price Condition, or Price Action without manually searching in Salesforce.

  3. 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

  1. Click through diagram links to open relevant CPQ records directly.

  2. Edit Price Conditions to correct logic or field references.

  3. Update Price Actions to fix formulas or ensure they target the appropriate fields.

  4. Reorder Price Rules to align with the desired sequence of execution.

  5. 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.

Did this answer your question?