How to Create and Register a Package
Packages provide you a powerful way to distribute on-demand. Packages are like suitcases that can contain your components, code, or apps. You can use a package to bundle something as small as an individual component or as large as a set of related apps.
Unmanaged packages can be used for one time distribution, like a template. Managed packages are ideal when building an app with plans to upgrade. Packages can be distributed privately amongst a community, or listed publicly on the AppExchange, the worlds on-demand applications marketplace.
Be sure to get a free Developer Edition account, so you can begin developing and packaging your app.
Follow these steps to package your app and distribute through the AppExchange:
- Create a Custom App
- Create a New Package
- Unmanaged vs. Managed
- Creating a Managed Package
- Upload your Package
- Register your Package
NOTE: If your App does NOT have a Package (i.e. Client App, Integration Tool), you can skip this process and create a blank listing inside the AppExchange.
Create a Custom App
Force.com is the on-demand multitasking environment offered by Salesforce.com. It enables users to switch between apps with a single click, through the Force.com apps menu which displays at the top of every page.
Navigate to Apps within Setup. Go to Setup | App Setup | Create | Apps and select New and follow the wizard.
Step 1. Enter the Details - Provide a Label and Description for your Custom App
Step 2. Choose the Image Source for the Custom App Logo
- Check the Externally Available Image checkbox
- This logo must be stored in a Public folder within the Documents Object - NOT My Personal Documents
Step 3. Choose the Tabs - Select the Standard and Custom Tabs that make up your app
Step 4. Assign to Profiles - Make your app Visible and/or Default for select Profiles
Save and see your new app in the top-right drop-down!
Now that you've created your Custom app, let's see how we can start the packaging process.
Create a New Package
A package contains items such as apps, objects, reports, or email templates. These packages can be uploaded to share with others privately or posted on the AppExchange to share publicly.
Navigate to Packages within Setup. Go to Setup | App Setup | Create | Packages and select New
Step 1. Enter the Details - Provide a Package Name and Save
Step 2. Add Items to the Package - Select Add More or Add
Step 3. Select Item Type - Select any of the items in the drop-down list. Be sure to review the documentation to see what is automatically included with package items.
Step 4. Select Add to Package - Once you have selected the item, you can check the items you want to add to the package. Note: Once an item has been added to the package, it will not show up in the list.
The steps above explain how to create a Unmanaged Package. If your intent is to distribute this application commercially and you envision future releases, we recommend using a Managed Package. The next section describes the difference between Unmanaged and Managed Packages.
Unmanaged vs. Managed
Managed packages are AppExchange packages that can be upgraded in the installer's organization. They differ from unmanaged packages in that some components are locked, allowing the upgrade process. Unmanaged packages do not include locked components and can not be upgraded.
Before the Winter '07 release, all packages were unmanaged. Now, you can convert an unmanaged package to managed to ensure your installed users get upgrades.
| Unmanaged Package | Managed Package | |
|---|---|---|
| What | Completely Editable by Developer and Installer
Can NOT be upgraded |
Certain Components are locked
|
| When to Use | 1:1 Distribution
Extensive Modification Required |
1:Many Distribution
|
| Editions Supported | All Editions can create Unmanaged Packages | ONLY Developer Edition can create Managed Packages |
Managed packages differ from unmanaged packages in many other ways. Before creating managed packages, here are a few things to consider:
- You must use a Developer Edition organization to create and work with a managed package.
- A Developer Edition organization can contain a single managed package and many unmanaged packages.
- You must register a Namespace Prefix - A Namespace Prefix is a series of characters prefixed to your Custom Objects and Fields to prevent conflict when installed in another salesforce.com org.
When you release a managed package, meaning it is uploaded with the Managed - Released option selected, the properties of its components change to prevent developers and installers from making harmful changes. For a list of each package component type and their properties, see Properties of Managed Packages. If you do not want to offer upgrades to your package, consider keeping it unmanaged.
If you plan to release your app as a Managed Package, please read out guide on Planning the Release of Managed Packages
If you already have a Unmanaged Package and you'd like to convert it to Managed, please review the following: Converting Unmanaged Packages to Managed
Now that you understand the difference and benefits of each type of package, let's see how easy it is to make your Unmanaged package from above into a Managed Package.
Creating a Managed Package
Now let's see how we can turn our package from above into a Managed Package.
Edit your Developer Settings - Navigate to Packages within Setup. Go to Setup | App Setup | Create | Packages and select Edit under Developer Settings
Step 1. Register a namespace prefix - A namespace prefix is a 1-15 character alphanumeric ID that distinguishes your package and its contents from those of other Apex developers.
Step 2. Choose the package you want managed - Remember: You are only allowed one managed package in a Developer Edition org
Step 3. Review and Save - NOTE: Once you have chosen your Namespace, it CANNOT be changed or reused in any other Developer Edition org.
Congratulations! You have successfully converted your Unmanaged Package from above into a Managed Package. NOTE: You cannot convert a Managed Package back to Unmanaged. You would need to delete the package and start from scratch.
You can confirm your package is Managed when you see all the green values in the Developer Settings. Also, you'll notice a Beta icon
next to the package. This means the Managed Package is in Beta, so the package and app can still be completely modified. To lock your Managed Package, you will need to upload it as a Released-Managed Package. This will be described in the next section about Uploading.
Upload your Package
Uploading your package begins the process of sharing. When you upload, your app can then be installed into other orgs. Once your upload completes, you will be able to share an installation link with other salesforce.com users. A package must be uploaded first, if you plan to create a Private or Public listing.
Note: If your package contains any Apex Code (Classes or Triggers), you must ensure at least 75% of your Apex scripts are covered by unit tests, and all of those tests complete successfully. More information about Apex Code test coverage can be found here. Salesforce recommends that you have 100% of your scripts covered by unit tests, where possible.
Uploading an Unmanaged Package or Managed Package is very similar. Below are the steps:
Step 1. Go to your Package - Go to Setup | App Setup | Create | Packages and drill into the package you will to upload.
Step 2. Upload a Version - Select Upload Now or click the Upload button - NOTE: You must Add Items to your Package before you can Upload.
Step 3. Define a Version # and other details - This page will vary depending on the package type.
This is the Upload page when you try to upload an Unmanaged Package
This is the Upload page when you try to upload a Managed Package
You'll notice the difference is the Type section in the Managed Package Upload image. Managed packages are uploaded in one of two states: Managed - Beta
or Managed - Released
. Things to consider:
- Managed-Beta Packages can only be installed in Developer Edition or Sandbox orgs - See documentation for more details
- Managed-Released Packages cannot be rolled back to Beta and will have a certain components locked - See documentation for more details
Step 4. Wait for Upload to Complete - Once package is uploaded, you will see the Installation Link, so you can begin sharing this app with other salesforce.com users.
If your package was a Managed-Beta upload, then your process ends here. You can begin sharing the installation link so other DE and/or Sandbox users can install your app. For DE users, use the installation link as is. For Sandbox users, change the "login" word in the Installation Link URL to "test". Everything else in the URL can remain the same.
If you uploaded a package that was Unmanaged or Managed-Released, you can Register your Package to create the Private listing. Private listings must be created and review to finally go Public. The next section will go over the Registration process.
Register your Package
Registering your package is the first step to making your app available publicly on the AppExchange. Registering your package creates a Private listing and URL that you can share with others. You must go through the AppExchange Review process to make your private listing public.
Step 1. Proceed to the AppExchange - To Register, click Proceed to the AppExchange to register from the package upload detail page.
Step 2. Log into the AppExchange - To log into the AppExchange, select the Login or Register tab on the top right. Your Publisher Login is the SAME login you use to access your Developer Edition to build the app.
Step 3. Create New Listing or List your Package - You can either create a new blank listing and associate your package later or you can select List It in the Your Uploaded Packages section to generate the private listing of your package.
Now that your package is uploaded, you can also start editing your private listing. Log into the AppExchange to get contextual help with building your listing.
















