SUGNL - Navigating the shift to XM Cloud

Navigating the shift to XM Cloud

Last night, I had the privilege of presenting at the Sitecore User Group Netherlands (SUGNL), hosted by Macaw, where we dove deep into what it takes to successfully migrate to Sitecore XM Cloud. It was a great opportunity to share insights and lessons learned from our recent experiences as Macaw continues to support clients on their journey to the cloud.

Where to Start?

One key takeaway from the presentation was that successful migration requires starting at the very beginning. This means analyzing the existing Sitecore environment and downgrading from XP to XM, which is a crucial step in rethinking how components should be designed headless. Once this is in place, it’s time to move forward with the migration to XM Cloud and set up your deployment pipelines.

Migrating Content: A Clean Start

Our team’s project starting point involved managing over 50 sites, 100+ forms, 24 Sitecore pipelines, and 100+ components. As you can imagine, content migration was a huge focus for us. We outlined a content serialization strategy that involved copying production databases, restoring them in a local Docker instance running Sitecore XM v10.3, and converting components to their headless variants.

I also shared the importance of simplifying content before migrating and how our Powershell scripts played a major role in replacing non-headless GUIDs with headless versions.

Tackling Forms with react-jsonschema-form

Forms migration was another challenge we had to face, with over 100 forms, some of which were highly complex. While Sitecore Forms seemed like an obvious solution, it didn’t quite meet our needs due to limited functionality, missing sections, and custom components. Instead, we opted for react-jsonschema-form, a flexible alternative that allowed us to convert Sitecore Forms into JSON while maintaining the functionality we needed.

This wasn’t a simple task, but decluttering and simplifying overly complex forms before migrating made the process smoother.

Email Experience Manager (EXM) and Emails

When it comes to emails, Sitecore offers Sitecore Send, but in our case, the client preferred to use Salesforce. To bridge this gap, we implemented a temporary solution using Sendgrid, ensuring that existing email templates were reused and unused templates were cleaned up.

We also had to rethink post-submit actions and Sitecore webhooks to ensure seamless integration between systems.

Rebuilding the Head and Deployment Pipelines

Migrating to XM Cloud also meant rebuilding the head. We adopted a lift-and-shift approach, wrapping existing React code to comply with XM Cloud while also rebuilding a few Razor views. To manage all these changes, we emphasized the importance of well-structured deployment pipelines.

By leveraging Azure DevOps and CLIs, we created a robust CI/CD pipeline that allows for smooth deployments to XM Cloud. Using a "promote deployment" approach, we could easily test and roll out changes across environments, ensuring everything was fully vetted before going live in production.

Lessons Learned

Here are the lessons we learned during this journey:

  • Content cleanup: Always clean up your content before migration.
  • Repeatable migrations: Create a repeatable migration strategy for consistency.
  • Simplify forms: Don’t migrate overly complex forms as-is. Simplify them first.
  • Component complexity: Components are often more complex than you expect. A thorough analysis is necessary.
  • Phased migration: Migrate site by site instead of trying everything simultaneously.

Conclusion

The shift to XM Cloud is no small feat, but with proper planning, analysis, and the right tools, it can be a rewarding process. I’m proud of our work at Macaw, and I’m thankful to my colleagues Gary, Erwin, Peter, Arno, and Sjoerd, who played critical roles in making this migration a success.

Check out my GitHub repo for the presentation.