Skip to main content

Understanding Salesforce Packaging: From First-Generation to Second-Generation

About Us
Published by JET BI
25 September 2024
24

Salesforce Packaging Explained: Transitioning from First-Generation to Second-Generation

 

Salesforce is a cloud-based Customer Relationship Management (CRM) software that was created to help businesses manage their sales by providing a robust platform to build custom applications and automate processes. To streamline the management of these applications, Salesforce introduced packaging solutions. 

Over time, Salesforce has grown into one of the leading platforms for businesses, supporting a wide range of needs. Its packaging solutions have evolved as well, transitioning from First-Generation Packaging (1GP) to Second-Generation Packaging (2GP). Understanding this evolution is key to optimizing application management and improving development workflows. While Salesforce is focusing on 2GP for future investments due to its many advantages, it's important to understand both 1GP and 2GP, as both are still in use and have distinct strengths. This article explores the differences between 1GP and 2GP and their significance in modern Salesforce development.

 

What is Salesforce Packaging? 

Salesforce packaging is a method of combining various elements into packages that can be deployed. These packages are collections of code, including objects, fields, Lightning Web Components (LWC), automations, analytical layouts, and other resources that provide additional features or services within Salesforce. Packaging simplifies the process of installing, managing, and distributing applications across different Salesforce environments. 

 

Evolution of Salesforce Packaging

First-Generation Packaging (1GP) 

1GP was the original packaging solution introduced by Salesforce for early-stage app development and distribution. Although effective at the time, it had limitations in terms of flexibility and scalability. As development practices advanced, these shortcomings became more apparent, which led to the need for more modern packaging tools. 

Second-Generation Packaging (2GP) 

To address the challenges of 1GP, Salesforce introduced 2GP, a more flexible and scalable solution. 2GP offers significant improvements such as better version control, modularity through unlocked packages, and integration with Continuous Integration/Continuous Deployment (CI/CD) pipelines. These features align with contemporary development practices and provide businesses with enhanced tools for managing their applications.

However, 2GP still lags behind 1GP in some aspects of feature parity, making it necessary to understand both systems. In some scenarios, 1GP is still needed. For instance, there is a small set of metadata types that 1GP supports but are not yet available in 2GP. Additionally, if a developer needs to create a package that depends on an existing 1GP package, the new package must also be 1GP, as 1GP cannot depend on 2GP.


 

Types of packages in Salesforce

Salesforce packaging solutions have evolved, and they include both managed and unmanaged packages under 1GP and 2GP.

         1GP                               2GP

Unmanaged packages → Unlocked packages

1GP Managed packages → 2GP Managed packages

 

1GP: Managed and Unmanaged Packages 

Managed packages are often used by Salesforce partners to distribute and sell apps through the AppExchange. They allow for upgradability, namespace management, and enhanced security. These packages are ideal for long-term applications requiring regular updates, secure distribution, and licensing management.

Unmanaged packages are used for sharing code samples, templates, or features that can be freely modified after installation. They are often used for open-source projects. However, 1GP unmanaged packages lack upgrade capabilities. This type of packaging is suited for collaborative development and sharing code samples without ongoing developer control.

2GP: Managed and Unlocked Packages 

2GP managed packages build on the capabilities of 1GP and provide similar benefits but with added enhancements, such as source control integration, CI/CD pipeline support, and modularity. These features make them ideal for modern app development workflows.

 Unlocked packages in 2GP offer maximum flexibility for internal development and agile deployment. This type of packages are modular and upgradable, making them perfect for building applications in smaller, reusable components. They can be modified after installation, unlike managed packages, though unlocked packages lack certain features, such as PostInstall Scripts. Unlocked packages are particularly well-suited for teams that follow agile development practices and need flexibility in deployment and updates.

 

In conclusion

Understanding Salesforce packaging is crucial, especially as 2GP continues to evolve. While Salesforce is heavily investing in 2GP due to its advantages, developers must still be aware of the capabilities and limitations of 1GP due to the current feature gaps and the ongoing use of legacy applications. 

For further in-depth information, refer to the Explore the New Developer Guides for Managed Packaging, including Second-Generation Managed Packaging Developer Guide, First-Generation Managed Packaging Developer Guide and Salesforce DX Developer Guide: Unlocked Packages. Additional resources for Salesforce development can also be found on the JetBI. 


Anzhelika Makarova
Junior Salesforce Developer
image
Expertise
Question to the expert
image

We have available resources to start working on your project within 5 business days

1 UX Designer

image

1 Admin

image

2 QA engineers

image

1 Consultant

image
Related Articles
All articles
image
How to Customize Salesforce Field Service Mobile for Your Technicians
Salesforce Field Service Mobile provides a standard technician experience that companies can extend to fit their own service processes. This article looks at areas where a custom mobile workflow can help: AI repair assistance, field documentation, external tools, back-office integrations, quotes and payments on site, barcode scanning and role-based mobile layouts. It also outlines four practical steps for planning a mobile workflow around the technician’s work.
21 October 2026
image
Salesforce Field Service Mobile: New Capabilities for Technicians
Salesforce Field Service Mobile continues to evolve with new capabilities for technicians working in the field. Explore how updates to job preparation, mobile forms, voice input, mapping, and Work Order views are changing the technician experience, and learn why configuring these capabilities around your service operations matters.
14 October 2026
image
Closing the Gap Between Field Service and Business Needs
Standard Salesforce Field Service configuration covers many service processes, but individual businesses can have different workflows, working conditions, scheduling rules, and operational requirements. This article looks at three areas where standard configuration can fall short: how technicians work, the conditions of field service operations, and business-specific processes. It also provides a practical checklist of signs that a Salesforce Field Service setup could benefit from customization.
07 October 2026