Promotion Deploy Action

Updated 1 month ago by Copado Solutions

The Promotion Deploy action is one of the standard Copado actions and is responsible for two processes:

  1. Merging the feature branches of the user stories included in the promotion.
  2. Reporting merge conflicts and resolving them.
  3. Preparing the merge information for the deployment action.
  4. Deploying the changes to the destination environment.
  5. Merging the promotion branch with the branch of the destination environment if the deployment is successful.

Like all other standard actions, it is divided into three parts:

  • An Apex invocable method. This method is responsible for the following actions:
    • Creating the Promotion record and linking the user stories to it.
    • Generating the DataJson field in the Job Execution record.
    • Preparing a json file with a list of all the metadata included in the user stories.
  • An execution process that consists of a deployment job template that includes the function that will perform the action.
  • The job callback which can apply some custom logic (for instance, updating a field) when the job execution ends.

How and where is the promotion deploy action triggered? The promotion deploy action can be executed in multiple scenarios. Let’s take a look at some of these options.

Triggered From


Promotion page

Using the Merge & Deploy Changes button.

User Story

Flagging the Promote & Deploy checkbox.


Using the sfdx copado:work:submit -d command.

For more information about how the deployment process works, review the article Deployment Process in Multi-Cloud.

How did we do?