Considerations for Packaging Enablement Programs and Dependencies
Before you create a second-generation managed package for Enablement programs, plan your strategy for including Enablement measures and exercise content. Support users who install your package by understanding the components you can upgrade.
You can include Enablement measures in the same package as the program that contains the outcome or milestones that reference the measures. Or you can package measures separately.
You can package Enablement measures that have a status of Draft or Published (Active).
Including prebuilt measures in a package results in a package-deployment error. If you plan to package a program that references prebuilt Enablement measures, first clone the prebuilt measure. Reference the cloned measure in your program, and then package the program and the cloned measure.
Take program exercise content from the Enablement workspace in the Digital Experiences app and include it in the same package as the program. When you package the workspace and its content, specify a new name and API name for the workspace that you install in the destination org. Next, update the program's references to the packaged content. See Modify the Retrieved Metadata for Digital Experiences Content.
Because only content with a status of Published can be used in a program, all content included in the package is set to Published when the package is installed. This is different behavior from when you package Digital Experiences content outside the Enablement workspace, where you can package and deploy content of other statuses. When you retrieve content to include in a package, take care to retrieve only the content from the Enablement workspace.
For Feedback Request exercises that use peer and manager feedback, create and deploy a package for the assessment survey first. Then create a package for the program, with a dependency on the package that contains the assessment survey. See Create Dependencies Between Second-Generation Managed Packages in the Second-Generation Managed Packaging Developer Guide.
For packaging assessment surveys, use the Flow metadata type. Use the FlowDefinition metadata type only if you’re deploying programs with change sets. You can’t package Feedback Request exercises that use Einstein Coach.
Including the default assessment survey, Discovery Call Assessment, in a package results in a package-deployment error. If you plan to package a program that references the default assessment survey, first clone the assessment survey. Reference the cloned assessment survey in your program, create and deploy a package with the cloned assessment survey, and then create and deploy a package for the program.
If a packaged program includes custom exercises, make sure that all the associated components are included in the package. See Retrieve Metadata for Custom Exercise Types.
In a new version of the package, you can upgrade program dependencies, including measures, Digital Experiences, and custom exercise types. But programs are subscriber-controlled, so if users have already installed a program from a package, they can’t receive updates to the program by installing a new package version.
Instead, we recommend that you clone a program that you previously packaged and create a version of the package that includes the cloned program.
If you included a custom exercise type in a previous version of a packaged program and then you remove the custom exercise in a new version of the package, package creation fails. To continue, submit a Salesforce Customer Support case and request permission to create a package by deleting managed components.
See Also
- Salesforce Help: Building Enablement Measures
- Salesforce Help: Managing Digital Experiences Content for Exercises in Enablement Programs
- Salesforce Help: Managing Assessment Surveys for Feedback Request Exercises