---
schema_version: "1"
id: 4cbb1a2e057be64bec2ae2ab8ad57d7d7aff6faeefb32580755f7552c1bfca71
title: Calculation Procedures for Attribute-Based Pricing
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_calculation_procedures_for_attribute_based_pricing.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_calculation_procedures_for_attribute_based_pricing.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1323e541cb455d327334d7d679cc72cb328c3f13ea381d8f6957e257aebfbe8c
description: To speed your deployment, ​Salesforce Industries Communications, Media, and Energy provides preconfigured calculation procedures and matrices for attribute-based pricing.
products:
  - Communications
  - Media
  - Energy and Utilities
release: "264"
---
# Calculation Procedures for Attribute-Based Pricing

To speed your deployment, ​Salesforce Industries Communications, Media, and Energy provides preconfigured calculation procedures and matrices for attribute-based pricing.

If you have installed the Attribute/Volume Based Pricing DataPack, you have the following records in your org.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d118316e40">
              <p style="margin-bottom:0;">Calculation Procedure</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d118316e46">
              <p style="margin-bottom:0;">Calculation Matrix</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d118316e52">
              <p style="margin-bottom:0;">DataPack</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Calculation Procedure" class="slds-cell-wrap" style="vertical-align:top;" headers="d118316e40 ">
              <p style="margin-bottom:0;">
                <strong class="uicontrol">AttributePricingProcedure</strong>
              </p>
            </td>

            <td data-label="Calculation Matrix" class="slds-cell-wrap" style="vertical-align:top;" headers="d118316e46 ">
              <p style="margin-bottom:0;">
                <strong class="uicontrol">AttributePricingMatrix</strong>
              </p>
            </td>

            <td data-label="DataPack" class="slds-cell-wrap" style="vertical-align:top;" headers="d118316e52 ">
              <p style="margin-bottom:0;">
                <samp class="filepath">AttributePricingDataPack.json</samp>
              </p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Calculation Procedure" class="slds-cell-wrap" style="vertical-align:top;" headers="d118316e40 ">
              <p style="margin-bottom:0;">
                <strong class="uicontrol">SourceTargetAttributePricingProcedure</strong>
              </p>
            </td>

            <td data-label="Calculation Matrix" class="slds-cell-wrap" style="vertical-align:top;" headers="d118316e46 ">
              <p style="margin-bottom:0;">
                <strong class="uicontrol">SourceTargetAttributePricingMatrix</strong>
              </p>
            </td>

            <td data-label="DataPack" class="slds-cell-wrap" style="vertical-align:top;" headers="d118316e52 ">
              <p style="margin-bottom:0;">
                <samp class="filepath">SourceTargetAttributePricingDataPack.json</samp>
              </p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Calculation Procedure" class="slds-cell-wrap" style="vertical-align:top;" headers="d118316e40 ">
              <p style="margin-bottom:0;">
                <strong class="uicontrol">RangeAttributePricingProcedure</strong>
              </p>
            </td>

            <td data-label="Calculation Matrix" class="slds-cell-wrap" style="vertical-align:top;" headers="d118316e46 ">
              <p style="margin-bottom:0;">
                <strong class="uicontrol">RangeAttributePricingMatrix</strong>
              </p>
            </td>

            <td data-label="DataPack" class="slds-cell-wrap" style="vertical-align:top;" headers="d118316e52 ">
              <p style="margin-bottom:0;">
                <samp class="filepath">RangeAttributePricingDataPack.json</samp>
              </p>
            </td>

          </tr>
        </tbody>
      </table>

Each DataPack contains a calculation procedure and a matrix that supports one of the three approaches to attribute-based pricing.

The attribute-based pricing calculation procedures look up data from their calculation matrices. These calculation procedures are invoked by the PricingPlanHelper Apex class. In order for the output to be returned correctly, the procedures must have the following variables defined.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d118316e175">
              <p style="margin-bottom:0;">Variable Name</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d118316e181">
              <p style="margin-bottom:0;">Data Type</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d118316e187">
              <p style="margin-bottom:0;">Description</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Variable Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d118316e175 ">
              <p style="margin-bottom:0;">REC_MNTH_STD_PRC</p>
            </td>

            <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d118316e181 ">
              <p style="margin-bottom:0;">Currency</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d118316e187 ">
              <p style="margin-bottom:0;">Pricing variable code that maps to
                <strong class="uicontrol">vlocity_cmt__RecurringCharge__c</strong>
                field
              </p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Variable Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d118316e175 ">
              <p style="margin-bottom:0;">OT_STD_PRC</p>
            </td>

            <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d118316e181 ">
              <p style="margin-bottom:0;">Currency</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d118316e187 ">
              <p style="margin-bottom:0;">Pricing variable code that maps to
                <strong class="uicontrol">vlocity_cmt__OneTimeCharge__c</strong> field
              </p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Variable Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d118316e175 ">
              <p style="margin-bottom:0;">USAGE_STD_PRC</p>
            </td>

            <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d118316e181 ">
              <p style="margin-bottom:0;">Currency</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d118316e187 ">
              <p style="margin-bottom:0;">Pricing Variable that maps to
                <strong class="uicontrol">vlocity_cmt__UnitPrice__c</strong> field.
              </p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Variable Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d118316e175 ">
              <p style="margin-bottom:0;">UOM</p>
            </td>

            <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d118316e181 ">
              <p style="margin-bottom:0;">Text</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d118316e187 ">
              <p style="margin-bottom:0;">Pricing variable that maps the unit of measure to
                <strong class="uicontrol">vlocity_cmt__UsageMeasurementId__c</strong>
                field.
              </p>
            </td>

          </tr>
        </tbody>
      </table>

![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

There is no need to set Apex pre-processor and post-processor classes previously used for attribute-based pricing.

When you implement source-target attribute-based pricing, the **Matrix Lookup** calculation step for the **Target Product Name** must have the **Include in Calculation Output** flag checked in addition to the monthly recurring charge (MRC) and non-recurring charge (NRC) outputs. The pricing plan service uses the **Target Product Name** and any path parameters that are specified to determine the products to apply the MRC and NRC prices.

**Target Product Name needs Include In Calculation Output flag checked**

![Target Product Name needs Include In Calculation Output flag checked](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/lex_calc_procedure.png)

To include usage-based pricing in pricing calculations, you must configure two additional calculation steps for Unit of Measurement (UOM) and Unit Price (UP) and check the **Include in Calculation Output** flag. See Declarative Calculation Procedures for configuring calculation steps.

![Calculation Steps](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/screenshot_2020_03_27_at_10_23_30_am.png)

See [Setting Up a Custom Pricing Step for Attribute-Based Pricing](https://help.salesforce.com/s/articleView?id=ind.comms_set_up_a_custom_pricing_step_for_attribute_based_pricing.htm&release=264.0.0&type=5 "After you implement the Apex classes, calculation procedures, and matrices included in the Attribute/Volume Based Pricing DataPack, create a new step in the Default Pricing Plan.") to create a new step in the Default Pricing Plan.

## Testing Calculation Procedures and Calculation Matrices

To test the data you entered in your calculation matrices, go to the calculation procedure that calls it and use the Simulate function.

1. Navigate to the Vlocity Calculation Procedures tab, and find the calculation procedure that you installed from the DataPack.
2. In the **Vlocity Calculation Procedure Versions** related list, click the latest calculation procedure version.
3. In the **Vlocity Calculation Procedure Version Detail**, click **Simulate**.
4. Enter sample data for each variable, and then click **Simulate All Steps**.