SlideShare a Scribd company logo
Successfully Creating
Unlocked Packages
@msrivastav13 | mohith.shrivastava@salesforce.com
Mohith Shrivastava, Lead Developer Evangelist
Forward-Looking Statement
Statement under the Private Securities Litigation Reform Act of 1995:
This presentation contains forward-looking statements about the company’s financial and operating results, which may include expected GAAP and non-GAAP financial and other operating
and non-operating results, including revenue, net income, diluted earnings per share, operating cash flow growth, operating margin improvement, expected revenue growth, expected
current remaining performance obligation growth, expected tax rates, the one-time accounting non-cash charge that was incurred in connection with the Salesforce.org combination; stock-
based compensation expenses, amortization of purchased intangibles, shares outstanding, market growth and sustainability goals. The achievement or success of the matters covered by
such forward-looking statements involves risks, uncertainties and assumptions. If any such risks or uncertainties materialize or if any of the assumptions prove incorrect, the company’s
results could differ materially from the results expressed or implied by the forward-looking statements we make.
The risks and uncertainties referred to above include -- but are not limited to -- risks associated with the effect of general economic and market conditions; the impact of geopolitical events;
the impact of foreign currency exchange rate and interest rate fluctuations on our results; our business strategy and our plan to build our business, including our strategy to be the leading
provider of enterprise cloud computing applications and platforms; the pace of change and innovation in enterprise cloud computing services; the seasonal nature of our sales cycles; the
competitive nature of the market in which we participate; our international expansion strategy; the demands on our personnel and infrastructure resulting from significant growth in our
customer base and operations, including as a result of acquisitions; our service performance and security, including the resources and costs required to avoid unanticipated downtime and
prevent, detect and remediate potential security breaches; the expenses associated with new data centers and third-party infrastructure providers; additional data center capacity; real estate
and office facilities space; our operating results and cash flows; new services and product features, including any efforts to expand our services beyond the CRM market; our strategy of
acquiring or making investments in complementary businesses, joint ventures, services, technologies and intellectual property rights; the performance and fair value of our investments in
complementary businesses through our strategic investment portfolio; our ability to realize the benefits from strategic partnerships, joint ventures and investments; the impact of future gains
or losses from our strategic investment portfolio, including gains or losses from overall market conditions that may affect the publicly traded companies within the company's strategic
investment portfolio; our ability to execute our business plans; our ability to successfully integrate acquired businesses and technologies, including delays related to the integration of
Tableau due to regulatory review by the United Kingdom Competition and Markets Authority; our ability to continue to grow unearned revenue and remaining performance obligation; our
ability to protect our intellectual property rights; our ability to develop our brands; our reliance on third-party hardware, software and platform providers; our dependency on the development
and maintenance of the infrastructure of the Internet; the
effect of evolving domestic and foreign government regulations, including those related to the provision of services on the Internet, those related to accessing the Internet, and those
addressing data privacy, cross-border data transfers and import and export controls; the valuation of our deferred tax assets and the release of related valuation allowances; the potential
availability of additional tax assets in the future; the impact of new accounting pronouncements and tax laws; uncertainties affecting our ability to estimate our tax
rate; the impact of expensing stock options and other equity awards; the sufficiency of our capital resources; factors related to our outstanding debt, revolving credit facility, term loan and
loan associated with 50 Fremont; compliance with our debt covenants and lease obligations; current and potential litigation involving us; and the impact of climate change.
Further information on these and other factors that could affect the company’s financial results is included in the reports on Forms 10-K, 10-Q and 8-K and in other filings it makes with the
Securities and Exchange Commission from time to time. These documents are available on the SEC Filings section of the Investor Information section of the company’s website at
www.salesforce.com/investor.
Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements, except as required by law.
Learning Objectives
● What is packaging?
● Understanding Dependency between metadata
● Why do we need to package metadata?
● Unlocked packages and how they differ from Managed Packages?
● Org Dependent unlocked packages vs org independent unlocked packages
● Creating unlocked packages working example using EasySpaces sample gallery
app
● How to configure dependencies between unlocked packages?
● Unlocked package upgrade behaviour
● Namespacing unlocked packages
● Tools for untangling your org to modular packages
● References
What is packaging?
● A package is a container of metadata. It consists of related metadata.
● For the package to deploy to other orgs it must compile and validate.
● When working with Salesforce DX Source format we usually map a package to a
directory in the project workspace.
Dependency between Metadata
Custom Object
Field A Field B
LWC XYApex Class XYValidation Rule XPage Layout x
Release at faster pace
with confidence
Your package has same
metadata thats there in
your git repo
Why do we need to package metadata?
Automate deployments.
Build once and install in
sandbox for testing and
deploy to production with
confidence
Salesforce DX Source
format
Deploy to Multiple orgs
Modular
application
development
Source Driven
Development
Build once and
deploy anywhere
If your org has large
number of components it
becomes hard to iterate
quickly
Packages can be tracked
in an installed org as they
show up as installed
packages with a set of
associated metadata.
Change Management is
more streamlined.
Creation of packages can
be scripted using
Salesforce CLI
Organise Metadata
Adopt CI/CD with
Salesforce DX
Trackable
Easier Change
Management
● Unlocked Packages are designed primarily
to address the packaging needs of
customers.
● If you are building org specific solution
then unlocked packages are great fit.
● Managed packages geared towards
Salesforce partners that build and list apps
on AppExchange.
● With 2GP managed packages ISVs get
additional features like push upgrades,
access to License Management tool, List
package versions on appexchange
Unlocked Packages vs Managed Packages
Org Dependent Unlocked packages vs Unlocked packages
Org Dependent Packages (BETA)
● Untangling your production org metadata
can be a daunting project.Metadata
validation occurs during package
installation.
● Cannot depend on other packages
● Source tracking feature of sandbox is
recommended org to build these packages
Unlocked Packages
● Metadata Validation occurs during
package creation
● Can depend on other packages
Easy Spaces Sample Gallery App
https://github.com/trailheadapps/easy-spaces-lwc
Demo Creating Unlocked Packages
Configure Dependencies Between Unlocked Packages
Dependency between two unlocked packages associated to same devhub
Configure Dependencies Between Unlocked Packages
Dependency between two unlocked packages associated to different devhub
Configure Dependencies Between Unlocked Packages
Dependency between unlocked packages and an appexchange package
Upgrade Behaviour Options
● Mixed Mode (Default behaviour) - Listed components are deleted except when the
subscriber package has a reference and all others are deprecated.
● Deprecate Only - Deprecates all components and are not deleted. Very useful when moving
metadata from one package to other.
● Delete - Delete specifies to delete all removed components, except for custom objects and
custom fields, that don’t have dependencies.
Options when installing the unlocked packages
Namespacing Unlocked Packages
● Namespaces are optional for Unlocked packages
● Do not use Namespace if you are moving metadata from unpackaged metadata in your org to
unlocked package
● A package can be associated with a namespace only during package creation
(force:package:create) and cannot be changed, once associated.
Horizontal Slicing
Pros Cons
Shared packages for shared metadata, code can help org governance Large packages that change frequently can add overhead
Less prone restrictions relating to inability to untangle objects, etc.
Allows option to use vertical slicing where needed
Views on Fit
Fewer questions of what constitutes a package
boundary, where should new development artifacts go,
etc
Faster developer onboarding, fewer questions of what
packages do I need/what should I be developing
against.
Executing against a framework/structure that's
provided. Basically developers are not driving org and
devops management.
May be more viable path to adoption, without a
declarative/UI-based tool to manage package
changes.
More prescribed, less advanced code required, easier for declarative
Org Metadata/Config that cannot be packaged or decomposed
(Layouts, Profiles)
Base Objects, Fields, Related Permission Sets
Vertical Slicing
Views on Fit
Assumes more ability to manage DI and more true isolation between
business units
Assumes developers will be around & have the skills & are
empowered to make decisions about package structures in the long-
term.
Package boundaries are not as prescribed. When I make a new set
of fields for Module C and new Apex services that could be reused by
A & B, how do I decide where those changes go? Unless I know
about A & B, I would be predisposed to just put everything into C.
Built around an implicit assumption of in-house developers, or at
least, teams of devs that have long-term ownership of their artifacts.
Pros Cons
Packages are more self-contained and managed. Only possible when there is a clear set of objects that can be associated
with a module.
Dependencies on AppExchange packages are more isolated, dev
environments and scratch orgs can be more straightforward to set up.
Requires a cap-stone package (or just left in the org) for all the things you
cannot decompose at present.
Supports the option to go horizontal in places if needed Governance is more complex.
Flexible, more advanced code required, packages are developer-driven
Org Metadata/Config that cannot be packaged or decomposed
(Layouts, Profiles)
Unofficial Tools for Helping Org Modularization
Dependencies CLI - https://github.com/forcedotcom/dependencies-cli
Org Visualizer App https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000G11oIUAR
Metadata Dependency API - https://developer.salesforce.com/docs/atlas.en-
us.api_tooling.meta/api_tooling/tooling_api_objects_metadatacomponentdependency.htm
NOTE - All of this has no official salesforce support but if you are developer centric you should be
able to fork and enhance this as they are open source.
Check out these resources and earn badges on Trailhead
Learn more about Release Management with Salesforce
Application Lifecycle and Development
Models
Learn how to use application lifecycle and development
models on the Lightning Platform.
Git and GitHub Basics
Learn about version control systems and
practice using Git and GitHub
Build an Automated CI/CD Pipeline with GitLab
Integrate with GitLab and define steps for efficient application
development.
App Development with Salesforce DX
Use the Salesforce command-line interface to create,
convert, and deploy apps.
Quick Start: Visual Studio Code for
Salesforce Development
description
Successfully creating unlocked package

More Related Content

PDF
Our move to Salesforce DX and Unlocked Packages
PPTX
Best practices for implementing CI/CD on Salesforce
PPTX
Salesforce – Proven Platform Development with DevOps & Agile
PDF
Modern Development with Salesforce DX
PDF
Generically Call External Classes from Managed Packages
PDF
From Sandbox To Production: An Introduction to Salesforce Release Management
PDF
Endless Use Cases with Salesforce Experience Cloud by Dar Veverka
PPTX
How to Use Salesforce Platform Events to Help With Salesforce Limits
Our move to Salesforce DX and Unlocked Packages
Best practices for implementing CI/CD on Salesforce
Salesforce – Proven Platform Development with DevOps & Agile
Modern Development with Salesforce DX
Generically Call External Classes from Managed Packages
From Sandbox To Production: An Introduction to Salesforce Release Management
Endless Use Cases with Salesforce Experience Cloud by Dar Veverka
How to Use Salesforce Platform Events to Help With Salesforce Limits

What's hot (20)

PDF
Introduction to the Salesforce Security Model
PDF
Salesforce DevOps: Where Do You Start?
PPTX
An introduction to Salesforce
PPTX
Org dependent salesforce packages
PDF
Salesforce CI/CD - A strategy for success
PDF
Manage Development in Your Org with Salesforce Governance Framework
PDF
Introduction to Visualforce
PDF
Discover salesforce, dev ops and Copado CI/CD automations
PDF
A comprehensive guide to Salesforce Org Strategy
PDF
Salesforce Release Management - Best Practices and Tools for Deployment
PPT
Salesforce Presentation
PPTX
Salesforce apex hours azure dev ops
PDF
Introduction to External Objects and the OData Connector
PDF
Manage Salesforce Like a Pro with Governance
PPTX
Secure Coding: Field-level Security, CRUD, and Sharing
PPTX
Sharing and setting in salesforce
PDF
Secure Salesforce: External App Integrations
PDF
Understanding the Salesforce Architecture: How We Do the Magic We Do
PDF
Salesforce Admin 201-certification Notes
PDF
Build your apps everywhere with Lightning Web Components Open Source, Fabien ...
Introduction to the Salesforce Security Model
Salesforce DevOps: Where Do You Start?
An introduction to Salesforce
Org dependent salesforce packages
Salesforce CI/CD - A strategy for success
Manage Development in Your Org with Salesforce Governance Framework
Introduction to Visualforce
Discover salesforce, dev ops and Copado CI/CD automations
A comprehensive guide to Salesforce Org Strategy
Salesforce Release Management - Best Practices and Tools for Deployment
Salesforce Presentation
Salesforce apex hours azure dev ops
Introduction to External Objects and the OData Connector
Manage Salesforce Like a Pro with Governance
Secure Coding: Field-level Security, CRUD, and Sharing
Sharing and setting in salesforce
Secure Salesforce: External App Integrations
Understanding the Salesforce Architecture: How We Do the Magic We Do
Salesforce Admin 201-certification Notes
Build your apps everywhere with Lightning Web Components Open Source, Fabien ...
Ad

Similar to Successfully creating unlocked package (20)

PPTX
Successfully retrieving metadata from salesforce org using packages
PPTX
Bootstrapping DX in Your Enterprise - AutoRABIT at TrailheaDX
PDF
Winter 21 Developer Highlights for Salesforce
PPTX
Dreamforce 2019: "Using Quip for Better Documentation of your Salesforce Org"
PPTX
Summer 23 LWC Updates + Slack Apps.pptx
PDF
WT19: Metadata Magic: Maintain Code, Without the Code!
PDF
Fort Worth Community - Record Triggered Automations.pdf
PDF
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
PDF
TrailheadX Presentation - 2020 Cluj
PDF
Salesforce Backup, Restore & Archiving- Adam Best, Senior Program Architect
PPTX
Stamford developer group - 8 easy steps to master in lightning web components
PDF
SFWelly user group spring '22 release highlights with Mel Macdonald
PDF
Alba Rivas - Building Slack Applications with Bolt.js.pdf
PDF
My trailhead - salesforce user group, Frankfurt, Germany - 02.09.2021
PPTX
Data Cloud with Mulesoft-Surat Meetup 1.pptx
PDF
DevOps 101
PPTX
SF Lightning Web Component Best Practice
PPTX
Manage and Release Changes Easily and Collaboratively with DevOps Center - Sa...
PPTX
Toronto Developer Group - Winter 24' Release Highlights.pptx
PDF
Admin Best Practices: Reports & Dashboards
Successfully retrieving metadata from salesforce org using packages
Bootstrapping DX in Your Enterprise - AutoRABIT at TrailheaDX
Winter 21 Developer Highlights for Salesforce
Dreamforce 2019: "Using Quip for Better Documentation of your Salesforce Org"
Summer 23 LWC Updates + Slack Apps.pptx
WT19: Metadata Magic: Maintain Code, Without the Code!
Fort Worth Community - Record Triggered Automations.pdf
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
TrailheadX Presentation - 2020 Cluj
Salesforce Backup, Restore & Archiving- Adam Best, Senior Program Architect
Stamford developer group - 8 easy steps to master in lightning web components
SFWelly user group spring '22 release highlights with Mel Macdonald
Alba Rivas - Building Slack Applications with Bolt.js.pdf
My trailhead - salesforce user group, Frankfurt, Germany - 02.09.2021
Data Cloud with Mulesoft-Surat Meetup 1.pptx
DevOps 101
SF Lightning Web Component Best Practice
Manage and Release Changes Easily and Collaboratively with DevOps Center - Sa...
Toronto Developer Group - Winter 24' Release Highlights.pptx
Admin Best Practices: Reports & Dashboards
Ad

More from Mohith Shrivastava (20)

PDF
Best Practices with Apex in 2022.pdf
PPTX
Deep dive into salesforce connected app part 4
PPTX
Implementing Einstein OCR
PPTX
Deep dive into salesforce connected app - part 2
PPTX
Deep dive into salesforce connected app part 1
PPTX
Enhance salesforce application performance using lightning platform cache
PPTX
Become a rockstar admin
PPTX
Build your own dev tools with salesforce cli plugin generator
PPTX
Modular application development using unlocked packages
PPTX
Introduction to lightning Web Component
PPTX
Building Apps On Lightning
PPTX
Modular Salesforce Application Development Using DX
PPTX
Spring18 Lightning Component Updates
PPTX
Introduction To Service Cloud Snapins SDK
PPTX
Introduction to einstein analytics sdk for lightning
PPTX
Machine learning with salesforce data using prediction io
PPTX
Debugging lightning components-SEDreamin17
PPTX
Introduction to Analytics Cloud
PPTX
Debugging lightning components
PPTX
Introduction to lightning out df16
Best Practices with Apex in 2022.pdf
Deep dive into salesforce connected app part 4
Implementing Einstein OCR
Deep dive into salesforce connected app - part 2
Deep dive into salesforce connected app part 1
Enhance salesforce application performance using lightning platform cache
Become a rockstar admin
Build your own dev tools with salesforce cli plugin generator
Modular application development using unlocked packages
Introduction to lightning Web Component
Building Apps On Lightning
Modular Salesforce Application Development Using DX
Spring18 Lightning Component Updates
Introduction To Service Cloud Snapins SDK
Introduction to einstein analytics sdk for lightning
Machine learning with salesforce data using prediction io
Debugging lightning components-SEDreamin17
Introduction to Analytics Cloud
Debugging lightning components
Introduction to lightning out df16

Recently uploaded (20)

PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Cloud computing and distributed systems.
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
KodekX | Application Modernization Development
PDF
Electronic commerce courselecture one. Pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
Understanding_Digital_Forensics_Presentation.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Cloud computing and distributed systems.
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Review of recent advances in non-invasive hemoglobin estimation
Unlocking AI with Model Context Protocol (MCP)
KodekX | Application Modernization Development
Electronic commerce courselecture one. Pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Per capita expenditure prediction using model stacking based on satellite ima...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
“AI and Expert System Decision Support & Business Intelligence Systems”
Chapter 3 Spatial Domain Image Processing.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Mobile App Security Testing_ A Comprehensive Guide.pdf
Machine learning based COVID-19 study performance prediction
Building Integrated photovoltaic BIPV_UPV.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Reach Out and Touch Someone: Haptics and Empathic Computing

Successfully creating unlocked package

  • 1. Successfully Creating Unlocked Packages @msrivastav13 | mohith.shrivastava@salesforce.com Mohith Shrivastava, Lead Developer Evangelist
  • 2. Forward-Looking Statement Statement under the Private Securities Litigation Reform Act of 1995: This presentation contains forward-looking statements about the company’s financial and operating results, which may include expected GAAP and non-GAAP financial and other operating and non-operating results, including revenue, net income, diluted earnings per share, operating cash flow growth, operating margin improvement, expected revenue growth, expected current remaining performance obligation growth, expected tax rates, the one-time accounting non-cash charge that was incurred in connection with the Salesforce.org combination; stock- based compensation expenses, amortization of purchased intangibles, shares outstanding, market growth and sustainability goals. The achievement or success of the matters covered by such forward-looking statements involves risks, uncertainties and assumptions. If any such risks or uncertainties materialize or if any of the assumptions prove incorrect, the company’s results could differ materially from the results expressed or implied by the forward-looking statements we make. The risks and uncertainties referred to above include -- but are not limited to -- risks associated with the effect of general economic and market conditions; the impact of geopolitical events; the impact of foreign currency exchange rate and interest rate fluctuations on our results; our business strategy and our plan to build our business, including our strategy to be the leading provider of enterprise cloud computing applications and platforms; the pace of change and innovation in enterprise cloud computing services; the seasonal nature of our sales cycles; the competitive nature of the market in which we participate; our international expansion strategy; the demands on our personnel and infrastructure resulting from significant growth in our customer base and operations, including as a result of acquisitions; our service performance and security, including the resources and costs required to avoid unanticipated downtime and prevent, detect and remediate potential security breaches; the expenses associated with new data centers and third-party infrastructure providers; additional data center capacity; real estate and office facilities space; our operating results and cash flows; new services and product features, including any efforts to expand our services beyond the CRM market; our strategy of acquiring or making investments in complementary businesses, joint ventures, services, technologies and intellectual property rights; the performance and fair value of our investments in complementary businesses through our strategic investment portfolio; our ability to realize the benefits from strategic partnerships, joint ventures and investments; the impact of future gains or losses from our strategic investment portfolio, including gains or losses from overall market conditions that may affect the publicly traded companies within the company's strategic investment portfolio; our ability to execute our business plans; our ability to successfully integrate acquired businesses and technologies, including delays related to the integration of Tableau due to regulatory review by the United Kingdom Competition and Markets Authority; our ability to continue to grow unearned revenue and remaining performance obligation; our ability to protect our intellectual property rights; our ability to develop our brands; our reliance on third-party hardware, software and platform providers; our dependency on the development and maintenance of the infrastructure of the Internet; the effect of evolving domestic and foreign government regulations, including those related to the provision of services on the Internet, those related to accessing the Internet, and those addressing data privacy, cross-border data transfers and import and export controls; the valuation of our deferred tax assets and the release of related valuation allowances; the potential availability of additional tax assets in the future; the impact of new accounting pronouncements and tax laws; uncertainties affecting our ability to estimate our tax rate; the impact of expensing stock options and other equity awards; the sufficiency of our capital resources; factors related to our outstanding debt, revolving credit facility, term loan and loan associated with 50 Fremont; compliance with our debt covenants and lease obligations; current and potential litigation involving us; and the impact of climate change. Further information on these and other factors that could affect the company’s financial results is included in the reports on Forms 10-K, 10-Q and 8-K and in other filings it makes with the Securities and Exchange Commission from time to time. These documents are available on the SEC Filings section of the Investor Information section of the company’s website at www.salesforce.com/investor. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements, except as required by law.
  • 3. Learning Objectives ● What is packaging? ● Understanding Dependency between metadata ● Why do we need to package metadata? ● Unlocked packages and how they differ from Managed Packages? ● Org Dependent unlocked packages vs org independent unlocked packages ● Creating unlocked packages working example using EasySpaces sample gallery app ● How to configure dependencies between unlocked packages? ● Unlocked package upgrade behaviour ● Namespacing unlocked packages ● Tools for untangling your org to modular packages ● References
  • 4. What is packaging? ● A package is a container of metadata. It consists of related metadata. ● For the package to deploy to other orgs it must compile and validate. ● When working with Salesforce DX Source format we usually map a package to a directory in the project workspace.
  • 5. Dependency between Metadata Custom Object Field A Field B LWC XYApex Class XYValidation Rule XPage Layout x
  • 6. Release at faster pace with confidence Your package has same metadata thats there in your git repo Why do we need to package metadata? Automate deployments. Build once and install in sandbox for testing and deploy to production with confidence Salesforce DX Source format Deploy to Multiple orgs Modular application development Source Driven Development Build once and deploy anywhere If your org has large number of components it becomes hard to iterate quickly Packages can be tracked in an installed org as they show up as installed packages with a set of associated metadata. Change Management is more streamlined. Creation of packages can be scripted using Salesforce CLI Organise Metadata Adopt CI/CD with Salesforce DX Trackable Easier Change Management
  • 7. ● Unlocked Packages are designed primarily to address the packaging needs of customers. ● If you are building org specific solution then unlocked packages are great fit. ● Managed packages geared towards Salesforce partners that build and list apps on AppExchange. ● With 2GP managed packages ISVs get additional features like push upgrades, access to License Management tool, List package versions on appexchange Unlocked Packages vs Managed Packages
  • 8. Org Dependent Unlocked packages vs Unlocked packages Org Dependent Packages (BETA) ● Untangling your production org metadata can be a daunting project.Metadata validation occurs during package installation. ● Cannot depend on other packages ● Source tracking feature of sandbox is recommended org to build these packages Unlocked Packages ● Metadata Validation occurs during package creation ● Can depend on other packages
  • 9. Easy Spaces Sample Gallery App https://github.com/trailheadapps/easy-spaces-lwc Demo Creating Unlocked Packages
  • 10. Configure Dependencies Between Unlocked Packages Dependency between two unlocked packages associated to same devhub
  • 11. Configure Dependencies Between Unlocked Packages Dependency between two unlocked packages associated to different devhub
  • 12. Configure Dependencies Between Unlocked Packages Dependency between unlocked packages and an appexchange package
  • 13. Upgrade Behaviour Options ● Mixed Mode (Default behaviour) - Listed components are deleted except when the subscriber package has a reference and all others are deprecated. ● Deprecate Only - Deprecates all components and are not deleted. Very useful when moving metadata from one package to other. ● Delete - Delete specifies to delete all removed components, except for custom objects and custom fields, that don’t have dependencies. Options when installing the unlocked packages
  • 14. Namespacing Unlocked Packages ● Namespaces are optional for Unlocked packages ● Do not use Namespace if you are moving metadata from unpackaged metadata in your org to unlocked package ● A package can be associated with a namespace only during package creation (force:package:create) and cannot be changed, once associated.
  • 15. Horizontal Slicing Pros Cons Shared packages for shared metadata, code can help org governance Large packages that change frequently can add overhead Less prone restrictions relating to inability to untangle objects, etc. Allows option to use vertical slicing where needed Views on Fit Fewer questions of what constitutes a package boundary, where should new development artifacts go, etc Faster developer onboarding, fewer questions of what packages do I need/what should I be developing against. Executing against a framework/structure that's provided. Basically developers are not driving org and devops management. May be more viable path to adoption, without a declarative/UI-based tool to manage package changes. More prescribed, less advanced code required, easier for declarative Org Metadata/Config that cannot be packaged or decomposed (Layouts, Profiles) Base Objects, Fields, Related Permission Sets
  • 16. Vertical Slicing Views on Fit Assumes more ability to manage DI and more true isolation between business units Assumes developers will be around & have the skills & are empowered to make decisions about package structures in the long- term. Package boundaries are not as prescribed. When I make a new set of fields for Module C and new Apex services that could be reused by A & B, how do I decide where those changes go? Unless I know about A & B, I would be predisposed to just put everything into C. Built around an implicit assumption of in-house developers, or at least, teams of devs that have long-term ownership of their artifacts. Pros Cons Packages are more self-contained and managed. Only possible when there is a clear set of objects that can be associated with a module. Dependencies on AppExchange packages are more isolated, dev environments and scratch orgs can be more straightforward to set up. Requires a cap-stone package (or just left in the org) for all the things you cannot decompose at present. Supports the option to go horizontal in places if needed Governance is more complex. Flexible, more advanced code required, packages are developer-driven Org Metadata/Config that cannot be packaged or decomposed (Layouts, Profiles)
  • 17. Unofficial Tools for Helping Org Modularization Dependencies CLI - https://github.com/forcedotcom/dependencies-cli Org Visualizer App https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000G11oIUAR Metadata Dependency API - https://developer.salesforce.com/docs/atlas.en- us.api_tooling.meta/api_tooling/tooling_api_objects_metadatacomponentdependency.htm NOTE - All of this has no official salesforce support but if you are developer centric you should be able to fork and enhance this as they are open source.
  • 18. Check out these resources and earn badges on Trailhead Learn more about Release Management with Salesforce Application Lifecycle and Development Models Learn how to use application lifecycle and development models on the Lightning Platform. Git and GitHub Basics Learn about version control systems and practice using Git and GitHub Build an Automated CI/CD Pipeline with GitLab Integrate with GitLab and define steps for efficient application development. App Development with Salesforce DX Use the Salesforce command-line interface to create, convert, and deploy apps. Quick Start: Visual Studio Code for Salesforce Development description