---
schema_version: "1"
id: 245628cee47750263bd41f8252226766903e3650d94932544a89586c1494ad08
title: Use Apex to Define Pricing Logic (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_use_apex_to_define_pricing_logic.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_use_apex_to_define_pricing_logic.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: dd2778db267cd1c2ee530741704671ccc8d16e99ade12c4db8b8a67573b3469c
description: For the managed package runtime, to use Apex to define pricing logic, create a class-based Calculation Procedure. The Calculation Procedure name and action class name must be the same as the name of the Apex class. (To define pricing logic without using an Apex class, create a declarative Calculation Procedure.)
products:
  - Omnistudio
release: "264"
---
# Use Apex to Define Pricing Logic (Managed Package)

For the managed package runtime, to use Apex to define pricing logic, create a class-based Calculation Procedure. The Calculation Procedure name and action class name must be the same as the name of the Apex class. (To define pricing logic without using an Apex class, create a declarative Calculation Procedure.)

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

To create a Calculation Procedure:

1. Go to the **Vlocity Calculation Procedures** tab.
2. Click **New**.
3. From the **Record Type of new record** picklist, select **Class Based**.
4. Click **Continue**.
5. In the **Calculation Procedure Name** field, enter a name for the procedure.
6. In the **Description** box, enter a brief description.
7. Click **Save**.