After successfully completing a checkOnly deployment, is it possible to programmatically run the "Quick Deploy" action?


sfdx force:mdapi:deploy -d dist/my-pkg -w 5000 -c

enter image description here

I don't see anything via the metadata API, but maybe there is a less "official" way to achieve this?

2 Answers 2


There is --validatedeployrequestid or -q flag for force:mdapi:deploy

-q, --validateddeployrequestid=validateddeployrequestid request ID of the validated deployment to run a Quick Deploy

To run quick deploy of a recently validated package, use -q with the validated ID.

sfdx force:mdapi:deploy -q <validationRequestId> -w -1

Also in Metadata API you can use deployRecentValidation() method

  • epic! Not sure how I missed that
    – NSjonas
    Nov 15, 2019 at 19:25

You could script this by re-directing the validation deploy command output to a text file using "tee".

The text file would contain the Salesforce Deploy ID.

Then, you can just extract the ID from the text file using shell commands and use the ID in the -q flag for a quick deploy.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .