LearningItemType

Represents a custom exercise type that an Enablement user takes in an Enablement program in the Guidance Center. A custom exercise type also requires a corresponding LearningItem record for the Guidance Center and corresponding EnblProgramTaskDefinition and EnblProgramTaskSubCategory records for when admins create a program in Program Builder.

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 

LearningItemType components have the suffix .learningItemType and are stored in the learningItemTypes folder.

Version 

Introduced in API version 62.0.

Special Access Rules 

  • For Enablement admins to create, update, and delete Enablement programs, the Design and Deliver Enablement Programs permission is required. This permission is enabled by default as part of the Manage Enablement Essentials permission set, which comes with the Enablement add-on license.
  • For users who take Enablement programs, the Take Enablement Programs permission is required. This permission is enabled by default as part of the Use Enablement Programs permission set, which comes with the Enablement add-on license.

Custom exercises aren’t compatible with Partner Enablement programs.

Important

Fields 

apexEvaluationHandler 

  • Type: string
  • Required: No
  • Description: The ID of the Apex class that specifies how progress and completion of the custom exercise is assessed when users take the program in the Guidance Center.

apexSerializerDeserializer 

  • Type: string
  • Required: No
  • Description: The ID of the Apex class that specifies how data related to the custom exercise type is retrieved and deployed with change sets or managed packages.

customField 

  • Type: string

  • Required: Yes

  • Description: Required. The programmatic name of a custom lookup field on the LearningItem object that references the custom object used with this custom exercise.

    For example, if a custom exercise type shows a screen flow, maybe the custom object’s name is ScreenFlow_Object__c and the custom field on LearningItem is named ScreenFlow_Field__c. For details, see Implement Custom Exercise Types for Enablement Programs in the Sales Programs and Partner Tracks with Enablement Developer Guide.

    This field is unique within your organization.

customObject 

  • Type: string

  • Required: Yes

  • Description: Required. The programmatic name of the custom object used with this custom exercise.

    For example, if a custom exercise type shows a screen flow, maybe the custom object’s name is ScreenFlow_Field__c. For details, see Implement Custom Exercise Types for Enablement Programs in the Sales Programs and Partner Tracks with Enablement Developer Guide.

    This field is unique within your organization.

developerName 

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

icon 

  • Type: string
  • Required: Yes
  • Description: Required. The icon to use for the custom exercise type in the Guidance Center.

lightningComponentDefinition 

  • Type: string

  • Required: Yes

  • Description: Required. The ID of the Lightning Web Component used to show the custom exercise’s content when a user opens the exercise in the Guidance Center.

    This field sets the value of the LightningComponentName field on the LearningItemType object.

masterLabel 

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

Declarative Metadata Sample Definition 

The following is an example of a LearningItemType component for a custom exercise type that shows a screen flow.

1<?xml version="1.0" encoding="UTF-8"?>
2<LearningItemType xmlns="http://soap.sforce.com/2006/04/metadata">
3    <apexEvaluationHandler>ScreenFlowEvaluationHandler</apexEvaluationHandler>
4    <apexSerializerDeserializer>ScreenFlowSerializerDeserializer</apexSerializerDeserializer>
5    <customField>ScreenFlow_Field__c</customField>
6    <customObject>ScreenFlow_Object__c</customObject>
7    <developerName>ScreenFlowLearningItemType</developerName>
8    <icon>standard:flow</icon>
9    <lightningComponentDefinition>screenFlowViewer</lightningComponentDef>
10    <masterLabel>Screen Flow Exercise</masterLabel>
11</LearningItemType>

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>ScreenFlowLearningItemType</members>
5        <name>LearningItemType</name>
6    </types>
7    <version>62.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.