Newer Version Available

This content describes an older version of this product. View Latest

Register a Namespace for a First-Generation Managed Package

A namespace is a one to 15-character alphanumeric identifier that distinguishes your package and its contents from packages of other developers on AppExchange. Namespace prefixes are case-insensitive. For example, ABC and abc aren’t recognized as unique. Your namespace must be globally unique across all Salesforce orgs.

Building a new app? Have you considered using second-generation managed packages? Flexible versioning and the ability to share a namespace across packages are just two reasons why developers love creating second-generation managed packages. We think you’d love it, too. To learn more, see: Why Switch to Second-Generation Managed Packages, and Comparison of First- and Second-Generation Managed Packages.

Note

When creating a namespace, use something that’s useful and informative to users. However, don’t name a namespace after a person (for example, by using a person's name, nickname, or private information.)

Warning

Salesforce automatically prepends your namespace, followed by two underscores (”__”), to all unique component names in your Salesforce org. A unique package component is one that requires a name that no other component has within Salesforce, such as custom objects, custom fields, custom links, and validation rules. For example, if your namespace is abc and your managed package contains a custom object with the API name, Expense__c, use the API name abc__Expense__c to access this object using the API. The namespace is displayed on all component detail pages.

Your namespace must:

  • 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.

To register a namespace:

  1. From Setup, enter Package Manager in the Quick Find box and select Package Manager.
  2. In the Namespace Settings panel, click Edit.

    After you’ve configured your namespace settings, this button is hidden.

    Note

  3. Enter the namespace you want to register.
  4. To determine if the namespace is already in use, click Check Availability.
  5. If the namespace prefix that you entered isn’t available, repeat the previous two steps.
  6. Click Review.
  7. Click Save.