Salesforce Managed and Unmanaged Packages

Salesforce packages are containers that bundle custom components into a single unit for distribution. There are two main types: Salesforce managed and unmanaged packages. Each type serves different purposes and offers unique benefits for developers and users.

Managed packages provide a secure, upgradable solution ideal for commercial applications, while unmanaged packages offer more flexibility for open-source projects and customization. Managed packages allow vendors to release updates, protect their intellectual property, and offer ongoing support. Unmanaged packages give developers full access to the source code, enabling them to modify and adapt the components as needed.

Choosing between managed and unmanaged packages depends on the project goals and requirements. Managed packages suit businesses looking for stable, supported solutions. Unmanaged packages work well for organizations that need to make extensive modifications or want to build upon existing templates.

Understanding the differences helps developers and admins decide which package type best fits their Salesforce implementation needs.

Table of Contents

Understanding Salesforce Packages

Salesforce packages are containers that bundle custom elements into a single unit. They help organize and share customizations across Salesforce orgs.

Components of a Salesforce Package

Salesforce packages can include various components:

  • Custom objects and fields
  • Apex classes and triggers
  • Visualforce pages and components
  • Lightning components
  • Workflows and processes
  • Reports and dashboards

These elements work together to create specific functionality. Developers can pick and choose which components to include based on their needs.

Packages also contain metadata. This describes the structure and settings of the components. It helps Salesforce understand how to set up the package in a new org.

Types of Salesforce Package

There are two main types of Salesforce packages:

  1. Managed Packages:
  • Built for distribution
  • Protected code and components
  • Upgradeable
  • Ideal for AppExchange products
  1. Unmanaged Packages:
  • Open source
  • Editable after installation
  • Not upgradeable
  • Good for sharing between orgs or template starting points

Each type has its uses. The choice depends on the goal of the package and who will use it.

Managed Packages

Managed and Unmanaged Package in Salesforce

Managed packages offer powerful features for Salesforce developers and businesses. They provide control, security, and easy distribution of apps and components.

Advantages of Managed Packages

Managed packages give developers more control over their creations. They protect code and allow for seamless updates, but users can’t see or change the underlying code.

These packages are ideal for selling on the AppExchange. They offer license management tools, which help track who’s using the app and for how long.

Managed packages also support version control. This lets developers release updates without breaking existing installations.

Creating a Managed Package

To create a managed package, developers start in a special Salesforce org called a packaging org. This org is separate from their main development environment.

Developers add custom objects, fields, and code to the package and then set up the package settings, including choosing which components to include.

Once ready, they upload the package to Salesforce. It goes through a review process before being listed on the AppExchange.

Version Control and Upgrades

Version control is a key feature of managed packages. Developers can release new versions of their apps over time, and users are notified when upgrades are available.

Upgrades can add new features or fix bugs. They don’t overwrite custom settings or data, making it safe for users to upgrade without losing their work.

Patch updates are also possible. These fix critical issues without changing the main version number.

License Management in Managed Packages

Managed packages come with built-in license management tools. Developers can set up different license types, including trial, time-based, and perpetual licenses.

These tools let developers track who’s using their app. They can see when licenses expire and send renewal reminders.

License management helps protect the developer’s work. It ensures users have proper permissions to access the package.

Managed Packages on the AppExchange

The AppExchange is Salesforce’s app marketplace. It’s where businesses can find and install managed packages.

Listings on the AppExchange include details about the app. Users can see screenshots, pricing, and reviews. This helps them decide if the app meets their needs.

Managed packages on the AppExchange go through a security review. This process checks for potential vulnerabilities or issues.

Security and Intellectual Property Protection

Security is a top priority for managed packages. The code is hidden from users, protecting the developer’s intellectual property.

Managed packages use a unique namespace. This prevents conflicts with other packages or custom development.

The security review process ensures packages meet Salesforce’s standards. It checks for common security issues and best practices.

Intellectual property protection extends beyond just hiding code. It also includes safeguards against unauthorized distribution or use of the package.

Unmanaged Packages

Unmanaged packages in Salesforce offer great flexibility for developers. They allow full customization and are ideal for open-source projects or testing new ideas.

Use Cases for Unmanaged Packages

Unmanaged packages work well for sharing code within an organization. They’re great for testing new features before a wider release. Many developers use them to create templates or starting points for custom apps.

These packages shine in situations needing quick changes. IT teams often pick them for internal tools that might need tweaks. They’re also famous for one-time installations where future updates aren’t needed.

Open-source Salesforce projects often use unmanaged packages. This lets other developers easily see and change the code.

Building an Unmanaged Package

Creating an unmanaged package is simple. Start by making the custom components you want to include. This can be custom objects, fields, or Apex code.

Next, go to the Setup menu and find the “Package Manager” section. Click “New” and give your package a name. Then, add your custom components to the package.

Once you’ve added everything, you can upload the package. This creates a link you can share with others. They can then install the package in their own Salesforce org.

Remember to test your package in a sandbox first. This helps catch any issues before sharing it with others.

Customization and Flexibility

Unmanaged packages give users complete control over the installed components. After installation, all parts of the package can be changed or removed.

This flexibility is great for adapting the package to specific needs. Users can tweak custom objects, fields, and code to fit their processes and add new features on top of the installed components.

Customization is unlimited. Everything from page layouts to Apex triggers can be adjusted. This makes unmanaged packages perfect for starting points that need heavy changes.

Considerations for Open-Source Projects

Open-source Salesforce projects often use unmanaged packages. They make it easy for others to see and work with the code.

When creating an open-source project, pick a good license. This tells others how they can use and share your work. The MIT and Apache licenses are common choices.

Include clear documentation. Explain how to install and use your package, as well as any dependencies or special setup steps.

Consider setting up a public repository on GitHub or a similar platform. This would allow others to report issues or suggest improvements.

Comparing Managed and Unmanaged Packages

Salesforce Managed and Unmanaged Packages

Managed and unmanaged packages in Salesforce offer different deployment, upgrade, and security options. Each type has its own strengths for different use cases.

Deployment and Distribution Strategies

Managed packages are great for commercial distribution. They have a unique namespace and hide source code, protecting the developer’s work.

Unmanaged packages are better for internal use or sharing open-source projects. They allow full access to the code and components.

Managed packages need a security review before listing on the AppExchange. This can take time, but ensures quality.

Unmanaged packages skip this review process. They can be shared right away, but there may be more risks.

Upgrade Paths and Versioning

Managed packages have smooth upgrade paths. New versions can be pushed out easily to all users.

Older versions stay active. This lets customers choose when to upgrade.

Unmanaged packages don’t have built-in upgrades. Any changes need manual updates by the admin.

This can be good for custom solutions. But it’s harder to keep track of versions across orgs.

Security Reviews and Namespace Considerations

Managed packages get a full security review. This makes them safer for wide use.

They also come with a unique namespace. This stops naming conflicts with other apps.

Unmanaged packages skip the security review. This means faster sharing but more risk.

They use the org’s default namespace, which can cause conflicts if two packages use the same names.

Admins have full control over unmanaged package components. They can change or remove parts as needed.

Managed packages lock some components. This keeps the app working as intended across all installs.

Best Practices for Salesforce Package Development

Good Salesforce package development requires careful planning and smart choices. These practices help create packages that work well and are easy to maintain.

Effective Version Control

Version control is critical for package development. Use tools like Git to track changes, which lets teams work together smoothly. Store all code, including Apex classes and components, in the version control system.

Make branches for new features. This keeps the main code safe. Test changes in a separate branch before adding them to the main code.

Use clear commit messages. They should explain what changed and why. This helps other developers understand the code history.

Set up a code review process. Have team members check each other’s work. This catches bugs early and improves code quality.

Maintaining Code Quality

High-quality code is vital for good packages. Write clear, easy-to-read Apex code. Use comments to explain complex parts.

Follow Salesforce coding best practices. This includes proper naming conventions and avoiding hardcoded values.

Run static code analysis tools. These find common issues before they cause problems.

Write thorough unit tests. Aim for high code coverage. Good tests catch bugs and make sure the code works as expected.

Keep code modular. Break large classes into smaller, focused ones. This makes the code easier to understand and update.

Streamlining the Upgrade Process

Plan for future upgrades when building packages. Use API versions that balance new features with long-term support.

Test upgrades in a sandbox before rolling out to production. This catches issues early.

For managed packages, use push upgrades when possible. They make updates easier for users.

Keep good release notes. List all changes, new features, and any needed admin actions.

Build in backward compatibility. This lets users upgrade without breaking their customizations.

Use patch updates for minor fixes. Save major version changes for big feature updates.

Licensing and Scalability

Salesforce Managed vs Unmanaged Package

Salesforce offers different licensing models for managed and unmanaged packages. These models affect how businesses can scale their use of Salesforce apps and solutions.

Understanding Salesforce Licensing Models

Managed packages come with built-in license management. This lets app creators control who can use their product. They can set up user-based licenses or org-wide licenses.

User-based licenses give access to specific people. Org-wide licenses let everyone in a Salesforce org use the app.

The License Management Application (LMA) helps track and manage these licenses. It shows who’s using the app and when licenses expire.

Unmanaged packages don’t have these license controls. Once installed, anyone in the org can use them.

Scalability for Growing Businesses

Managed packages make it easier for businesses to grow. They can add more users or features as needed, and the licensing system handles this smoothly.

Upgrades are simpler with managed packages. New versions can be pushed out to all users at once, keeping everyone on the same page.

Unmanaged packages are less scalable. Each org has its own copy of the code. This makes updates harder as the business grows.

Managed packages are often better for big companies. They can handle more users and complex setups without extra work.

The Role of Salesforce Partners

Salesforce partners play a key part in growing the platform’s ecosystem. They create valuable solutions and apps that extend Salesforce’s capabilities for customers.

Contributing to the Salesforce Ecosystem

Salesforce partners develop custom apps, components, and integrations that add functionality to the core platform. These include independent software vendors (ISVs) who build industry-specific tools and add-ons.

Partners go through a certification process to ensure their offerings meet Salesforce’s standards. This helps maintain quality across the ecosystem.

Many partners specialize in certain industries or business processes. They bring deep expertise to create targeted solutions for different customer needs.

Partners also provide implementation services, training, and support, expanding Salesforce’s reach and helping customers get more value from the platform.

Partner Solutions on AppExchange

The Salesforce AppExchange is the main marketplace for partner-built apps and solutions. It hosts thousands of apps created by Salesforce partners.

Customers can easily find, test, and install these apps to enhance their Salesforce org. The AppExchange includes both free and paid offerings.

Apps on AppExchange undergo security reviews before listing. This gives customers confidence in the quality and safety of partner solutions.

Many AppExchange apps come as managed packages. These allow for seamless updates and protect the partner’s intellectual property.

The AppExchange helps partners reach Salesforce’s large customer base. It provides a platform to showcase their expertise and innovations.

Supporting Tools and Resources

Salesforce provides key tools and resources to assist developers working with managed and unmanaged packages. These include dedicated testing and development environments, templates, and guides to streamline the package creation process.

Developer Edition Environments

Developer Edition orgs are free Salesforce environments for building and testing packages. They offer a sandbox-like space to create and modify code without affecting production data. Developers can sign up for these orgs to experiment with both managed and unmanaged packages.

These environments come pre-loaded with sample data and basic Salesforce features, allowing developers to test package functionality in a realistic setting. Developer Edition orgs also support unique naming conventions, which is crucial for avoiding conflicts when deploying packages to customer orgs.

Templates and Resources for Developers

Salesforce provides a range of templates and resources to speed up package development. These include sample code snippets, best practice guides, and pre-built components that developers can use as starting points for their projects.

The Salesforce Developer Documentation offers detailed guides on package creation, covering topics like metadata structure and automated build processes. These resources help ensure consistent quality across different types of packages.

Trailhead, Salesforce’s learning platform, features modules on package development. These interactive courses walk developers through creating, testing, and distributing both managed and unmanaged packages.

Advanced Features and Customizations

Salesforce packages offer powerful options for extending functionality. Custom objects, fields, code, and reporting tools allow developers to create tailored solutions. These features enable organizations to build unique apps that meet specific business needs.

Leveraging Custom Objects and Fields

Custom objects let users store unique data in Salesforce. Developers can create objects to track products, projects, or business-specific information. Custom fields add extra data points to standard or custom objects.

For example, a company might make a “Project” custom object with fields like “Start Date” and “Budget.” This allows project details to be tracked alongside other Salesforce data.

Custom objects work with standard Salesforce features like reports and process automation, making them very flexible for building tailored apps.

Utilizing Apex Classes and Lightning Components

Apex is Salesforce’s programming language. It lets developers write custom business logic and create complex automation. Apex classes can handle data processing, integrations, and more.

Lightning components are reusable interface elements built with the Lightning Component Framework. They create modern, responsive user interfaces for Salesforce apps.

Together, Apex and Lightning components enable rich, interactive experiences. Developers can build custom pages, buttons, and tools that look and work exactly how users need them to.

Creating Tailored Reports and Dashboards

Custom reports and dashboards help users analyze data specific to their business processes. Organizations can create reports on standard or custom objects, including any custom fields.

Reports can utilize filters, formulas, and groupings to display exactly the data users need, while dashboards present this information visually through charts and graphs.

For instance, a sales team might build a dashboard showing deal pipelines, win rates, and top performers. This gives a quick insight into sales performance using real-time data.

Custom report types allow reporting on related objects, opening up even more analysis options.

Deployment and Simplified Upgrade Paths

Managed packages offer streamlined deployment in Salesforce. They come pre-configured, allowing for quick installation across different organizations.

Unmanaged packages require more careful integration. Organizations must test these packages thoroughly to ensure they work well with existing customizations.

Upgrade paths differ significantly between the two package types. Managed packages provide simplified upgrades handled by the vendor. These updates deploy smoothly to user environments without much effort from the organization.

Unmanaged packages need manual updates. This process can be time-consuming and may require extensive testing to avoid conflicts with other customizations.

The simplified deployment of managed packages can be cost-effective for organizations. It reduces the time and resources needed for installation and maintenance.

Managed packages also offer version control benefits. This feature helps organizations keep track of changes and roll back if needed.

Unmanaged packages give more control over the code. However, this control comes with increased responsibility for updates and maintenance.

Organizations must weigh these factors when choosing between managed and unmanaged packages. The decision impacts long-term deployment strategies and upgrade processes in Salesforce.

Salesforce Managed vs Unmanaged Package: Summary

FeatureManaged PackageUnmanaged Package
CustomizationLimited components lockedFully customizable
UpgradesCan be upgradedIt cannot be upgraded
DistributionIdeal for commercial appsSuited for open-source projects
SecurityEnhanced protectionLess secure
SupportVendor-providedSelf-managed
DeploymentEasier, fasterIt may require more time
CompatibilityAssured with Salesforce updatesNot guaranteed
DevelopmentRequires specialized knowledgeMore flexible for developers

Managed packages offer a secure, upgradable solution with vendor support. They work well for commercial applications and provide smoother deployments.

Unmanaged packages allow full customization and are better for open-source projects or app templates. They give developers more flexibility but require more hands-on management.

The choice between managed and unmanaged packages depends on specific project needs and organizational requirements. Each type has its strengths and limitations.

Frequently Asked Questions

Salesforce packages come in different types, each with unique features and use cases. These questions address key aspects of managed and unmanaged packages.

How do you create a managed package in Salesforce?

To create a managed package in Salesforce, enable packaging in your developer org. Then, create a new package and add the desired components. Next, upload the package and submit it for security review. Once approved, you can list it on AppExchange for distribution.

What are the key differences between managed and unmanaged packages in Salesforce?

Managed packages offer developers more control and protection. They hide source code and limit users’ customization options. Unmanaged packages allow full access to components and code. Managed packages also provide automatic updates and better version control.

Can you explain the differences between unlocked and unmanaged packages in Salesforce?

Unlocked packages are a newer type that combines the features of managed and unmanaged packages. Like managed packages, they allow source tracking and version control, but they also offer full component access. Unlocked packages work well for internal development and deployment.

What are the steps to identify whether a package in Salesforce is managed or unmanaged?

To identify a package type, check the package details in Salesforce. Managed packages have a namespace prefix and show limited component information. Unmanaged packages lack a namespace and display full component details. The package installation page also states whether it’s managed or unmanaged.

What are the implications of using an unmanaged package for Salesforce development?

Unmanaged packages give developers full control over components. This allows for easy customization and modification. But it also means no automatic updates or version control. Unmanaged packages work well for one-time installations or when extensive customization is needed.

How do the components of a Salesforce-managed package differ from those in an unmanaged package?

Managed package components are locked and protected. Users can’t view or modify the underlying code. Unmanaged package components are fully accessible and editable. Managed packages include features like global access and subscriber support. Unmanaged packages lack these advanced capabilities.

Conclusion

Salesforce managed and unmanaged packages each have their own strengths. Managed packages offer stability, regular updates, and vendor support. They protect intellectual property and simplify upgrades.

Unmanaged packages provide more flexibility for customization. They allow direct editing of code and components after installation. This makes them useful for specific organizational needs.

The choice between managed and unmanaged packages depends on the project requirements. Managed packages work well for widely distributed applications needing secure distribution, while unmanaged packages suit situations needing extensive customization.

Organizations should consider factors like long-term maintenance, security, and scalability. Managed packages excel in these areas. Unmanaged packages give more control but require more in-house expertise.

Both package types have their place in Salesforce development. Understanding their differences helps in making the right choice for each unique situation.

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.