Newer Version Available
Scheduling Push Upgrades
After you’ve created an updated version of your package, you can automatically deploy
it to customers using a push upgrade.
| User Permissions Needed | |
|---|---|
| To push an upgrade: | Upload AppExchange Packages |
- Push the upgrade to your own orgs so you can run tests and fix any bugs before upgrading subscribers.
- When you’re ready and have coordinated with your customers on their change management process, push to a small number of customer organizations. Try sandbox organizations first, if possible.
- After you’re comfortable with the initial results, push to your wider customer base, based on your agreements with each customer.
- Deprecate the previous version of your package in your main development organization. Replace the version on AppExchange if necessary, and update your Trialforce setup.
- If your upgrade was a patch, after you’ve successfully distributed the upgrade to subscriber organizations, reintegrate those changes into your main development organization. For more information about combining patches in the main development organization, see Working with Patch Versions.
Schedule a Push Upgrade Using the UI
- Log in to your main development org (not the patch org you used to upload the new version).
- From Setup, enter Packages in the Quick Find box, then select Packages.
- Click the name of the managed package whose upgrade you want to push.
- On the package detail page, click the Versions tab, and then click Push Upgrades.
- Click Schedule Push Upgrades.
- Select a package version to push from the Patch Version dropdown list.
- For the scheduled start date, enter when you want the push upgrade to begin.
- In the Select Target Organizations section, select the orgs to receive your push upgrade.
If an org already received a push upgrade for the selected package version, it doesn’t
appear in this list. You can select orgs by:
- Entering a term that filters based on an org’s name or ID. Names can match by partial string, but IDs must match exactly.
- Choosing between production and sandbox orgs from the Organizations dropdown list.
- Choosing orgs that have already installed a particular version.
- Clicking individual orgs or the Select All and Deselect All checkboxes.
- Click Schedule. While a push upgrade is in progress, you can click Abort to stop it.
Schedule a Push Upgrade Using the Enterprise API
- Authenticate to your main development org (not the patch org you used to upload the new version).
- Determine the package version you want to upgrade subscribers to by querying the MetadataPackageVersion object.
- Gather the list of subscriber orgs that are eligible to be upgraded by querying the PackageSubscriber object.
- Create a PackagePushRequest object. PackagePushRequest objects take a PackageVersionId and, optionally, a ScheduledStartTime parameter to specify when the push begins. If you omit the ScheduledStartTime, the push begins when you set the PackagePushRequest's status to Pending.
- Create a PackagePushJob for each eligible subscriber and associate it with the PackagePushRequest you created in the previous step.
- Schedule the push upgrade by changing the status of the PackagePushRequest to Pending.
- Check the status of the PackagePushRequest and PackagePushJob objects by querying the Status fields. If the status is either Created or Pending, you can abort the push upgrade by changing the status of the PackagePushRequest to Canceled. You can’t abort a push upgrade that has a status of Canceled, Succeeded, Failed, or In Progress.
For sample code and more details, see SOAP API Developer Guide.