Workflow

Workflow is a tool that allows you to streamline the process of content creation and publishing. It lets you better manage the content lifecycle of your project.

Only the Owner(s)/Admin(s) of a stack can define a Workflow, depending on the content requirements of the stack.

Note: Each stack can have only one Workflow.

Understanding Workflow

Defining a Workflow involves defining ‘Workflow Stages’ as well as ‘Publish Rules’. Read on to understand what both of these elements mean and how they work.

How Workflow Stages work

Workflow Stages are the states of the content lifecycle which your content (entries) pass through on their way to being published. These might include, for example, ‘Draft’, ‘Ready for Review’, ‘Needs Changes’, ‘Add Media Files’, ‘Needs SEO’, ‘First Review Done’, and ‘Complete’.

Contetnstack Workflow Stages.jpg

Contentstack provides two default stages: Draft and Complete. Owners/Admins can add custom stages between these two default stages, depending on the content requirements of the stack. Learn how to add Workflow Stages.

Once added and enabled, these stages are visible on every entry of all the content types of the stack. They help content managers identify the levels which content has to go through, and then push content from one stage to another.

Whenever a new entry is created by a user, it is always assigned the ‘Draft’ stage. Users can work on a stage, and then assign the next stage to other users along with a Due Date and a Note. Learn how to manage/change Workflow Stages.

Every time an entry is assigned to a user, it is added as a new task in the assignee’s ‘My Task’ section. From this section, the user can go to the entry, work on it, and then assign it to another user. Similarly, the process continues until the entry reaches the end of the content creation lifecycle (i.e., ‘Complete’ stage). Learn about ‘My Tasks’.

Workflow Stages Overview.png

How Publish Rules work

Publish Rules are approval rules that you can add to entries of a content type. This includes adding users as publishing approvers. Once such a rule is in place, any entry of the selected content type cannot be sent for publishing on a specific environment without the approval of approvers. 

A rule is typically made of five parameters: Environment, Content Type, Action, Language, and Approver. By defining a rule, you are adding one or more approvers to publish or unpublish action of an entry to an environment. This rule can be specific to a content type or a language.

Once a rule is in place, whenever a content manager attempts to publish/unpublish an entry on the specified environment, an approval request will first be sent to the user(s) added as approvers. Only if the request is approved can the content manager publish the entry to the specified environment.

Publish Rules Overview.png

Set up a Workflow

Before you get started with setting up a Workflow, it’s important to know a few things about Workflows.

  • Workflows are available only if they are part of your subscription plan.
  • Only Owners/Admins of a stack can set up a Workflow
  • Each stack can have only one Workflow

Setting up a Workflow involves adding ‘Workflow Stages’ and adding ‘Publish Rules’ for the stack. Let’s look at how you do this.

Add a Workflow Stage

If you are the Owner or Admin of a stack, you can add Workflow Stages by following the steps below:

  1. Log in to your Contentstack account and click on the relevant stack.
  2. Navigate to ‘SETTINGS’ and select ‘Workflow’. This will open the Workflow Settings page, which has two sub-sections: ‘Workflow Stages’ and ‘Publish Rules’. By default, the ‘Workflow Stages’ is open.
  3. Click on 'Enable Workflow Stages'. You will see that Contentstack provides two system-defined stages: ‘Draft’ and ‘Complete’.
    Enable Workflow Stages.png
  4. You can add custom stages (Ready for review, needs SEO tags, ready for publishing, etc.) anywhere between ‘Draft’ and ‘Complete’. To add a new stage, click the ‘+ Add Stage’ button that you see between stages (see above screenshot), add relevant name and description, select a label color (by clicking on the color block) for the new stage, and click on ‘Save’.
    Add a Workflow Stage.png

Note: You can add a maximum of 18 custom stages. This means that a workflow cannot have more than 20 stages (including ‘Draft’ and ‘Complete’).

This will enable the workflow feature for all entries of all the content types of the stack.

Update a Workflow Stage

To update Workflow Stages, perform the steps given below:

  1. Navigate to ‘SETTINGS’ and select ‘Workflow’. This will open the Workflow Settings page, which has two sub-sections: ‘Workflow Stages’ and ‘Publish Rules’.
  2. By default, you will be on the ‘Workflow Stages’ page that will display all the available stages of the Workflow. Click on the 'Edit' icon beside the Workflow Stage that you want to update.
    Edit Workflow Stage.png
  3. This will open a small form that will allow you to modify the ‘Name’, Description’, and label color of the Workflow Stage.

Delete a Workflow Stage

To delete Workflow Stages, perform the steps given below:

  1. Navigate to ‘SETTINGS’ and select ‘Workflow’. This will open the Workflow Settings page, which has two sub-sections: ‘Workflow Stages’ and ‘Publish Rules’.
  2. By default, you will be on the ‘Workflow Stages’ page that will display all the available stages of the workflow. Click on the delete icon available on the right-hand side of the Workflow Stage that you want to delete.
    Delete a Workflow Stage.png

Enable/Disable Workflow Stages

You can enable or disable the ‘Workflow Stages’ feature for your stack at any time. To enable/disable Workflow Stages, perform the steps given below:

  1. Navigate to ‘SETTINGS’ and select ‘Workflow’. This will open the Workflow Settings page, which has two sub-sections: ‘Workflow Stages’ and ‘Publish Rules’.
  2. By default, you will be on the ‘Workflow Stages’ page that will display all the available stages of the workflow. Check or uncheck the ‘Enable Workflow Stages’ to enable or disable the Workflow Stages, respectively.
  3. Enable-Disable Workflow Stage.png

Add a Publish Rule

A Publish Rule is adding a rule for publishing or unpublishing an entry. Adding a rule includes adding an approver for actions (publish/unpublish) to be performed on the entries of specific content types in specific environments, or the stage at which the entry can be published/unpublished.

Setting up ‘Publish Rules’ in your Workflow is optional. To set Publish Rules, follow the steps given below:

  1. Navigate to ‘SETTINGS’ and select ‘Workflow’. This will open the Workflow Settings page, which has two sub-sections: ‘Workflow Stages’ and ‘Publish Rules’.
  2. Click on ‘Publish Rules’.
  3. You can either click the ‘+ ADD RULE’ button or the 'Add a new rule' link to add a new rule.
    Add Publishing Rule button.png
    In the new rule form, you will see five fields:
    • Environment: Select the environment for which you want to set the rule.
    • Action: Select if you want to add approvers for publish, unpublish, or both action on entries.
    • Content Type(s): Select content type. The rule will be applicable to the entries of content type(s) you select here. Select ‘Select All’ for all content types.
    • Language(s): Select if you want to apply this rule for a specific language. Select ‘Select All’ for all languages.
    • Approver(s): Add users as approvers. The entries of the specified content types and languages cannot be published or unpublished without the approval of the users you add here.
    Create a Publishing Rule.png
  4. Click ‘Save’.

This will save the Publish Rule. You can add multiple rules for your Workflow.

Update a Publish Rule

To update an existing Publish Rule from your Workflow, follow the steps given below:

  1. Navigate to ‘SETTINGS’ and select ‘Workflow’. This will open the Workflow Settings page, which has two sub-sections: ‘Workflow Stages’ and ‘Publish Rules’.
  2. Click on ‘Publish Rules’.
  3. Click on the rule that you want to update. This will expand the rule card.
  4. Make changes to the required fields, and click ‘Save’.

Update a Publish Rule.png

This will update the Publish Rule.

Delete a Publish Rule

To delete an existing Publish Rule from your workflow, follow the steps given below:

  1. Navigate to ‘SETTINGS’ and select ‘Workflow’. This will open the Workflow Settings page, which has two sub-sections: ‘Workflow Stages’ and ‘Publish Rules’.
  2. Click on ‘Publish Rules’.
  3. Click on the rule that you want to delete. This will expand the rule card.
  4. Click the ‘Delete’ button on the right-hand side bottom corner of the rule card to permanently delete the rule from your Workflow.

 Delete a Publish Rule.png

Once you define ‘Workflow Stages’ and ‘Publish Rules’, content managers can start working with Workflows. In the next section, we will learn how content managers can use Workflows.

Working with Workflows

If, for a particular stack, ‘Workflow Stages’ are enabled and ‘Publish Rules’ have been added, you can see the Workflow details in the entries in the right-hand side panel, under ‘Status’.

Under ‘WORKFLOW DETAILS’, you will find the current stage of the entry along with the due date, and the user to whom the entry stage is 'Assigned to'.

Working with Workflows - Workflow details.png

To see the Publish Rules, click on the 'Publish Rules' button at the bottom of the page. This opens the PUBLISH RULE(S) panel, with all the details, on the right-hand side of the entry page. However, these rules will be visible only if the rules have been applied to the content type associated with the the entries you are viewing.

Working with Workflows - Publish Rules.png

In the following guide, we will understand how content managers can use Workflows in entries, assuming that ‘Workflow Stages’ are enabled and certain ‘Publish Rules’ have been added in a workflow.

Entry Default Workflow Stage

When you create a new entry and save it, the entry is, by default, assigned the ‘Draft’ stage, with no users in ‘Assigned to’ and no due date.

Changing Entry Workflow Stage

Once you are done working on a particular stage of an entry (for e.g., Draft), you can change the stage of the entry (for e.g., Ready for Review) and assign a user to work on the next stage. You can also add a due date for the next stage. Let’s look at how it’s done.

  1. On the entry page, go to the ‘Workflow Details’ section under the 'Status' section on the right-hand side panel. You will see the current stage of the entry, along with the stage’s color label.
  2. Click the ‘Change’ link located beside the stage name. This will open a new window, where you can make changes to the Workflow Stage of the entry.
    Change Entry Workflow.png
  3. Under ‘Set Workflow Stage’, select the stage that want to set for this entry.
    Entry Page Workflow Settings.png
  4. Under ‘Set Due Date’, click on the date picker tool to set the due date for this new stage.
  5. Assign this stage to one or more users of your stack. To assign it to a user, click on the ‘Assign to’ field, and select the user(s) from the list.
  6. You can also choose to send a notification email to the assignee by checking the ‘Notify via email’ checkbox.
  7. Lastly, add comments, if any, in the ‘Add Comment’ field. A comment could be a short description or guidelines to the assignee on what needs to be done in the next stage.
  8. Click ‘Update’.

This will update the Workflow Stage of the entry.

As soon as an entry stage is assigned to a user, it is added as a new task in the ‘My Task’ section of the assignee. Learn more about My Tasks.

Send an entry for publish/unpublish approval

If a ‘Publish Rule’ has been set for a particular content type(s)/language(s), you will see it under the ‘Publish Rules’ section. There are two ways to send an entry for publish/unpublish approval.

Via the right-hand side panel

  1. On the entry page, look for the ‘Publish Rules’ button at the bottom of the page. This opens the PUBLISH RULE(S) panel, with all the applicable publish rules, if any.
    Working with Workflows - Publish Rules.png
  2. Under the rule, you will see ‘Request Approval for latest version’ (marked in the above screenshot).
  3. Clicking the ‘Request Approval’ link will send the entry for approval to the approvers.

Once a request has been sent, you will see the current status of the request (Pending approval, Approved, Rejected) in the same section.

Via the Publish modal

  1. Click the ‘Publish’ button located at the bottom of the page. This will open the publishing modal, where you can select the environment and language for publishing the entry.
  2. If a rule has been applied on any of the selected environment or language and has an approver, clicking on 'Send' will send the entry for approval to the approvers.

Publish Modal.png

My Tasks

The ‘My Tasks’ page is a list of all your pending tasks. Whenever someone assigns you to work on a workflow stage on an entry, or if someone sends you an entry for publish/unpublish approval, it is added to your ‘My Tasks’ page. Each stack has a separate ‘My Tasks’ section.

To navigate to your ‘My Tasks’ section, follow the steps given below:

  1. Sign in to your Contentstack account
  2. Go to a stack
  3. Click on the ‘My Tasks’ icon beside the Help icon (question mark ‘?’) located on the top right-hand side corner.

 My Tasks.png

Completing tasks

Tasks remain in your stack’s ‘My Tasks’ section until they are completed. To complete tasks, you need to perform the action that is required for the task. Let's look at the various ways in which tasks can be completed. 

  • If someone has assigned you to work on a stage of an entry, this task will remain in your ‘My Tasks’ until you work on the stage, and assign it to some other user.
  • If you have received an approval request to publish an entry, the task will remain in your ‘My Tasks’ until you ‘approve’ or ‘reject’ the request.
  • If you have sent an approval request to publish an entry, it will remain in your ‘My Tasks’ until the approver approves or rejects the request, and then you take the corresponding action. Details given in the following points.
  • If your approval request to publish/unpublish an entry is approved by the approver, the task will remain in your ‘My Tasks’ until you publish/unpublish the entry.
  • If your approval request to publish/unpublish an entry is rejected by the approver, the task will remain in your ‘My Tasks’ until you make relevant changes in the entry, and resend the entry for approval.

Using filters

You can refine tasks based on certain filters. Let’s look at the filters that you can use.

 My Tasks Filters.png

By Action
This filter lets you refine tasks based on the action that is required by you. Some of the values that you can select here are ‘Approved’, ‘Pending’, and ‘Rejected’.

By Assigned Stages
You will see the list of all the stages that are available in your workflow. If you select any stage, Contentstack will filter all the entries of which the selected stage is assigned to you.

Was this article helpful?
top-arrow