Namespace registration is a partner-side activity. Customer orgs typically do not need this; only AppExchange partners packaging managed packages.
- Provision a Developer Edition org
Sign up for a free Developer Edition org at developer.salesforce.com. This becomes the Packaging Org for the partner.
- Verify the org as a Partner Packaging Org
Coordinate with Salesforce ISV Partner Program to register the org. The partner program grants additional capabilities for packaging work.
- Register the namespace
Setup, Package Manager, click Register. Enter the desired namespace (two to fifteen alphanumeric characters). Salesforce validates uniqueness across the platform.
- Build the managed package metadata
Develop the package contents (objects, fields, Apex, LWC) in the Packaging Org. Every component is automatically namespaced.
- Publish the package
Use the standard packaging workflow to publish. Subscribers install via the AppExchange listing.
- Consider 2GP for new work
2GP (Second-Generation Packaging) decouples namespace from Packaging Org and supports modern source-control workflows. Evaluate before committing to 1GP.
- Namespaces are permanent. Once registered, they cannot be changed; pick the namespace carefully.
- Customer orgs typically do not need namespaces. Reserve the registration for AppExchange partner work.
- Apex inside the package references metadata without the namespace prefix. Apex outside the package must include the prefix.
- 1GP and 2GP are different packaging models. 2GP is the modern direction; pick deliberately at project start.