Schedule a Push Upgrade Using SOAP API for First- and Second-Generation Managed Packages
After you’ve created an updated version of your package, you can automatically deploy
it to customers using a push upgrade.
For code samples and more detailed steps, see SOAP API object documentation linked in
each step.
- Authenticate to your Dev Hub org.
- Query MetadataPackage to verify package details.
- Query MetadataPackageVersion to verify the package version to use for the push upgrade.
- Query PackageSubscriber to retrieve details about subscriber orgs such as the org ID and installed package version. To retrieve information about more than 2,000 subscribers, use SOAP API queryMore() call.
- Create a PackagePushRequest object. Specify the PackageVersionId and ScheduledStartTime (optional). If you omit the ScheduledStartTime, the push begins when you set the PackagePushRequest's status to Pending.
- Create a PackagePushJob for each 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.