Try Serpent Free
← Salesforce DevOps Glossary

Namespace

A unique prefix, up to 15 characters, that scopes every component in a package to avoid collisions in subscriber orgs.

Definition

A namespace is a unique prefix, registered once to a Dev Hub or packaging org and up to 15 characters long, that gets automatically attached to every Apex class, custom object, field, and other component in a package (MyNamespace__CustomObject__c). It exists so two unrelated packages installed in the same subscriber org never collide on API names. Managed packages require a namespace; unlocked packages can be namespaced or non-namespaced, though namespacing an unlocked package limits it to a single Dev Hub the same way a managed package is. Registering a namespace is effectively permanent, a Dev Hub can only ever register one, so ISVs typically make the decision early and treat it as fixed for the life of the product. Our managed vs unmanaged packages guide covers where namespace decisions matter most.

In practice

How it works in Serpent

Serpent builds namespaced and non-namespaced packages the same way, tracked by task and versioned through the same pipeline, so the namespace decision doesn't change how a team works day to day. For ISVs managing multiple namespaced packages, Serpent's dependency-aware promotion keeps component API names resolved correctly across builds. See package development in Serpent for the full ISV build workflow.

Commit-to-package mapping in Serpent
Common questions

Namespace, answered

Can I change a namespace after registering it?
No. A namespace is effectively permanent once registered to a Dev Hub, so it's worth deciding early.

Start free. No credit card, no install, no commitment.

Set up in under 15 minutes. No DevOps hire needed.

Curious about faster shipping before you dive in? Let's talk

Commitment free!