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.

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.

Important

Parent Type

This type extends the Metadata 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
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.

1<?xml version="1.0" encoding="UTF-8"?>
2<AccountPlanObjMeasCalcDef xmlns="http://soap.sforce.com/2006/04/metadata">
3	<conditions>
4		<fieldName>StageName</fieldName>
5		<operation>Equals</operation>
6		<value>ClosedWon</value>
7	</conditions>
8	<description>Define sales revenue goals. Current Value will be 
9		auto-calculated as the sum of your selected Opportunities 
10		Amount with 'Closed Won' Stage.
11	</description>
12	<developerName>Opportunity_Revenue_Targets</developerName>
13	<masterLabel>Opportunity Revenue Targets</masterLabel>
14	<rollupType>Sum</rollupType>
15	<status>Active</status>
16	<targetField>Amount</targetField>
17	<targetObject>Opportunity</targetObject>
18</AccountPlanObjMeasCalcDef>

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

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3     <types>
4         <members>Opportunity_Revenue_Targets</members>
5         <name>AccountPlanObjMeasCalcDef</name>
6     </types>
7     <version>63.0</version>
8</Package>