Package IDs and Aliases for Second-Generation Managed Packages

During the package lifecycle, packages and package versions are identified by an ID or package alias. When you create a second-generation managed package or package version, Salesforce CLI creates a package alias based on the package name, and stores that name in the packageAliases section of 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.

Package aliases are stored in the sfdx-project.json file as name-value pairs, in which the name is the alias and the value is the ID. You can modify package aliases for existing packages and package versions in the project file.

At the command line, you also see IDs for things like package members (a component in a package) and requests (like a sf package version create request).

As a shortcut, the documentation sometimes refers to an ID by its three-character prefix. For example, a package version ID always starts with 04t.

Note

Here are the most commonly used IDs.

ID Example Short ID Name Description
033J0000dAb27uxVRE Subscriber Package ID Use this ID when contacting Salesforce for packaging or security review support. To locate this ID for your package, run sf package list --verbose against the Dev Hub that owns the package.
04t6A0000004eytQAA Subscriber Package Version ID Use this ID to install a package version. Returned by sf package version create.
0Hoxx00000000CqCAI Package ID Use this ID on the command line to create a package version. Or enter it into the sfdx-project.json file and use the directory name. Generated by sf package create.
08cxx00000000BEAAY Version Creation Request ID Use this ID to view the status and monitor progress for a specific request to create a package version such as sf package version create report