Meet ACME corp—a fictitious company with a real problem
ACME Corp is a telecommunications company that often needs to publish product pages for the mobile phones they are selling through their website.
The team that prepares and publishes the product pages is made up of:
- Two authors that are responsible for creating the copy and pasting the device specs into the new product pages
- One editor who is responsible for the accuracy and quality of what gets published
- A legal department making sure that the contracts are correct
ACME Corp is on top of their game when it comes to writing great copy. But the major problem is that they have no content approval workflow in place. Let’s fix that!
Setting up the content model
Before you start, you need to set up your content model to describe the workflow status of the entry.
Review State, shown above, is the field that indicates where in the flow the entry sits and promotes it to the proper views and channels based on this filter.
You can set the Review State to any of the following three values:
- Needs review: Set by the author when they have created a draft and wants it to be reviewed by an editor.
- Needs changes: Set by the editor when a draft gets rejected, and changes are needed. This setting can also be used for when an entry is live but needs to be updated.
- Ready to publish: Indicates that the editor is satisfied with the content and sees it fit for publication.
The Approved by Legal checkbox
The Approved by Legal checkbox is required and must be ticked by the legal department before publication. This will prevent an editor from accidentally publishing an entry before any potential legal implications have been sorted out.
Indicating roles and permissions
Any organization needs to make sure that only certain people can publish content and/or edit the Review State fields.
The permissions matrix looks like so:
|Roles||Can edit "Review status" field||Can edit "Approved by legal" field||Can edit the rest of the fields||Can publish content|
Creating saved views
Lastly, you can leverage the saved views functionality to make sure that each role can see the content they need to act on.
You can create saved views using the appropriate action on the sidebar:
- Needs review: Search for reviewState : "Needs review" and save this as a new view. Both editors and legal will use this.
- Needs changes: Search for reviewState : "Needs changes" and save this as a new view. This will be relevant to the author that needs to rework some content.
- Ready to publish: Search for reviewState : "Ready to publish" & approvedByLegal : Yes and save this as a new view. This takes into account the legal department’s participation and waits for the editor to hit the publish button.
With the just released feature of assigning views to specific roles, you can also make sure that each of your team members can only see the view that applies to their workflow.
Extra step: Automatic notifications on state change
You can use webhooks to completely automate notifications via email, Slack, or any other medium. One way of doing this is by using Zapier—a service that connects apps. Zapier has a number of integrations for Contentful, including support for the following triggers and actions:
- New Entry: Triggers when an entry gets published in Contentful.
- New Asset: Triggers when an asset gets published in Contentful.
- Create Asset: Creates an asset in Contentful.
- Create Content Type: Creates a content type in Contentful.
- Create Entry: Creates an entry in Contentful.
As there are changes in the field values, but not on the content state, you need to set up your webhooks to trigger on every autosave.
Then, with the Zapier integration, you can send messages to your Slack channel anytime a change happens:
Note that by default you will get a notification anytime a change occurs. This works well for smaller teams with a more modest amount of content. But as you scale, you will need to apply some throttling logic.
The lifecycle of a page
Each row in the table below represents an action taken by either an author, editor or the legal department — and you can see how each action affects the page’s status:
|Step||Entry Status||Review Status||Approved By Legal||Shows In Saved Views|
|Author submits draft entry for review||Draft||Needs review||-||Needs review|
|Editor rejects draft and requests more changes||Draft||Needs changes||-||Needs changes|
|Author re-submits entry for review||Draft||Needs review||-||Needs review|
|Editor approves||Draft||Ready to publish||-||Needs review|
|Legal approves||Draft||Ready to publish||Yes||Ready to publish|
|Editor publishes||Published||Ready to publish||Yes||-|
|Editor requests changes on published||Published||Needs changes||Yes / - (depending on editor's intention)||Needs changes|
|Editor publishes||Published||Ready to publish||Yes||Ready to publish|
In each step described above, and if you’ve enabled webhooks, a webhook gets fired so that you can, in turn, trigger your relevant notifications.
If the last two steps were not needed, but a change was still published, there is a quick way to revert this version to the correct, previous version by using our versioning feature.
Pros and cons of this content approval workflow
- You can be very flexible with your setup.
- Almost everything is accessible from the API, which can support some strong use cases. For example, a busy approver like a hands-on CEO or a freelancer for the legal department can approve an entry directly from the preview environment without ever having to enter the Web App. Or they could also receive an email with the entry and approve it just by clicking a button within the email.
- You can't use this out of the box—you have to spend time configuring the content approval workflow.
- You need to do some manual work around your notifications set up with webhooks.
We need your expert opinion
This is a robust, suggested solution that will help you solve your content approval workflow problems. But we understand that there is, of course, room for improvement. That’s why we want your feedback, ideas, and experience. Your feedback will help us to evolve the support for custom content approval workflows.
Suggested further reading
Here's a list blog posts and documentation to help you learn even more about how to manage content.