Calculation Procedures Overview (Managed Package)

For the managed package runtime, a Calculation Procedure is a series of calculations performed using matrix lookups and user-defined variables and constants. A calculation procedure can call Apex classes for pre- and post-calculation custom logic. Calculation procedures are part of pricing rules.

Managed Package app icon This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.

There are two types of calculation procedures:

  • Class-based: Pricing logic is written in an Apex class.

  • Declarative: Pricing logic is implemented using matrix lookups, variables, constants, and basic math operations.

Declarative calculation procedures are associated with Omnistudio Data Mapper mappings. Declarative calculation procedures use Data Mappers to read and save data from Salesforce objects. You can add variables from the Data Mapper extract, such as Original Price (Currency) and Quantity (Number). For example, you can add a currency variable named UnitPrice as a calculation output that can be used in a Data Mapper load to update a field in a Salesforce object.

A calculation procedure can use two types of steps.

  • Matrix: If you have enabled Calculation Matrices, a calculation procedure can include a Calculation Matrix in the calculation steps. For more information about Calculation Matrices, see Calculation Matrices.

  • Formula: For example, you can specify the UnitPrice variable as output. If you are using Data Mapper mappings, the calculation procedure output variable name must match the Data Mapper Load input variable name

Each step in a Calculation Procedure can have a condition that must be met in order for the step to be executed. See Conditional Steps For Calculation Procedures.

In the Preprocessor Class Name section of the calculation procedure, you must specify the class that implements a nameSpace.VlocityOpenInterface calculation method.

To include the output from a calculation step in the final output, select Include in output.