Skip to main content

Workflows

Workflows allow for a more structured process when developing content for publication. Content follows a set of steps that define the current status, editing permissions, and whether the content is live. If custom roles are enabled, a role can be created with specific workflow step permissions. For example a user with the role 'Lawyer' can be the only person allowed to edit content that is the 'Legal Review' step.

Default workflow

The default workflow for all shapes consists of two steps: disabled and enabled.

Creating a workflow

Workflows consist of a name and set of steps. Each step has the following properties, and each workflow requires a minimum of two steps.

Title - Human readable identifier that will be displayed in the content sidebar

Description - Optional step description

Color - Used to highlight the active step in the content list and version history list

Live - Boolean value that can be used to filter content that is ready for publication

Changing content status

The active step for a content item can be updated via the UI, in the content sidebar, or via the api by updating the _status field with the workflow step name.

Scheduling status changes

Content can automatically update to any workflow step where live is set to true by scheduling that change for a future date. Scheduling can be done via the content sidebar, or from the api using the queries and mutations below.

When using the api, timestamps must be in the future and should be in the format YYYY-MM-DDTHH:mmZ.

Get status update list

query ($contentId: String!, $contentTypeName: String!){
getStatusUpdateList(contentId: $contentId, contentTypeName:$contentTypeName) {
items {
id
timestamp
payload
}
}
}

variables

{
"contentId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"contentTypeName": "post"
}

Schedule status update

mutation ($input: TSScheduleStatusUpdateInput!) {
scheduleStatusUpdate(input: $input) {
id
timestamp
type
payload
}
}

variables

{
"input": {
"contentId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"contentTypeName": "post",
"status": "enabled",
"timestamp": "2020-02-28T08:31Z"
}
}

Cancel status update

Mutation ($input: TSCancelStatusUpdateInput!) {
cancelStatusUpdate(input: $input)
}

variables

{
"input": {
"contentId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"contentTypeName": "post",
"timestamp": "2020-01-01T08:00Z"
}
}

Publish Triggers

A static site can be automatically published when content is updated to a specific workflow step. Multiple triggers can be configured, and they can respond to changes in one specific shape, or any shape. This option can be found in the static site edit menu.