User Story - Deployment Tasks

Updated 1 month ago by Copado Solutions

Deployment Tasks Overview

A deployment task is an action you can add to a user story for it to be executed every time the user story is deployed to an org. This task is added to the deployment record as a deployment step and it’s positioned either before or after the Git Promotion / MetaData deployment step. Depending on the kind of action you want to execute, there are several types of deployment tasks you can create together with their equivalent deployment steps:

  1. Manual Task
  2. Data
  3. Data Template
  4. Bulk Data
  5. Delete MetaData
  6. Custom Settings
  7. Apex
  8. URL Callout
  9. Salesforce Flow

When a user story is deployed to the next environment, the tasks included in that user story are converted into the equivalent deployment steps.

You can add several deployment tasks to a user story. The list of user story tasks shows the Order, Type and Status fields, and tasks are sorted by order:

Tasks sorter by order

Copado also allows you to add attachments to deployment tasks. This way, it is easier to find related attachments when all tasks are combined in a promotion:

Attach File option

The Owner field in manual deployment tasks allows you to assign the task to a user, that can be notified via chatter, email or both, so your deployments won't get stuck again awaiting manual intervention.

In manual tasks, you can also select the environments to which the task should be applied in the Apply to picklist field. You can choose to apply a manual task to all the environments in the pipeline or to specific environments. If you don’t specify anything, the task is applied by default in all environments. Additionally, you can specify whether the task should apply or not to back-promotions. If you don’t want to enforce a particular manual task on back-promotions, simply select the Disable Task for Back-Promotions checkbox.

Disable Task for Back-Promotions

How to Create a Deployment Task

To create a deployment task, follow the steps below:

  1. Navigate to a User Story record.
  2. Click on Related and navigate to the Deployment Tasks related list.
  3. Click on New and select an option from the Type drop-down menu:

  1. Fill in all other relevant fields and click on Save.

Deployment Tasks Order

When you add several deployment tasks to a user story, each task has an order number, which indicates the order in which they will be executed once the user story is deployed. When you have multiple user stories with deployment tasks in a promotion, the order is based on the user story number, that is, the tasks on the user story with the lowest number are executed first. Let’s take a look at the chart below to see how this works:

As you can see in the chart above, when the promotion deployment is executed, the user story tasks are converted into deployment steps. These steps are then deployed following the user story merge order and the deployment task order within each user story. The tasks from US-0000005 get deployed first and those from US-0000010 get deployed last.

Please note that you need at least read permissions in the Deployment Task object and proper FLS in the dataJSON__c field of the Deployment Task object to use this feature.


How did we do?