---
schema_version: "1"
id: 6f54700e66c76e7736f69b1af0cf1ca5933e5c0ba395418782ccf13099b9cf51
title: How Penny Perfect Pricing Calculates Prices
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/ppp_how_calculates.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.ppp_how_calculates.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e67477ddb0eb9145578cddd8721474ecde7025866ec3beb4eb9fe9ce2f8cf62f
description: Follow the step-by-step sequence the pricing calculator runs to turn an order into ERP-consistent net prices.
products:
  - Manufacturing
  - Automotive
  - Consumer Goods
release: "264"
---
# How Penny Perfect Pricing Calculates Prices

Follow the step-by-step sequence the pricing calculator runs to turn an order into ERP-consistent net prices.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong> and <strong>Unlimited</strong> Editions in Manufacturing Cloud, Automotive Cloud, and Consumer Goods Cloud, with <a href="https://help.salesforce.com/s/articleView?id=xcloud.ppp_editions_permissions.htm&amp;release=264.0.0&amp;type=5" title="Confirm the editions, add-on licenses, and organization-level permissions required before you configure or use Penny Perfect Pricing.">required add-ons</a>.</td></tr></tbody></table>

Penny Perfect Pricing uses a structured execution sequence that mirrors your backend ERP system's pricing behavior. The pricing calculator retrieves the pricing conditions for every order line item and evaluates them in a configurable, step-by-step sequence.

## Pricing Calculation Workflow

When a rep or an API submits an order for pricing, Penny Perfect Pricing runs this sequence.

1. **Order input.** The calculator receives an order with header details (such as customer account, sales organization, and order type) and line items (products, quantities, and units of measure).
2. **Schema determination.** Based on the order's pricing type and the Internal Organization Unit, the calculator identifies the matching calculation schema and loads it.
3. **Context hydration.** The calculator populates the pricing context (`AdvOrderSalesTxnContext__stdctx`) with order header attributes, line-item values, account hierarchy details, and product dimensions.
4. **Schema traversal.** The calculator traverses the calculation schema step by step, evaluating each step's linked Pricing Specification and Search Strategy.
5. **Merge key generation.** The calculator generates consolidated lookup keys (merge keys) from the Key Type definitions mapped to each active Search Strategy Step.
6. **Bulk lookup.** The calculator runs a single bulk query against the consolidated pricing table (External Pricing Key Value Consolidated View) to retrieve all matching conditions.
7. **Calculation.** The calculator evaluates and applies the retrieved conditions in sequence. You can configure the calculator to:
    - **Hierarchical search:** Evaluate lookups from most specific (customer- or product-specific) to base-price fallbacks, across both account hierarchies and product hierarchies.
    - **Scale and tier determination:** Calculate volume discounts using graduated intervals or threshold-based tiers.
    - **Group conditions:** Sum quantities across eligible line items to evaluate order-level threshold discounts.
    - **Exclusion logic:** Stop further search steps when an exclusive condition matches.
    - **Compound taxation:** Compute primary and secondary taxes on base prices and cumulative subtotals.
    - **Unit-of-measure conversions:** Convert line-item quantities to match condition rates defined in specific units of measure.
8. **Result assembly.** The calculator assembles the priced order with line-level net prices and writes the pricing waterfall log, detailing evaluated, applied, and excluded conditions.
9. **Return.** The calculator returns the calculated order and the pricing details to the user or the requesting API.

## Calculation Flow Example

See how the Pricing Calculator turns a base price into a net order-item price, one step at a time.

This example shows how the Pricing Calculator prices a single line item as it moves through the calculation schema. Your schema and conditions determine the actual steps; the values here are illustrative.

- **Step 10 — Base Price:** $100.00
- **Step 20 — Customer-Specific Discount:** -10% → $90.00
- **Step 30 — Volume Scale Discount:** -$5.00 → $85.00
- **Step 40 — Sales Tax:** +5% → $89.25
- **Net Order Item Price:** $89.25