---
schema_version: "1"
id: 9f5c9b09cea014bf2b2b3aae45503fb84d9080a1cb971d58f9add7a732e960b7
title: AccountPlanObjMeasCalcDef
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_accountplanobjmeascalcdef.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_accountplanobjmeascalcdef.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 77ab0c993f7b552a74d9001fc27577f3cce8ce081f6645e362892c2b482bb030
description: Represents the metadata associated with an account plan objective measure calculation definition. An account plan objective measure calculation definition contains a target object, rollup field, and logic for calculating the current value of a sales account plan objective measure.
---
# AccountPlanObjMeasCalcDef

Represents the metadata associated with an account plan objective measure calculation definition. An account plan objective measure calculation definition contains a target object, rollup field, and logic for calculating the current value of a sales account plan objective measure.

![Important](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png)

#### Important

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

## Parent Type

This type extends the [Metadata](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm "The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.") metadata type and inherits its fullName field.

## File Suffix and Directory Location

AccountPlanObjMeasCalcDef components have the suffix .accountPlanObjMeasCalcDef and are stored in the accountPlanObjMeasCalcDefs folder.

## Version

AccountPlanObjMeasCalcDef components are available in API version 63.0 and later.

## Special Access Rules

To access AccountPlanObjMeasCalcDef components, enable account plans.

## Fields

| Field Name | Description |
| --- | --- |
| conditions | 
Field Type

[AccountPlanObjMeasCalcCond](#AccountPlanObjMeasCalcCond)

Description

The field and value combinations for filtering records to include in the calculation definition.



 |
| description | 

Field Type

string

Description

A summary of the calculation definition that’s visible to users when they select the definition for an account plan objective measure.



 |
| developerName | 

Field Type

string

Description

Required.

The unique name of the object in the API. The name:

- must be 40 characters or fewer
- must begin with a letter
- can contain only underscores and alphanumeric characters
- can’t include spaces
- can’t end with an underscore
- can’t contain 2 consecutive underscores





 |
| masterLabel | 

Field Type

string

Description

Required.

Label for this calculation definition. This display value is the internal label that doesn't get translated.



 |
| rollupType | 

Field Type

string

Description

Required.

The method for calculating the account plan objective measure’s current value from records that match the calculation definition and any optional conditions.

Possible values are:

- Count
- Max
- Min
- Sum

In Setup, this field’s label is Calculation Type.



 |
| status | 

Field Type

string

Description

Required.

Specifies the status of the calculation definition. Possible values are:

- Active
- Draft
- Inactive

Only active calculation definitions are available for users to select when they specify an account plan objective measure.



 |
| targetField | 

Field Type

string

Description

The field on TargetObject to use for calculating the account plan objective measure’s current value. Rollup fields on the Campaign, Case, Contact, or Opportunity object are supported.

In Setup, this field’s label is Rollup Field.



 |
| targetObject | 

Field Type

string

Description

Required.

The object to use for calculating the account plan objective measure’s current value.

Possible values are:

- Campaign
- Case
- Contact
- Opportunity





 |

## AccountPlanObjMeasCalcCond

Represents a field and value combination for filtering records to include in the calculation of a sales account plan objective measure’s current value.

| Field Name | Description |
| --- | --- |
| fieldName | 
Field Type

string

Description

Required.

A field on the calculation definition’s TargetObject that you want to filter by. Fields on the Campaign, Case, Contact, or Opportunity objects are supported.



 |
| operation | 

Field Type

string

Description

Required.

The logical operator for matching records with the specified field value.

Possible values are:

- Contains
- Equals
- GreaterOrEqual
- GreaterThan
- LessOrEqual
- LessThan
- NotContain
- NotEqual
- StartsWith





 |
| value | 

Field Type

string

Description

Required.

The value to match for the specified field.



 |

## Declarative Metadata Sample Definition

The following is an example of an AccountPlanObjMeasCalcDef component.

<?xml version="1.0" encoding="UTF-8"?>
<AccountPlanObjMeasCalcDef xmlns="http://soap.sforce.com/2006/04/metadata">
	<conditions\>
		<fieldName\>StageName</fieldName\>
		<operation\>Equals</operation\>
		<value\>ClosedWon</value\>
	</conditions\>
	<description\>Define sales revenue goals. Current Value will be 
		auto-calculated as the sum of your selected Opportunities 
		Amount with 'Closed Won' Stage.
	</description\>
	<developerName\>Opportunity\_Revenue\_Targets</developerName\>
	<masterLabel\>Opportunity Revenue Targets</masterLabel\>
	<rollupType\>Sum</rollupType\>
	<status\>Active</status\>
	<targetField\>Amount</targetField\>
	<targetObject\>Opportunity</targetObject\>
</AccountPlanObjMeasCalcDef\>

The following is an example package.xml that references the previous definition.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
     <types\>
         <members\>Opportunity\_Revenue\_Targets</members\>
         <name\>AccountPlanObjMeasCalcDef</name\>
     </types\>
     <version\>63.0</version\>
</Package\>