No results for ""
EXPAND ALL
  • Home
  • API docs

Workflow templates

Read time: 3 minutes
Last edited: Oct 02, 2024

Overview

This topic explains how to create and use workflow templates to automate your rollouts at scale. It describes how to save workflows as templates that can be reused with other flags.

About workflow templates

If your organization follows a standard procedure for progressive rollout workflows, maintenance window workflows, or other custom workflows, you can turn that workflow into a template so other account members can use it. Workflow templates are saved versions of workflows that you can apply and use with any flags in your account.

Progressive rollouts are also a built-in feature of LaunchDarkly

If you are interested in gradually rolling out a particular flag variation to more contexts over a defined period of time, we recommend that you use the separate progressive rollout feature instead of setting up a template for a progressive rollout workflow.



Progressive rollouts are an option on a flag's targeting rule to serve a given flag variation to a specified percentage of contexts, and gradually increase that percentage over a specified time. They are a built-in feature that supports the most common use case for workflows. We recommend using progressive rollouts instead of workflows or workflow templates if they meet your needs, because progressive rollouts are easier to set up, and because the flag variation that any particular customer encounters changes only once over the course of the rollout. To learn more, read Progressive rollouts.

How workflow templates are applied across flags

You can apply workflow templates to any flag in any environment or project, regardless of which environment or project you create them in.

When you apply a template to a different flag or environment from where it was created, any environment or flag specific pieces of the workflow, such as variations, segments, or contexts are cleared. LaunchDarkly prompts you to fill in these blanks with appropriate values for the new flag and environment.

Save a workflow as a template

Here is how to save a workflow as a template:

  1. Navigate to a feature flag.
  2. Click Manage workflows in the right sidebar.
  3. Click Custom build.
  4. Build the workflow with the steps that you’d like each flag to follow.
  5. Click Save as template.
  6. Give the template a name, a key, and add an optional description. Then click Next.
  7. Click Start workflow if you would also like to run the workflow on the flag.

Apply templates to flags

Here is how to apply a template to a flag:

  1. Navigate to a feature flag.
  2. Click Manage workflows in the right sidebar.
  3. Click Existing template.
  4. Search for the template that you would like to use on the feature flag.
  5. Review the workflow and enter any missing details.
  6. Click Start workflow to begin the workflow.

Delete templates

Templates can only be deleted through the API.

Use the REST API: Delete workflow template