Salesforce Managed vs UnManaged vs Package.xml – A complete Guide

Salesforce provides us with two types of the package in salesforce managed package and unmanaged package. A salesforce package is a list of metadata components which are tightly coupled with all the dependent components. We can use this salesforce package in many ways like deploying them from one Salesforce organization to another. We can also install these packages in our organization and assign them to users.
 

Also Read: What is Environment, Sandbox, Types Of Sandbox And How To Create Sandbox From Production

 
Salesforce package is the list of metadata components tightly coupled with all the dependent components in the form of a box or container. There are two types of salesforce package Unmanaged Package and Managed Package.

 

Salesforce package.xml contains the list of metadata components in an XML file format. We can retrieve and deploy metadata components using package.xml.

 

Salesforce Managed vs UnManaged vs Package.xml
 
So, please don’t get confused with salesforce package and package.xml as these are two different things and many of us get confused with these two terms to avoid any confusion I will explain both of them in detail.
 

What is pacakge.xml

Package.xml is an XML file with all the metadata components. All the salesforce metadata components such as Apex Class, Apex Triggers and all other components are written in XML format within the salesforce database.

Complete Package.xml of Salesforce Metadata Components with Wildcard value.

<?xml version=”1.0″ encoding=”UTF-8″?>
<Package xmlns=”http://soap.sforce.com/2006/04/metadata”>
  <types>
    <members>*</members>
    <name>ActionLinkGroupTemplate</name>
  </types>
  <types>
    <members>*</members>
    <name>AnalyticSnapshot</name>
  </types>
  <types>
    <members>*</members>
    <name>AnimationRule</name>
  </types>
  <types>
    <members>*</members>
    <name>ApexClass</name>
  </types>
  <types>
    <members>*</members>
    <name>ApexComponent</name>
  </types>
  <types>
    <members>*</members>
    <name>ApexPage</name>
  </types>
  <types>
    <members>*</members>
    <name>ApexTestSuite</name>
  </types>
  <types>
    <members>*</members>
    <name>ApexTrigger</name>
  </types>
  <types>
    <members>*</members>
    <name>AppMenu</name>
  </types>
  <types>
    <members>*</members>
    <name>AppointmentSchedulingPolicy</name>
  </types>
  <types>
    <members>*</members>
    <name>ApprovalProcess</name>
  </types>
  <types>
    <members>*</members>
    <name>AssignmentRules</name>
  </types>
  <types>
    <members>*</members>
    <name>AuraDefinitionBundle</name>
  </types>
  <types>
    <members>*</members>
    <name>AuthProvider</name>
  </types>
  <types>
    <members>*</members>
    <name>AutoResponseRules</name>
  </types>
  <types>
    <members>*</members>
    <name>BrandingSet</name>
  </types>
  <types>
    <members>*</members>
    <name>CallCenter</name>
  </types>
  <types>
    <members>*</members>
    <name>CanvasMetadata</name>
  </types>
  <types>
    <members>*</members>
    <name>CaseSubjectParticle</name>
  </types>
  <types>
    <members>*</members>
    <name>Certificate</name>
  </types>
  <types>
    <members>*</members>
    <name>ChannelLayout</name>
  </types>
  <types>
    <members>*</members>
    <name>ChatterExtension</name>
  </types>
  <types>
    <members>*</members>
    <name>CleanDataService</name>
  </types>
  <types>
    <members>*</members>
    <name>Community</name>
  </types>
  <types>
    <members>*</members>
    <name>ConnectedApp</name>
  </types>
  <types>
    <members>*</members>
    <name>ContentAsset</name>
  </types>
  <types>
    <members>*</members>
    <name>CorsWhitelistOrigin</name>
  </types>
  <types>
    <members>*</members>
    <name>CspTrustedSite</name>
  </types>
  <types>
    <members>*</members>
    <name>CustomApplication</name>
  </types>
  <types>
    <members>*</members>
    <name>CustomApplicationComponent</name>
  </types>
  <types>
    <members>*</members>
    <name>CustomFeedFilter</name>
  </types>
  <types>
    <members>*</members>
    <name>CustomHelpMenuSection</name>
  </types>
  <types>
    <members>*</members>
    <name>CustomLabels</name>
  </types>
  <types>
    <members>*</members>
    <name>CustomMetadata</name>
  </types>
  <types>
    <members>*</members>
    <name>CustomNotificationType</name>
  </types>
  <types>
    <members>*</members>
    <name>CustomObject</name>
  </types>
  <types>
    <members>*</members>
    <name>CustomObjectTranslation</name>
  </types>
  <types>
    <members>*</members>
    <name>CustomPageWebLink</name>
  </types>
  <types>
    <members>*</members>
    <name>CustomPermission</name>
  </types>
  <types>
    <members>*</members>
    <name>CustomSite</name>
  </types>
  <types>
    <members>*</members>
    <name>CustomTab</name>
  </types>
  <types>
    <name>Dashboard</name>
  </types>
  <types>
    <members>*</members>
    <name>DataCategoryGroup</name>
  </types>
  <types>
    <members>*</members>
    <name>DelegateGroup</name>
  </types>
  <types>
    <members>*</members>
    <name>Document</name>
  </types>
  <types>
    <members>*</members>
    <name>DuplicateRule</name>
  </types>
  <types>
    <members>*</members>
    <name>EclairGeoData</name>
  </types>
  <types>
    <members>*</members>
    <name>EmailServicesFunction</name>
  </types>
  <types>
    <members>*</members>
    <name>EmailTemplate</name>
  </types>
  <types>
    <members>*</members>
    <name>EmbeddedServiceBranding</name>
  </types>
  <types>
    <members>*</members>
    <name>EmbeddedServiceConfig</name>
  </types>
  <types>
    <members>*</members>
    <name>EmbeddedServiceFlowConfig</name>
  </types>
  <types>
    <members>*</members>
    <name>EmbeddedServiceMenuSettings</name>
  </types>
  <types>
    <members>*</members>
    <name>EscalationRules</name>
  </types>
  <types>
    <members>*</members>
    <name>ExternalDataSource</name>
  </types>
  <types>
    <members>*</members>
    <name>ExternalServiceRegistration</name>
  </types>
  <types>
    <members>*</members>
    <name>FlexiPage</name>
  </types>
  <types>
    <members>*</members>
    <name>Flow</name>
  </types>
  <types>
    <members>*</members>
    <name>FlowCategory</name>
  </types>
  <types>
    <members>*</members>
    <name>FlowDefinition</name>
  </types>
  <types>
    <members>*</members>
    <name>GlobalValueSet</name>
  </types>
  <types>
    <members>*</members>
    <name>GlobalValueSetTranslation</name>
  </types>
  <types>
    <members>*</members>
    <name>Group</name>
  </types>
  <types>
    <members>*</members>
    <name>HomePageComponent</name>
  </types>
  <types>
    <members>*</members>
    <name>HomePageLayout</name>
  </types>
  <types>
    <members>*</members>
    <name>InstalledPackage</name>
  </types>
  <types>
    <members>*</members>
    <name>Layout</name>
  </types>
  <types>
    <members>*</members>
    <name>LeadConvertSettings</name>
  </types>
  <types>
    <members>*</members>
    <name>Letterhead</name>
  </types>
  <types>
    <members>*</members>
    <name>LightningBolt</name>
  </types>
  <types>
    <members>*</members>
    <name>LightningComponentBundle</name>
  </types>
  <types>
    <members>*</members>
    <name>LightningExperienceTheme</name>
  </types>
  <types>
    <members>*</members>
    <name>LightningMessageChannel</name>
  </types>
  <types>
    <members>*</members>
    <name>LightningOnboardingConfig</name>
  </types>
  <types>
    <members>*</members>
    <name>LiveChatSensitiveDataRule</name>
  </types>
  <types>
    <members>*</members>
    <name>ManagedContentType</name>
  </types>
  <types>
    <members>*</members>
    <name>MatchingRules</name>
  </types>
  <types>
    <members>*</members>
    <name>MobileApplicationDetail</name>
  </types>
  <types>
    <members>*</members>
    <name>MutingPermissionSet</name>
  </types>
  <types>
    <members>*</members>
    <name>NamedCredential</name>
  </types>
  <types>
    <members>*</members>
    <name>NetworkBranding</name>
  </types>
  <types>
    <members>*</members>
    <name>OauthCustomScope</name>
  </types>
  <types>
    <members>*</members>
    <name>PathAssistant</name>
  </types>
  <types>
    <members>*</members>
    <name>PermissionSet</name>
  </types>
  <types>
    <members>*</members>
    <name>PermissionSetGroup</name>
  </types>
  <types>
    <members>*</members>
    <name>PlatformCachePartition</name>
  </types>
  <types>
    <members>*</members>
    <name>PlatformEventChannel</name>
  </types>
  <types>
    <members>*</members>
    <name>PlatformEventChannelMember</name>
  </types>
  <types>
    <members>*</members>
    <name>PostTemplate</name>
  </types>
  <types>
    <members>*</members>
    <name>Profile</name>
  </types>
  <types>
    <members>*</members>
    <name>ProfilePasswordPolicy</name>
  </types>
  <types>
    <members>*</members>
    <name>ProfileSessionSetting</name>
  </types>
  <types>
    <members>*</members>
    <name>Prompt</name>
  </types>
  <types>
    <members>*</members>
    <name>Queue</name>
  </types>
  <types>
    <members>*</members>
    <name>QuickAction</name>
  </types>
  <types>
    <members>*</members>
    <name>RecommendationStrategy</name>
  </types>
  <types>
    <members>*</members>
    <name>RecordActionDeployment</name>
  </types>
  <types>
    <members>*</members>
    <name>RemoteSiteSetting</name>
  </types>
  <types>
    <members>*</members>
    <name>Report</name>
  </types>
  <types>
    <members>*</members>
    <name>ReportType</name>
  </types>
  <types>
    <members>*</members>
    <name>Role</name>
  </types>
  <types>
    <members>*</members>
    <name>SamlSsoConfig</name>
  </types>
  <types>
    <members>*</members>
    <name>Scontrol</name>
  </types>
  <types>
    <members>*</members>
    <name>Settings</name>
  </types>
  <types>
    <members>*</members>
    <name>SharingRules</name>
  </types>
  <types>
    <members>*</members>
    <name>SharingSet</name>
  </types>
  <types>
    <members>*</members>
    <name>SiteDotCom</name>
  </types>
  <types>
    <members>*</members>
    <name>Skill</name>
  </types>
  <types>
    <members>*</members>
    <name>StandardValueSet</name>
  </types>
  <types>
    <members>*</members>
    <name>StandardValueSetTranslation</name>
  </types>
  <types>
    <members>*</members>
    <name>StaticResource</name>
  </types>
  <types>
    <members>*</members>
    <name>SynonymDictionary</name>
  </types>
  <types>
    <members>*</members>
    <name>TopicsForObjects</name>
  </types>
  <types>
    <members>*</members>
    <name>TransactionSecurityPolicy</name>
  </types>
  <types>
    <members>*</members>
    <name>Workflow</name>
  </types>
  <version>47.0</version>
</Package>

What Are Different Types of Salesforce Package

There are two different types of salesforce package as we have discussed above salesforce managed package and salesforce unmanaged package. Let’s both of them in detail.

Salesforce Managed Package.

Salesforce managed package is the list of metadata components packaged together and uploaded in App Exchange. These packages are linked with Licenses and namespace.

salesforce unmanaged package.

Salesforce unmanaged package are open source packages and can be edited as per the organization requirements. They don’t have a license as well as namespace.

What is Namespace

A namespace is a unique identifier of 1-15 characters of alphanumeric. It makes your component unique. You cannot edit or delete namespace once it is created. So, please be extra careful what name you would like to give when you are creating a managed package.
 
For example, I have prepared a package and named it as France123. If there is custom field test__c then as per namespace used by the organization we can use France123__test__c. In short, it differentiates main field values with the fields which are used in AppExchange.

How to Create a Managed Package in Salesforce.

Managed packages can only be created in developer editions and then the same package can be installed in salesforce sandbox as well as salesforce production.
 
To create a managed package in salesforce, go to your developer edition then go to Setup > QuickFindBox > Package Manager (Lightning)/Packages(Classic) > Developer Edition > Edit > Choose the NameSpace > Click Save.

Step1: Go to package manager from the setup menu as shown in the below image.

 

Step by step process to create managed package in salesforce
Go to Package Manager

Step2: Click on Edit under Developer settings.

Step by step process to create managed package in salesforce
Edit Developer settings and click on continue

Step3: Give a namespace to your managed package.

Step by step process to create managed package in salesforce
Give a namespace for the managed package

Step4: I have given a name as France123

Step by step process to create managed package in salesforce
Give a namespace name and save the settings.
 
Step5: Once you create a package, click on a checkbox “Managed”
Step by step process to create managed package in salesforce
Create a package and click on Managed

What are the properties/ characteristics of managed package in salesforce?

  1. Managed packages can be upgraded.
  2. All the Managed components can be viewed but cannot be edited in salesforce.
  3. Managed package use License and namespace prefix.
  4. Apex Trigger and Apex class cannot be viewed with many other components.
  5. Managed packages can be a beta package, release package or installed package from app exchange.
  6. The managed package can only be created in Developer Edition, you cannot create a managed package in the sandbox or production org.
  7. Once the Managed package is created it cannot be deleted but can be uninstalled.
  8. Managed packages cannot be migrated from one org to another org. The best practice is to install the same package in the sandbox as well as salesforce production instance.
  9. You can only create one managed package per salesforce instance. If you want to create another managed package, then you have to create a different developer edition.
  10. The managed package cannot be converted to an unmanaged package once you set the flag “Managed” to true.
  11. You cannot create a managed package in DevHub.
  12. Managed Package is used by ISV Partners of salesforce to sell the application to its customers.

Can Anyone Upload Managed Package in Salesforce?

Yes, once you have created and uploaded your metadata components to your managed package then you can upload it with a version name and version number in AppExchange.

How to upload Managed Package in Salesforce.

Once you create your managed package you have to give the version name and number with the release type. You have to select package requirements and object requirements and click on upload.
 
Please find the below image for the same. Once you click on Upload then you have to fill revision name, number and many other fields and again click on Upload. 

 

How to upload Managed Package in Salesforce.
 

 

Difference between Released manage package and beta managed package in salesforce.

Release managed package are final package which you are supposed to install on AppExchange.
Beta Managed Packages are for testing purpose. If you would like to test whether the package is working fine or not, then you can share this package with few customers for trial period and later you can release the final version of the package on AppExchange.

What are the properties/ characteristics of Unmanaged package in salesforce?

 
  1. Unmanaged packages cannot be upgraded.
  2. Unmanaged packages can be edited in salesforce as per the requirement.
  3. Unmanaged packages are open source and does not have a license or namespace.
  4. Unmanaged packages can be created in developer edition, sandbox, production.
  5. You can delete unmanaged package.
  6. You can create many unmanaged package in one salesforce instance.
  7. You can convert unmanaged package to managed package.

Salesforce Trailheads Related To Managed and UnManaged Package in Salesforce

There are many trailheads that you can practice which are related to managed as well as unmanaged packaged in salesforce.
Thus it was a complete guide about salesoforce managed, unmanaged and package.xml.If you have any doubts you can always comment and contact me from our contact us page and we will try to answer your queries as soon as possible and in case you have any suggestion on how to improve my website page, do reach out to me.

 #Note: Publishing this content anywhere without the consent of SFDC247 will result in a lawsuit against copyright infringement

SFDC247

One Comment

Leave a Reply

Your email address will not be published.