Configure Unlocked Packages

You include an entry in the sfdx-project.json file for each package to specify its alias, version details, dependencies, features, and org settings. From the command line, you can also set or change options, such as specifying an installation key, update the package name, or add a description.

  • Project Configuration File for Unlocked Packages

    The project configuration file is a blueprint for your project. The settings in the file create an outline of your package and determine the package attributes and package contents.

  • Unlocked Packaging Keywords

    A keyword is a variable that you can use to specify a package version number.

  • Package Installation Key

    To ensure the security of the metadata in your package, you must specify an installation key when creating a package version. Package creators provide the key to authorized subscribers so they can install the package. Package installers provide the key during installation, whether installing the package from the CLI or from a browser. An installation key is the first step during installation. The key ensures that no package information, such as the name or components, is disclosed until the correct installation key is supplied.

  • Extract Dependency Information from Unlocked Packages

    For an installed unlocked package, you can now run a simple SOQL query to extract its dependency information. You can also create a script to automate the installation of unlocked packages with dependencies.

  • Understanding Namespaces

    A namespace is a 1-15 character alphanumeric identifier that distinguishes your package and its contents from other packages in your org.

  • Share Release Notes and Post-Install Instructions

    Share details about what’s new and changed in a released unlocked package with your users.

  • Specify Unpackaged Metadata or Apex Access for Apex Tests (Unlocked Packages)

  • Best Practices for Unlocked Packages

    We suggest that you follow these best practices when working with unlocked packages.

  • Package IDs and Aliases for Unlocked Packages

    During the package lifecycle, packages and package versions are identified by an ID or package alias. When you create a package or package version, Salesforce CLI creates a package alias based on the package name, and stores that name in the sfdx-project.json file. When you run CLI commands or write scripts to automate packaging workflows, it’s often easier to reference the package alias, instead of the package ID or package version ID.

  • Frequently Used Unlocked Packaging Operations