---
schema_version: "1"
id: 7a13b41db00aaa510021bb38aa8c84d8eb670506eb8172141d09fe048dfd6762
title: Variables and Constants in 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_variables_and_constants_in_calculation_procedures.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_variables_and_constants_in_calculation_procedures.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 8cebb218b02005093c22ae094c2af261ad6c9d2e620ff7e6ec71ff5763e2df2a
description: For the managed package runtime, you must create variables, constants, and matrices before you can use them in a Calculation Procedure. After you create them, they will be available to use in Calculation Procedures.
products:
  - Omnistudio
release: "264"
---
# Variables and Constants in Calculation Procedures (Managed Package)

For the managed package runtime, you must create variables, constants, and matrices before you can use them in a Calculation Procedure. After you create them, they will be available to use in Calculation Procedures.

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

The following are a few guidelines for using variables in Calculation Procedures:

- Create a variable for every value in the calculation.
- A variable to the right of the equals sign (=) means that the equation output will be assigned as the variable value.
    
    For example, `x + y = variable` means the value of variable is now the sum of x + y.
- A variable to the left of the equals sign (=) means that the current value of the variable is part of the calculation.
    
    For example, `x + variable = y` means the value of y is now the sum of x plus the current value of the variable.
- A variable keeps the value assigned to it until another operation changes its value. For example:
    
    ```
    x = 2
    y = 3
    variable = 0
    variable = 0
    ```
    
    Step 1: `x + y = variable` // 2 + 3 = 5. variable = 5
    
    Step 2: `y + y = variable` // 3 + 3 = 6. variable = 6
    
    Step 3: `variable + y = variable` // 6 + 3 = 9. variable is now 9.
    
    Step 4: `variable + variable = variable` // 9 + 9 = 18. variable is now 18.