Connecting Page and Component Workflows in Sitecore XM Cloud

Utilizing data source workflow actions to link a page to it’s components workflow steps in Sitecore XM Cloud

September 12, 2025

By David Austin

Challenges Using Workflow in Pages

A lot of the time one will associate workflow only with page items in Sitecore. Especially when you’re using Sitecore Pages in XM Cloud. It’s completely understandable, especially as you’re working largely from a page-only perspective. The issue however is that in Pages, once a component has been added to a page, any subsequent change to the page, outside of changes to page specific fields, aren’t happening to the page. Those changes you’re making, they’re likely happening to the datasources supporting the page. That’s where the dangers lie, especially when those datasources do not have a workflow on them.

Workflows on Datasource Items Are Not Just Beneficial, They’re Crucial

While you might immediately think having workflows on page items may be all that’s necessary, having them on datasource items is more than just a nice-to-have, they’re vital. Without a workflow on a datasource, if a person was to publish the page that is in workflow, if the previous version of said page has that datasource connected to it, it will be published as well. This means any changes you may have thought were within a workflow are now live to the world. That’s because of the way that publishing in XM Cloud happens. Unlike the old way where a page could be published separate from its datasource, in XM Cloud, the layout of the page is rendered during publishing, meaning the data within the datasource is grabbed at that time.

In Pages, you can get immediate feedback that a datasource has a workflow when upon editing text within the component, you’ll get a prompt that a new version of said datasource has been created and entered workflow. If you’re not seeing that message, there are only a few reasons for it. Either you’re on your local environment, you’re an admin, or the component doesn’t have a workflow attached to the datasource’s templates.

Having a datasource in workflow is just part of the solution though. There is presently no way within Pages to alter a components datasource version or move it through workflow. You’d have to go back to Content Editor to manage it.

Let’s now link Page workflows and Component workflows so that they are in sync. We can do that with what’s called, Datasource Workflow Actions.

What Are Datasource Workflow Actions?

Datasource Workflow Actions are a useful Powershell script that we can add to our item workflows to link the workflow of a Page and that of one or more components. In our example below we’re going to link the Page workflow “Demo Workflow” to the Hero Banner’s workflow “Demo Datasource Workflow”.

Now in both of our cases, the steps in both workflows are identical. This is in many cases the best way to handle workflows because then we can more accurately link steps. That’s not to say you can’t complicate workflows if the client desires, but to have an identical set of steps means that as a page progresses through workflow, the components do at the same rate.

Linking Page And Datasource Workflows

Let’s link our Demo Workflow to our Demo Datasource Workflow such that when we’re on a page and we need to move through the workflow states of the page, it too triggers identical steps on the datasource.

Navigating to the Demo Workflow item, we’re going to create a Datasource Workflow Action under Submit. So right-click on the Submit item under Draft, and Insert > Datasource Workflow Action.

Right-click menu on a workflow state showing 'Datasource Workflow Action' as an insert option.

We’re then going to do the same under Awaiting Approval. Once done you should have two items like so.

Demo Workflow showing Datasource Workflow Actions added under Submit and Approve states.

In the Command Item field we’re going to connect it to the Submit item inside our Demo Datasource Workflow, as shown below.

Command path set to Submit state in Datasource Workflow Action configuration.

Similarly, under Awaiting Approval, we’re going to link the Command Item field to the Approve item in the Demo Datasource Workflow.

Command path set to Approve state in Datasource Workflow Action configuration.

So what does this all do? Well, now, if we’re in Pages and our Page is in “Draft”, when we submit for approval, it will in turn submit any datasources on the page that are also in Draft into the Waiting for Approval state as well.

So now, when in Pages, if I use the workflow “Action” and Submit for Approval, then both the page item and the banner’s datasource will enter the same workflow state.

Sitecore content tree showing Home item with nested Data and DB items under DemoCollection.

Never Forget About Workflows

Workflows, while developers and administrators might feel like they impede construction of a site, they’re something that absolutely needs to be in place when it comes to authoring a site. Things like version control and auditing of approval and publishing steps is all too commonplace these days to forget them and leave them to the last step.

Photo of Fishtank employee David Austin

David Austin

Development Team Lead | 4x Sitecore Technology MVP

David is a decorated Development Team Lead with 4 Sitecore Technology MVPs and Coveo MVP awards, as well as Sitecore CDP & Personalize Certified. He's worked in IT for 25 years; everything ranging from Developer to Business Analyst to Group Lead helping manage everything from Intranet and Internet sites to facility management and application support. David is a dedicated family man who loves to spend time with his girls. He's also an avid photographer and loves to explore new places.