---
schema_version: "1"
id: 9ea13842dd3dcaac54903f217b7310eb962ce44a45fa3a4622786504b0101fe8
title: Use Cases for Calculation Procedures (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_use_cases_for_calculation_procedures.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_use_cases_for_calculation_procedures.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d1f850a18b5a1c6c1f3103f85e681942bbe25b22f5435bc80e49460f6af5e922
description: For the managed package runtime, here are ways to set up the possible use cases for calculation procedures that use or don't use attribute-based pricing or volume-based pricing.
products:
  - Omnistudio
release: "264"
---
# Use Cases for Calculation Procedures (Managed Package)

For the managed package runtime, here are ways to set up the possible use cases for calculation procedures that use or don't use attribute-based pricing or volume-based pricing.

![Managed Package app icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

Case 1 — No attribute-based pricing or volume-based pricing across multiple line items:

- Define the input Omnistudio Data Mapper filter on the OrderItem.
- Use a Data Mapper Extract for input and a Data Mapper Load for output.

Case 2 — Attribute-based pricing, but no volume-based pricing across multiple line items:

- You cannot specify the Data Mapper input in the Calculation Procedure.
- A preprocessor is required to format the input data and attribute information for use in the Calculation Matrix.
- In the unmanaged package, an Apex class named CalcProcPreProcessor formats the Data Mapper input as required to support attributes in the Calculation Matrix.
- A custom setting—CPPreProcObjectDRBundle—specifies the name of the input Data Mapper that the preprocessor uses.
- The object must be Opportunity, Order, or Quote.

Case 3 — Attribute-based pricing and volume-based pricing across line items:

- You cannot specify the input or output Data Mappers in the Calculation Procedure.
- A preprocessor is required to format the input data for use in the Calculation Matrix.
- A postprocessor is required to evaluate the quantities across all lines in the header object.
- Two Apex classes—CalcProcPreProcessor and CalcProcPostProcessor—are provided in the unmanaged package.
- Custom settings define the name of the input Data Mapper that the preprocessor uses and the output Data Mapper that the postprocessor uses.
    
    - CPPreProcObjectDRBundle
    - CPPostProcObjectDRBundle
- The object must be Opportunity, Order, or Quote.