EnablementMeasureDefinition

Represents an Enablement measure, which specifies the job-related activity that a user performs to complete a milestone or outcome in an Enablement program. A measure identifies a source object and optional related objects, with optional field filters and filter logic, for tracking the activity. To avoid deployment errors, deploy measures before you deploy programs.

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 

EnablementMeasureDefinition components have the suffix .enablementMeasureDefinition and are stored in the enablementMeasureDefinitions folder.

Version 

Introduced in API version 61.0.

Special Access Rules 

To access Enablement measures, the Design and Deliver Enablement Programs permission is required. This permission is available with the Enablement add-on license.

Fields 

description 

  • Type: string
  • Required: No
  • Description: An internal description for the measure to help Enablement admins understand the activity that’s tracked.

developerName 

  • Type: string
  • Required: Yes
  • Description: Required. The unique programmatic name for the measure record.

masterLabel 

  • Type: string
  • Required: Yes
  • Description: Required. A user-friendly name for the measure, which is defined when the measure is created.

sourceMeasureObject 

status 

  • Type: EnblProgramMeasureStatus (enumeration of type string)

  • Required: Yes

  • Description: Required. Indicates whether the measure is published for use in Enablement programs.

    Values are:

  • Possible values:

    • Draft — The measure is saved, but not activated for use in programs.
    • Published — The measure is activated for use in programs. In Lightning Experience, this value is Active.

EnablementMeasureFilterDefinition Type 

Represents the fields on the source object or related objects and the corresponding field values that further specify criteria for the activity you’re measuring.

Fields 

fieldApiName 

  • Type: string
  • Required: Yes
  • Description: Required. The unique programmatic name for the field that you’re filtering by. For example, if you’re tracking activity on the Opportunity object and want to filter by the Stage field, this value can be StageName.

fieldValue 

  • Type: string
  • Required: Yes
  • Description: Required. The field value to filter by. For example, if you’re tracking activity on the Opportunity object and want to filter by the Stage field, this value can be Closed Won.

operator 

  • Type: EnablementFilterOperator (enumeration of type string)

  • Required: Yes

  • Description: Required. The logic for evaluating the specified field and field value.

    Values are:

  • Possible values:

    • Contains
    • DoesNotContain
    • DoesNotEqual
    • EndsWith
    • Equals
    • GreaterThan
    • GreaterThanOrEqual
    • In
    • IsNull
    • LessThan
    • LessThanOrEqual
    • NotIn
    • StartsWith

sequenceNumber 

  • Type: int
  • Required: Yes
  • Description: Required. A number that specifies the order of the filter, relative to other filters, starting at 1.

EnablementMeasureRelatedObjectDefinition Type 

Represents objects related to the source object. Related objects can further specify criteria for the activity you’re measuring. Related objects can also have additional filters. For example, maybe you’re measuring deals won for a specific product line. In this case, the source object is Opportunity, the related object is Opportunity Product, and the related object can have a filter for the specific product name.

Fields 

filterLogic 

  • Type: string
  • Required: No
  • Description: An expression that determines how to evaluate the optional field filters for the object.

filters 

  • Type: EnablementMeasureFilterDefinition[]
  • Required: No
  • Description: The fields on the related object and the corresponding field values that further specify criteria for the activity you’re measuring.

idFieldApiName 

  • Type: string
  • Required: Yes
  • Description: Required. The programmatic name of the field that links the related object to the primary object. For example, if the primary object is Opportunity and the related object is Opportunity Product, this value is OpportunityId, the developer name of the Opportunity field on the Opportunity Product object.

objectApiName 

  • Type: string
  • Required: Yes
  • Description: Required. The unique programmatic name for the related object. For example, if the related object is Opportunity Product, this value is OpportunityLineItem.

EnablementMeasureSourceObjectDefinition Type 

Defines the source object, fields, field values, and calculation method for the job-related activity you’re measuring.

Fields 

aggregateFieldApiName 

  • Type: string

  • Required: No

  • Description: The unique programmatic name for the field that the aggregateFunction uses for calculating.

    For example, if you’re measuring how much revenue a sales rep has won, the value of aggregateFunction is Sum and the value of aggregateFieldApiName is Amount, which is the programmatic name of the Amount field on the Opportunity object.

aggregateFunction 

  • Type: EnablementAggregationType (enumeration of type string)

  • Required: Yes

  • Description: Required. The method for calculating progress towards the milestone or outcome from records that qualify for the measure’s criteria.

    Values are:

    For example, if you’re measuring the number of deals won, the function is Count.

    If the function is Average or Sum, aggregateFieldApiName is required.

  • Possible values:

    • Average
    • Count
    • Sum

dateFieldApiName 

  • Type: string
  • Required: Yes
  • Description: Required. The unique programmatic name for the field that defines when users get credit for the activity you’re measuring. For example, if you’re measuring the number of deals won, this value can be ClosedDate, the programmatic name of the Close Date field on the Opportunity object.

displayFieldApiName 

  • Type: string
  • Required: Yes
  • Description: Required. The unique programmatic name for the field that primarily identifies records that qualify for the activity you’re measuring. For example, if you’re measuring the number of deals won, you’re tracking the Opportunity object, and maybe you want to identify opportunities by their name. In this case, this field can be Name, the programmatic name of the Opportunity Name field on the Opportunity object.

filterLogic 

  • Type: string
  • Required: No
  • Description: An expression that determines how to evaluate the optional field filters for the object.

filters 

  • Type: EnablementMeasureFilterDefinition[]
  • Required: No
  • Description: The fields on the object and corresponding field values that further specify criteria for the activity you’re measuring.

objectApiName 

  • Type: string
  • Required: Yes
  • Description: Required. The unique programmatic name for the source object that tracks the activity you’re measuring. For example, if you’re measuring the number of deals won, this value is Opportunity, the programmatic name of the Opportunity object.

relatedMeasureObjects 

  • Type: EnablementMeasureRelatedObjectDefinition[]
  • Required: No
  • Description: The optional related objects that further specify criteria for the activity you’re measuring. Related objects can also specify additional filters.

userFieldApiName 

  • Type: string
  • Required: Yes
  • Description: Required. The unique programmatic name for the field that defines who gets credit for the activity you’re measuring. For example, if you’re measuring the number of deals won by a sales rep, this value can be OwnerId, the developer name of the Opportunity Owner field on the Opportunity object.

Declarative Metadata Sample Definition 

The following is an example of an EnablementMeasureDefinition component.

1<?xml version="1.0" encoding="UTF-8"?>
2<EnablementMeasureDefinition xmlns="http://soap.sforce.com/2006/04/metadata">
3    <description>Total amount in pipeline measure</description>
4    <developerName>TotalAmountInPipeline</developerName>
5    <masterLabel>Total Amount in Pipeline</masterLabel>
6    <status>Draft</status>
7    <sourceMeasureObject>
8        <aggregateFieldApiName>Amount</aggregateFieldApiName>
9        <aggregateFunction>Sum</aggregateFunction>
10        <dateFieldApiName>CreatedDate</dateFieldApiName>
11        <displayFieldApiName>Name</displayFieldApiName>
12        <objectApiName>Opportunity</objectApiName>
13        <userFieldApiName>OwnerId</userFieldApiName>
14        <filters>
15            <fieldApiName>StageName</fieldApiName>
16            <fieldValue>Closed Won</fieldValue>
17            <operator>Equals</operator>
18            <sequenceNumber>1</sequenceNumber>
19        </filters>
20        <relatedMeasureObjects>
21            <objectApiName>OpportunityLineItem</objectApiName>
22            <idFieldApiName>OpportunityId</idFieldApiName>
23            <filterLogic>1 OR 2</filterLogic>
24            <filters>
25                <fieldApiName>UnitPrice</fieldApiName>
26                <fieldValue>10000</fieldValue>
27                <operator>GreaterThan</operator>
28                <sequenceNumber>1</sequenceNumber>
29            </filters>
30            <filters>
31                <fieldApiName>TotalPrice</fieldApiName>
32                <fieldValue>10000</fieldValue>
33                <operator>GreaterThan</operator>
34                <sequenceNumber>2</sequenceNumber>
35            </filters>
36        </relatedMeasureObjects>
37    </sourceMeasureObject>
38</EnablementMeasureDefinition>

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>TotalAmountInPipeline</members>
5        <name>EnablementMeasureDefinition</name>
6    </types>
7    <version>61.0</version>
8</Package>

Wildcard Support in the Manifest File 

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.