Namespace prefixes on packaged component API names
Key Takeaway
Through the API, you must use a managed package's prefixed names: if the namespace prefix is abc, you reach Expense__c as abc__Expense__c.
A namespace prefix, also called a namespace, is a short identifier that a developer registers for a managed package so that the package's components never clash with anyone else's. App builders need to know about namespace prefixes because they change the names you must use to reach those components through the API.
Registering a namespace prefix
A namespace prefix sets a package and its contents apart from packages made by other developers on AppExchange. A developer registers it when creating a first-generation managed package.
A namespace prefix must be globally unique across all Salesforce orgs, so no two developers can hold the same one. Namespace prefixes are also case-insensitive. ABC and abc are not treated as unique, so changing the capitalization does not create a different namespace prefix.
A valid namespace prefix must follow these rules:
- It begins with a letter.
- It contains 1 to 15 alphanumeric characters.
- It does not contain two consecutive underscores.
For example, myNp123 and my_np are valid. 123Company is not valid because it starts with a number. my__np is not valid because it contains two consecutive underscores.