---
schema_version: "1"
id: df583b8ca56354f273828fdc9bee1aaf7960b5e4c8885be84cfafc41cda54aa8
title: Pricing Rules
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_pricing_rules.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_pricing_rules.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 662e8aa67630fbb0b32d53e5545b512a4e447974e049b3033cedc369f9c8c0a3
description: Pricing rules determine the price of the products in the cart. They use calculation procedures to calculate the appropriate prices and apply discounts. When you create a pricing rule, you specify a calculation procedure as the rule action.
products:
  - Communications
  - Media
  - Energy and Utilities
release: "264"
---
# Pricing Rules

Pricing rules determine the price of the products in the cart. They use calculation procedures to calculate the appropriate prices and apply discounts. When you create a pricing rule, you specify a calculation procedure as the rule action.

Pricing rules can be hard or soft. When a pricing rule is soft, a customer can see a price even if she is not eligible for it. When a pricing rule is hard, a customer cannot see the price if she is not eligible for it.

Many pricing rules run in a defined sequence to result in the correct order pricing. Pricing rules, using entity filters and rule actions, modify orders. Actions may include calculation procedures, offering procedures, product relationships, and entity filters.

Pricing depends on pricing rules, which are based on attributes. The attributes drive the pricing. You can offer one product with pricing based on its attributes.

For example, you can offer broadband Internet service at different prices for 50 Mbps, 100 Mbps, and so on. You can also define rules that specify one price for a product by itself, but a different price when the product is part of a bundle.

You can implement promotions using pricing rules and the PricingRulesFlow. For more information about flows, see [Flows](https://help.salesforce.com/s/articleView?id=ind.comms_flow_management_in_industries_cpq.htm&release=264.0.0&type=5 "Flows define sequential processing of rules, logic, and custom processing that can be initiated by an interface implementation, specify calls to Apex, and can access any service.").

Pricing rules use the PricingInterface and associated implementations to calculate the correct order total. The pricing interface and implementation are triggered when a product is added to, deleted from, or modified in an opportunity, order, or quote.

Pricing rule implementations include:

- DefaultPricingImplementation: Use with standard pricing rules that are not dependent on any external factors.
- PricingRulesFlowImplementation: Use with advanced pricing rules that are dependent on external factors.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-comms_media_energy_managed-264-0-0-production-enus/ff4079f6-a384-475c-b863-578bbbb0ef9b/images/icon_note.png)

Note

You must associate the PricingRulesFlowImplementation class with the flow name. For more information see PricingRulesFlowImplementation .

Example pricing rules include:

- Office Internet Solution costs $25 per month with a $10 one-time fee.
- All non-discounted child items should be priced at $0.
- Office Internet Solution is discounted by 10% if the quantity is 10 to 25, discounted by 15% for a quantity of 26 to 99, and discounted by 20% for a quantity of 100 or more.
- The monthly price of Office Internet Solution is based on the selected download speed and upload speed.

Pricing rules must be run on Line Item objects—Opportunity Line Item, Order Line Item, or Quote Line Item.

## Create a Standard Pricing Rule

In the example, the Call Me 500 Plan costs $10 per month with a $10 one-time fee. One-time and monthly totals reflect quantity and manual discounts. To implement this, you must define the one-time and recurring list price for Call Me 500 Plan.

1. Click the **Products** tab.
2. Search for and go to the Product to price.
3. Scroll down to the Price Books section and confirm that the appropriate Price Book is there, including the List Price and Standard Price.
    
    For more information about Price Books, see [Manage Price Books](https://help.salesforce.com/apex/htviewhelpdoc?id=pricebooks_landing_page.htm&language=en_US) in the Salesforce Help.
4. Click **Edit**.
5. On the Price Book Entry Edit page, enter the **List Price** and **Recurring Price**.
6. Click **Save**.
    
    **Price Book Entry Edit Page**
    
    ![Price Book Entry Edit page.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-comms_media_energy_managed-264-0-0-production-enus/ff4079f6-a384-475c-b863-578bbbb0ef9b/resources-product/images/salesforce_pricebookentryeditpage.png)

## Create an Advanced Pricing Rule

Use advanced pricing rules to implement attribute- and volume-based pricing. Advanced pricing rules price products based on attributes instead of a price book.

For example, you can base the price of the Office Internet Solution on download and upload speeds. You can also provide a discount if a customer orders more than one Call Me 500 Plan. For more information about pricing, see [Pricing Rules](https://help.salesforce.com/s/articleView?id=ind.comms_pricing_rules.htm&release=264.0.0&type=5 "Pricing rules determine the price of the products in the cart. They use calculation procedures to calculate the appropriate prices and apply discounts. When you create a pricing rule, you specify a calculation procedure as the rule action.").

To create an advanced Pricing Rule:

1. If necessary, create a Calculation Matrix to define quantity ranges or discounts. For more information, see Calculation Matrices.
2. Create a Calculation Procedure to calculate the different charges. For more information, see
3. If necessary, create one or more Entity Filters. For more information, see
4. Click the **Vlocity Rules** tab. Click **New** and enter the following information:
    1. **Rule Name** is the name of the Rule. Enter a descriptive name so you can easily remember what the Rule does.
    2. From the **This defines** picklist, select the Rule type, for example, **Pricing**.
    3. From the **Rule that applies to** picklist, select the object to which the Rule applies, for example, **Order Product<Order Item>**.
    4. From the **And is** picklist, select if the rule is **Active** or **Inactive**.
    5. In the **Description** field, enter a description of what the Rule does.
        
        ![Example volume Based Discount Pricing rule.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-comms_media_energy_managed-264-0-0-production-enus/ff4079f6-a384-475c-b863-578bbbb0ef9b/resources-product/images/salesforce_rulebuilder_volumebaseddiscountpricing.png)
5. Scroll down to the Filters and Actions section.
    
    - Click the **Filters** button.
    - Click the **Add to Rule Filter** link to the right of the filter to add.
6. Click the **Actions** button.
7. In the Filters and Actions list, click the **Add to Rule Action** link to the right of the action to add.
8. Scroll to the top of the page and click **Save**.

## Test a Pricing Rule

You can test Pricing Rules by adding products to the cart in the Opportunity, Order, or Quote Manager. You can create a new Opportunity, Order, or Quote from the appropriate Account and add items to the cart.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-comms_media_energy_managed-264-0-0-production-enus/ff4079f6-a384-475c-b863-578bbbb0ef9b/images/icon_note.png)

Note

Before you can test Rules, you must ensure that Vlocity is using the appropriate interface implementation. For more information, see "Set an Implementation" in Interfaces, Implementations, and Services.

To test a Pricing Rule:

1. Add the Rule to the Pricing Flow. For more information, see [Add a Rule to the Pricing Flow](https://help.salesforce.com/s/articleView?id=ind.comms_pricing_rules.htm&release=264.0.0&type=5 "Pricing rules determine the price of the products in the cart. They use calculation procedures to calculate the appropriate prices and apply discounts. When you create a pricing rule, you specify a calculation procedure as the rule action.").
2. Click the **Orders** tab.
3. Create a new Order.
4. On the Order detail page, scroll down to the Order Manager.
5. Add the products that are relevant to the Pricing Rule.
6. Confirm that the price each product is correct.

## Add a Rule to the Pricing Flow

A pricing flow defines the sequential processing of rules and logic.

1. From Setup, in the **Quick Find** box, enter Flows.
2. Click **Flows**.
3. Click **Pricing Rules Flow**.
    
    ![The Flows page with Pricing Rules Flow in the list.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-comms_media_energy_managed-264-0-0-production-enus/ff4079f6-a384-475c-b863-578bbbb0ef9b/resources-product/images/add_a_rule_to_the_pricing.jpg)
4. Open the flow.
    
    <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
                <colgroup>
                  <col>
                  <col>
                </colgroup>
                <thead class="slds-text-title_caps ">
                  <tr class="">
                    <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d320638e589">
                      <p style="margin-bottom:0;">If…</p>
                    </th>
                    <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d320638e595">
                      <p style="margin-bottom:0;">Then…</p>
                    </th>
                  </tr>
                </thead>
                <tbody>
                  <tr class="">
                    <td data-label="If…" class="slds-cell-wrap" style="vertical-align:top;" headers="d320638e589 ">
                      <p style="margin-bottom:0;">An active flow is not present</p>
                    </td>

                    <td data-label="Then…" class="slds-cell-wrap" style="vertical-align:top;" headers="d320638e595 ">
                      <p style="margin-bottom:0;">Next to the latest inactive flow, click <strong class="uicontrol">Open</strong>.</p>
                    </td>

                  </tr>
                  <tr class="">
                    <td data-label="If…" class="slds-cell-wrap" style="vertical-align:top;" headers="d320638e589 ">
                      <p style="margin-bottom:0;">An active flow is present</p>
                    </td>

                    <td data-label="Then…" class="slds-cell-wrap" style="vertical-align:top;" headers="d320638e595 ">
                      <p style="margin-bottom:0;">Deactivate the latest flow, and then click <strong class="uicontrol">Open</strong>. Save the flow as a new version.</p>
                    </td>

                  </tr>
                </tbody>
              </table>
5. In the palette, scroll to the **Apex** section.
    
    ![The Apex section in the Flow Designer Palette.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-comms_media_energy_managed-264-0-0-production-enus/ff4079f6-a384-475c-b863-578bbbb0ef9b/resources-product/images/add_a_rule_to_the_pricing_1.jpg)
6. Select **vlocity\_cmt\_\_RuleAction** and drag it to the flow.
    
    The **vlocity\_cmt\_\_RuleAction** dialog box opens.
    
    ![The ​vlocity\_cmt\_\_RuleAction​​ dialog with the ApplyFrameContractToOppty rule.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-comms_media_energy_managed-264-0-0-production-enus/ff4079f6-a384-475c-b863-578bbbb0ef9b/resources-product/images/add_a_rule_to_the_pricing_2.jpg)
    
    - Enter a unique **Name** for the step.
    - On the Inputs tab, select **ruleType**. In the **Source** field, enter Pricing.
    - Click **Add Row**.
    - Select **ruleName**. In the **Source** field, enter the exact name of the pricing Rule. You may want to copy the Rule name and paste it to avoid errors.
    - Click **Add Row**.
    - Select **doCommit**. In the **Source** field, enter {!GlobalConstant.True}.
    - Click **OK**.
7. Connect the new step as the last step under the Is Order branch.
    
    ![The flow with the Is Order branch.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-comms_media_energy_managed-264-0-0-production-enus/ff4079f6-a384-475c-b863-578bbbb0ef9b/resources-product/images/add_a_rule_to_the_pricing_3.jpg)