Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Creating a Namespace in Your Organization
If you’re not creating managed packages for distribution then registering a namespace prefix isn’t required, but it’s a best practice for all but the smallest organizations.
- Begin with a letter
- Contain one to 15 alphanumeric characters
- Not contain two consecutive underscores
For example, myNp123 and my_np are valid namespaces, but 123Company and my__np aren’t.
- From Setup, enter Package Manager in the Quick Find box and select Package Manager.
- In the Namespace Settings panel, click Edit.
- Enter the namespace you want to register.
- Click Check Availability to determine if the namespace is already in use.
- If the namespace prefix that you entered isn’t available, repeat the previous two steps.
- Click Review.
- Click Save.
Next, you can link the namespace to a Dev Hub org, which you can use to manage scratch orgs and build second-generation packages (2GP) for distribution.