Create and Export Unmanaged Package Zip File in Salesforce
Unmanaged packages provide a handy way to move Salesforce components like Apex classes, flows, and custom objects between orgs, especially for one-time deployments or learning. This guide walks through creating a package.xml file, retrieving metadata using Workbench, packaging it as a ZIP file, and deploying it to another org. It addresses the problem of lost packages when deleted in the source org by enabling ZIP file usage for deployment elsewhere. Salesforce teams can leverage this method to securely export and deploy metadata using CLI or Metadata API tools when UI deployment is limited.
- Create a package.xml specifying metadata to retrieve via Workbench or CLI.
- Download unmanaged package components as a ZIP file for backup or deployment.
- Include dependent components like custom objects when packaging flows to avoid deployment errors.
- Use Workbench Migration options to retrieve and deploy metadata ZIP files between orgs.
- Enable Rollback on Error during deployment to maintain org integrity.
In Salesforce, deployment is an important part of development. Developers often need to move metadata like Apex classes, triggers, flows, and objects from one org to another. One of the most commonly used methods for this is an Unmanaged Package . In many real-time projects, developers also need to create a ZIP file of the package for deployment using tools such as the Metadata API or the Salesforce CLI. In this article, we will understand: What is an unmanaged package Why do we create a ZIP file Step-by-step process Real-time use cases Common mistakes To create an unmanaged package in Salesforce, we use the package manager that adds components and generates an installation URL after uploading the package. This is a very easy way to create and deploy a package in Salesforce, allowing others to install it directly without using VS Code or Workbench. The issue arises when the package created in the source org is deleted.