Schedule Push Upgrades
- Authenticate to your main development org (not the patch org you used to upload the new version) according to the tool you’re using.
- 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.Note If you are retrieving more than 2,000 subscribers, use theSOAP APIqueryMore() call.
- 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 theStatus 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 cannot abort a push upgrade that has a status of Canceled, Succeeded, Failed, or InProgress.Note If you are pushing the upgrade to more than 2,000 subscribers, use the Bulk_API to process the job in batches.