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 Metadata and inherits its fields.

File Suffix and Directory Location 

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

Version 

Introduced in API version 63.0.

Special Access Rules 

To access AccountPlanObjMeasCalcDef components, enable account plans.

Fields 

conditions 

  • Type: AccountPlanObjMeasCalcCond[]
  • Required: No
  • Description: The field and value combinations for filtering records to include in the calculation definition.

description 

  • Type: string
  • Required: No
  • Description: A summary of the calculation definition that’s visible to users when they select the definition for an account plan objective measure.

developerName 

  • Type: string
  • Required: Yes
  • Description: Required.

masterLabel 

  • Type: string
  • Required: Yes
  • Description: Required.

rollupType 

  • Type: string
  • Required: Yes
  • Description: Required.

status 

  • Type: string
  • Required: Yes
  • Description: Required.

targetField 

  • Type: string
  • Required: No
  • 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.

targetObject 

  • Type: string
  • Required: Yes
  • Description: Required.

AccountPlanObjMeasCalcCond Type 

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

Fields 

fieldName 

  • Type: string
  • Required: Yes
  • Description: Required.

operation 

  • Type: string
  • Required: Yes
  • Description: Required.

value 

  • Type: string
  • Required: Yes
  • Description: Required.

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>