---
schema_version: "1"
id: b0de2fe092a2d9de6bd1458f7fbcf461a3487280bfe14b62cf7eac5352a0735e
title: Add Variables and Constants (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_add_variables_and_constants.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_add_variables_and_constants.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: c90842076ae9f3d3e033427c678a13695e36dd3c69d3011daf00152106a64fe7
description: For the managed package runtime, all calculation procedures require constants, variables, or both.
products:
  - Omnistudio
release: "264"
---
# Add Variables and Constants (Managed Package)

For the managed package runtime, all calculation procedures require constants, variables, or both.

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

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)

Note

You can't use the same name for a variable that you use for a constant. Variables and constants use the same namespace.

Here's how you add both variables and constants:

1. Add variables:
    
    1. In the Variables and Constants section, click **+Add Variable**.
    2. Enter variable data:
        
        - **Name**: A unique name for the variable.
        - **Data Type**: Choose one from the list.
        - **Precision**: Optional. Enter the level of precision you want Vlocity to adhere to for this variable. For example, enter 0.25 to make this variable's value precise to the nearest quarter of an integer. For a dollar value example, enter 10 to make the variable precise to the nearest $10.
            
            Enter 0 if this calculation procedure must use the precise value of this variable, with no slippage.
        - **Default Value**: Optional. Enter a value if this calculation procedure requires a value for this variable (it can't use a null).
            
            If you don't enter a default value, Vlocity sets this variable to null if no value is entered for the variable.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)
    
    Note
    
    Before you enter output variables, check the calculation matrices this calculation matrix will use.
    
    An input variable that requires a user input cannot be used as an output variable.
2. Add constants:
    
    1. In the Variables and Constants section, click **+Add Constant**.
    2. Enter the constant data:
        
        - **Name**: A unique name for the constant.
        - **Data Type**: Choose one of the available types.
        - **Precision**: Optional. Enter the level of precision you want Vlocity to adhere to for this constant. For example, enter 0.25 to make this constant's value precise to the nearest quarter of an integer. For a dollar value example, enter 10 to make the constant precise to the nearest $10.
            
            Enter 0 if this calculation procedure must use the precise value of this constant, with no adjustment.
        - **Value**: The value of this constant.
3. Click **Save Calculation Procedure**.