---
schema_version: "1"
id: 1dfbacd0825404539fdc6a8420d84294f920aed548072eb1c14d2c42c5cb06f6
title: Calculation Procedures and Matrices (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_calculation_procedures_and_matrices.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_calculation_procedures_and_matrices.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: fb5071a24869aa903c705f6070497ff8897884a21cfe24d58fac84aaaaab58d8
description: For the managed package runtime, a calculation procedure is a series of calculations performed on matrix lookups and user-defined variables and constants. A calculation matrix is a table that looks up information using multiple input dimensions and returns the corresponding output value.
products:
  - Omnistudio
release: "264"
---
# Calculation Procedures and Matrices (Managed Package)

For the managed package runtime, a calculation procedure is a series of calculations performed on matrix lookups and user-defined variables and constants. A calculation matrix is a table that looks up information using multiple input dimensions and returns the corresponding output value.

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

**Calculation Procedures and Matrices**

![An Expression Set calls a Decision Matrix to get a quote.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/diagram_calculationsmatrices.png)

Calculation procedures and matrices can automate the creation of complex quotes. Together these can guide a customer or agent through a series of questions, pull data from various sources, and present one or more customized quotes or eligibility determinations. These can be quotes or eligibility determinations for:

- An individual health insurance plan via a website to a customer
- A term life quote via an agent
- A volume discount on an order
- A permit or application fee
- A person applying for benefits or services

Calculation procedures and matrices accept input from a Salesforce form, REST API, Omniscript, or Integration Procedure (in the data JSON). Inputs can come from more than one source. The output can be a proposal or PDF, or data for populating an Omniscript, Integration Procedure, form, list, JSON structure, or REST API request.

- **[Calculation Example for Life Insurance Quote (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_calculation_example_for_life_insurance_quote.htm&release=264.0.0&type=5)**  
    For the managed package runtime, to provide an accurate quote, an agent must know a person’s age, home ZIP code, and whether they smoke. First, a form prompts for the needed data, from an agent or web self-service. When the form is submitted, a calculation procedure defined for that form runs. The first procedure step is a Matrix Lookup, which looks across the matrix input fields—Smoker, ZIP, and Age—to find the corresponding output (Rate).
- **[Calculation Matrices (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_calculation_matrices.htm&release=264.0.0&type=5)**  
    For the managed package runtime, calculation matrices are one of the key elements of a Vlocity rating engine. Vlocity uses calculation matrices to look up inputs, match them to outputs, and provide the outputs to calculation procedures.
- **[Calculation Procedures Overview (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_calculation_procedures_overview.htm&release=264.0.0&type=5)**  
    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.
- **[Declarative Calculation Procedures (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_declarative_calculation_procedures.htm&release=264.0.0&type=5)**  
    For the managed package runtime, declarative calculation procedures are a key component of the ratings engine. Along with calculation matrices, calculation procedures are the key components of any or ratings engine. Calculation procedures take an input JSON and run through a series of matrix lookups (calling values from calculation matrices) and calculations to calculate ratings for policy products.