PracticeVideosBlogFlashcards

11.3 Managed vs. Unmanaged Packages & Distribution

Key Takeaways

  • Unmanaged packages serve as one-time open-source templates; once installed, components become fully editable native metadata that cannot be upgraded and count against subscriber org limits.

  • Managed packages are designed for commercial distribution via the AppExchange, providing intellectual property protection (hidden Apex code), push upgrades, and a mandatory developer namespace.

  • AppExchange-certified managed packages do not count against subscriber organization edition limits for custom objects, custom fields, and tabs.

  • Second-Generation Unlocked Packages (2GP) offer enterprise IT teams modular, versioned, and upgradable deployment containers without code obfuscation or AppExchange licensing overhead.

  • In released managed packages, component-specific manageability rules restrict API changes and govern removal of supported components, safeguarding subscriber data integrity across upgrades.

Last updated: October 2026

Managed vs. Unmanaged Packages & Distribution

While change sets facilitate deployment between directly connected sandboxes and production orgs, organizations frequently need to distribute applications, starter templates, and commercial solutions across completely unrelated Salesforce environments. In the Salesforce ecosystem, this is achieved through Packaging.

A package is a self-contained container of metadata components—such as custom objects, fields, flows, Apex classes, Lightning web components, and dashboard reports—bundled together for distribution. Understanding the architectural differences between Unmanaged Packages, Managed Packages, and modern Unlocked Packages is a vital competency for any Salesforce Platform App Builder.


Unmanaged Packages: Open-Source Application Templates

An Unmanaged Package is fundamentally a one-time distribution mechanism, similar to sharing open-source code or a project template. When an unmanaged package is installed into a target organization, its contents are unpacked and added directly into the subscriber org's local metadata schema.

Core Architectural Characteristics of Unmanaged Packages

  • Full Customizability: Once installed, the components behave as if an administrator created them natively in that organization. The subscriber can edit formula logic, modify Apex code, alter page layouts, add validation rules, or delete unused fields.
  • No Upgradeability: Unmanaged packages cannot be upgraded. Once installed, the developer has no mechanism to push updates or deliver patches to subscriber orgs. If the developer releases a "Version 2.0", installing it into an org that already contains "Version 1.0" will either fail due to naming conflicts or require uninstalling the previous version (which deletes all underlying data stored in custom objects and fields).
  • Zero Intellectual Property (IP) Protection: All Apex code, formulas, and architectural logic are completely visible to the installing organization.
  • Impact on Subscriber Org Limits: Every custom object, custom field, tab, and line of Apex code contained in an unmanaged package counts 100% against the subscriber org's edition limits (e.g., Enterprise Edition limits on total custom objects).
  • No Namespace Required: Unmanaged packages do not require a developer namespace prefix. Components exist within the default local namespace (c).
[Developer Org] ── Creates Unmanaged Package ──> [Distribution URL]
                                                         │
                                                 Installs into
                                                         ▼
                                              [Subscriber Org]
                                              • 100% Editable
                                              • Cannot be Upgraded
                                              • Counts Against Org Limits
                                              • No IP Protection

Note

Common Use Cases for Unmanaged Packages: Unmanaged packages are typically used by Salesforce Labs to distribute free, open-source utilities, starter kits, or sample demonstration apps where subscribers are expected to fork and customize the code to fit their unique business needs.


Managed Packages: Commercial AppExchange Solutions

A Managed Package is engineered for commercial Independent Software Vendors (ISVs) selling software on the Salesforce AppExchange. It provides a formal software distribution container that protects the developer's intellectual property while ensuring seamless lifecycle maintenance for the customer.

Core Architectural Characteristics of Managed Packages

  • Intellectual Property (IP) Protection: Apex code contained in a managed package is obfuscated. The subscriber cannot view or edit proprietary Apex classes ; global APIs expose a callable contract, not the underlying source code. IP protection is component-specific. Do not assume formulas, layouts, or every flow are hidden merely because Apex source is protected; inspect the component manageability table.
  • Seamless Upgradeability: Managed packages support formal versioning (Major, Minor, and Patch releases). Subscribers can upgrade to newer versions without losing existing data or custom field extensions. Furthermore, developers can initiate Push Upgrades, deploying security patches and feature updates directly to thousands of subscriber orgs simultaneously without customer intervention.
  • Mandatory Developer Namespace: Managed packages require a globally unique namespace (e.g., curo__ or fintech__). Every object, custom field, and component in the package is prefixed with this namespace (e.g., curo__Loan_Application__c), completely eliminating naming collisions with existing subscriber customizations.
  • Exemption from Subscriber Org Limits: Custom objects, custom fields, and custom apps included in an AppExchange-certified managed package do not count against the subscriber organization's edition limits. An Enterprise Edition customer with a limit of 200 custom objects can install a managed package containing 50 custom objects without consuming any of their remaining 200-object allowance.
  • Component Immutability & Deprecation Rules: To prevent upgrades from breaking subscriber systems or destroying customer data, Salesforce enforces strict immutability rules once a managed package version is marked Released:
    • Component removal is type- and packaging-generation-specific, with subscriber-data safeguards; some removals are supported through managed component deletion.
    • The developer cannot change the API names of existing components.
    • Released global API contracts cannot be changed freely; consult component-specific compatibility rules.
    • The developer can deprecate components, rendering them hidden from new installations while preserving them for existing subscribers.
  • License Management: ISVs track installations, manage trial periods, and assign per-user or site-wide licenses using the License Management App (LMA) connected to the AppExchange.

Comprehensive Architectural Comparison

Understanding the exact operational differences between packaging types is heavily emphasized on the certification exam:

Architectural DimensionUnmanaged PackageManaged Package (1GP)Unlocked Package (2GP)
Primary PurposeOpen-source templates & sample utilitiesCommercial ISV products sold on AppExchangeModular enterprise application development
Target AudienceOpen community, internal one-time reuseExternal customers & AppExchange subscribersInternal enterprise business units & sandboxes
UpgradeabilityNo (one-time metadata drop)Yes (subscriber install or Push Upgrades)Yes (versioned via Salesforce CLI)
IP ProtectionNone (100% visible & editable)High (Apex obfuscated; logic protected)None (visible to internal enterprise admins)
NamespaceNone (uses default local namespace)Mandatory globally unique namespaceOptional (can be namespaced or unnamespaced)
Org Limits ConsumptionCounts against applicable subscriber limitsEligible apps, tabs, objects, and fields can exceed edition allocations; hard limits remainCounts against applicable target org limits
Component DeletionFully deletable by subscriberRemoval governed by component type and managed package rulesFully manageable via version control
Authoring MechanismPoint-and-click in packaging orgDedicated packaging org (First-Gen)Source-driven via Salesforce CLI (Second-Gen)

Important

Limits Exemption Prerequisite: Managed packages only bypass subscriber organization limits if the package has completed and passed the official Salesforce AppExchange Security Review and is listed on the AppExchange. Private managed packages that have not passed security review still consume subscriber org limits.


Modern Packaging: Unlocked Packages & Package Development

Historically, enterprise customers used change sets for internal releases and managed packages for external sales. However, modern Salesforce Application Lifecycle Management (ALM) embraces the Package Development Model using Unlocked Packages (Second-Generation Packaging / 2GP).

What are Unlocked Packages?

Unlocked packages are designed specifically for internal IT development teams rather than commercial ISVs:

  • Source-Driven & Version-Controlled: Unlocked packages are not created by clicking around in a production org. They are defined in source code repositories (Git) and built using the Salesforce CLI (sf package version create).
  • Modular Architecture: Instead of deploying one massive monolithic change set, an enterprise can decompose its CRM into discrete packages: a Core_Financials package, a Service_Desk package, and a Sales_Analytics package.
  • Upgradable & Versioned: Unlocked packages can be upgraded cleanly across developer sandboxes, UAT, and production orgs. If a bug is fixed, a new package version (e.g., 1.2.0-1) is created and installed.
  • Org-Dependent Unlocked Packages: In situations where internal code references existing unmanaged metadata in production (such as standard fields or pre-existing legacy custom objects), teams can configure an org-dependent unlocked package. Dependency validation is deferred to installation in a target org containing the required unpackaged metadata; this is not automatic validation against production during package creation.

Tip

When to Choose Unlocked Packages: When an enterprise architecture question on the exam asks for a solution to distribute modular, versioned internal applications across multiple corporate Salesforce orgs with continuous integration/continuous deployment (CI/CD) pipelines, select Unlocked Packages.

Official Source Check

Checked October 19, 2026: Managed package component-specific rules.

Checked October 19, 2026: Managed-package field allocations and hard limits.

Loading diagram...
Packaging Strategy Architectural Decision Matrix
Test Your Knowledge

An enterprise development team is designing an internal billing calculation engine to be shared across five distinct Salesforce organizations owned by regional subsidiaries. The architecture team requires that the solution be version-controlled in Git, upgradable over time, and support automated continuous integration pipelines, but it does not require intellectual property protection or commercial license tracking. Which packaging strategy should the app builder recommend?

A

Outbound Change Sets routed through a central hub organization

B

An Unmanaged Package distributed via a private URL

C

A Managed Package registered with a commercial ISV namespace

D

An Unlocked Package (Second-Generation Packaging)

Test Your Knowledge

An Independent Software Vendor (ISV) plans to build and sell a specialized Project Management application on the Salesforce AppExchange. The application includes 30 custom objects, complex Apex calculation algorithms, and custom Lightning Web Components. Target customers are primarily Enterprise Edition subscribers, many of whom have already reached 85% of their custom object allocation limits. How should the ISV package and distribute this solution?

A

Distribute as an Unmanaged Package so subscribers can customize the underlying Apex code freely.

B

Distribute as a Managed Package that passes the official AppExchange Security Review.

C

Deploy via Inbound Change Sets to each subscriber's production environment using OAuth connections.

D

Build an Org-Dependent Unlocked Package with a globally unique customer namespace.

Test Your Knowledge

Universal Containers installs an open-source Project Tracker template from an unmanaged package into their production organization. Three months later, an administrator wants to customize the solution by modifying formula fields, adding two validation rules, and deleting four unnecessary custom fields that were installed with the package. What will occur when the administrator attempts these modifications?

A

The administrator can modify formulas, add validation rules, and delete the custom fields without restriction because unmanaged package components become native local metadata.

B

The modifications will succeed, but deleting the custom fields will fail because installed package components are permanently locked by the platform schema engine.

C

The administrator will be prompted to enter the developer's package namespace encryption key before any schema adjustments can be saved.

D

The unmanaged package must first be cloned into a change set before component properties or validation rules can be altered.

Sections you finish are checked off in the contents.