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.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
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.