Sitecore XM Cloud Tips & Tricks

In this post, I’ll share some useful info, handy tips, and tricks to help you get started with Sitecore XM Cloud.

XM Cloud Portal

The Sitecore Cloud Portal is your hub for everything in XM Cloud. You can manage and switch between the various apps seamlessly: XM Cloud, XM Cloud Deploy App, etc. There are handy links to documentation and the Sitecore Support Portal. You can even create new support cases without leaving the portal.

Check out the XM Cloud Introduction it has some helpful information, links, and videos to get you started.

Navigating XM Cloud

Switcher – the multi-dot menu icon opens the switcher and allows you to switch between organizations, projects, and apps.

Home – each App has a home page providing access to the main features.

Admin – if you are the administrator of one or more organizations you can manage members of those organizations, you can:

Quick actions – let you easily access important features.

Apps section – clicking on one of these instances, opens a side panel to the right with direct links to quick actions available for that instance.

XM Cloud Dashboard – where you create and manage your websites and access all your XM Cloud Tools. The Site tab is where you can add websites to your instance in just a few clicks. The Tools tab is where you can access all the features included in XM Cloud. It looks very similar to Sitecore XP and provides access to some familiar tools.

XM Cloud Deploy – allows you to manage projects and environments.

XM Cloud Pages – combines editing and design capabilities for building web pages.

XM Cloud Content manager – this is where you can manage and edit all the content on your website.

XM Cloud Explorer – is an editing tool that lets you work with content independent of presentation.

XM Cloud Deploy App

XM cloud has the concept of Organizations, Projects, Sites, and Environments. Depending on your subscription plan, an organization can have one or more projects. Think of a project as a Sitecore XM instance that can have one or more sites. Each project can be deployed to one or more environments, depending on your plan. Your plan will dictate how many projects you can create and the number of environments you can have. The XM Cloud deploy app allows you to manage these projects and their associated environments.

Managing Projects

Some of the options for managing a Project include the following:

1. Build & Deploy – Select the build and deploy option will build your link source repository solution and deploy to the environment.

2. Edit environment details– allows you to modify environment details this includes: 

  • Environment name
  • Link to branch
  • Trigger deployment on commit to branch

3. Link Environment to another branch – every environment is linked to a specific branch which allows you to easily switch branches.

4. Edit Environment Variables – allows you to modify existing or create new environment variables.

5. Delete environment – allows you to delete the selected environment. Note projects cannot be removed while they have environments associated with them. You must first delete all the environments and then you can delete a project.

6. View environment logs – allows you to view a list of logs associated with the environment by log type. Selecting the log type will provide you with a list of date/time stamped logs for that type which you can then select a specific log to view.

7. XM Cloud Deploy Status – allows you to check the status of different

Creating New Projects

To create a new project you must have an administrator or owner role in an XM Cloud organization, and you must host your existing source code on a version control platform supported by the XM Cloud Deploy App currently GitHub. They may add others in the future. If you are hosting your solution elsewhere then there is the option to use the Sitecore CLI to deploy your solution. When you create a project, you also create the environment and run an initial deployment to that environment.

There are several ways in which you can create a project on XM Cloud:

  1. Create XM Cloud Project using existing Template – this is the quickest way in which you can create a new project with just a few clicks. There currently is only one starter template: Foundations but I expect the Sitecore team will be adding more in the future.
  2. Create XM Cloud Project using an existing solution. – similar to the approach above but rather than selecting a template you specify the location of your git repository containing an XM Cloud solution.
  3. Create XM Cloud project from existing solution using CLI – if you are not using GitHub as your repository or if you prefer using CLI then you have the option to use the Sitecore CLI with the XM Cloud plugin.

Create XM Cloud Project using a Template

Let’s run through the process of creating a project using a template to show you how simple it is. It literally takes minutes.

1. Log in to the Sitecore Cloud Portal

2. To create a project from the Home page Click on the Manage my projects located in the Quick actions section. This will provide a list of existing projects associated with your organization you can manage. Click on the button Create New Project and you are presented with two options:

  • Start from a starter template
  • Start from your existing XM Cloud code

3. Select the option: Start from a starter template and Click Next. This will start the 6 Step process of configuring a new template-based XM Cloud project.

4. Step 1 – Select a starter Template. As I mentioned previously there is only one template to choose from currently: XM Cloud Foundation. This provides you with a JSS solution on top of headless SXA. Select the template and Click Next.

5. Step 2 – Project details. Provide a name for the project and Click Next.

6. Step 3 – Deployment repository details. Here is where you can specify the source code solution provider to use for the location of the solution where it will be cloned. Currently, GitHub is available as an option, Sitecore might provide others in the future. Select GitHub and Click Next

7. Step 4 – Template repository details. You can choose from existing GitHub connections or Create a new connection. Select your GitHub connection and Click Next.

8. Step 5 – Deployment repository details. Here you need to provide a name for your repository and Click Next.

9. Step 6 – Initial environment details. Here you can specify information about the environment for your project including Environment Name, whether it is a production environment or not (note this cannot be changed once set), whether or not to trigger a deployment on each commit to the repo branch. Once you Click Create and Deploy.

The deployment process will run through the following:

  • Creates a new repository in the connected GitHub account.
  • Copy the source code from the starter template to the new GitHub repository.
  • Provision the infrastructure and SaaS tenants to host the CM instance using the environment settings you defined.
  • Pull the source code from the Git repo to the hosted XM Cloud build server and build the solution.
  • Deploy the XM Cloud build artifacts on the provisioned CM instance.

10. Deployment Log – provides detailed logs allowing you to monitor progress during the deployment. You can filter the logs to show only Errors or Warnings.

Once deployment is completed you can access your instance by clicking on the Launchpad. 10min 30sec to complete – Not bad but I have seen it complete much faster.

Notice there is also the option to Promote. I’ve not tried this out yet, however, I suspect if you had multiple environments, for your project like a Stage and Prod you should be able to select and promote your build to another env.

Clicking on the Launchpad button will open your XM Cloud Foundation Instance on the Tools Tab. You can then proceed to create your first website.

Creating Environments

To create a new environment in an existing project:

  1. On the menu bar of the XM Cloud Deploy App, click Home.
  2. On the Projects page, click the project that contains the environment you want to view.
  3. On the Environments and deployments page, click Create a new environment.
  4. In the Create new environment dialog, enter the environment name, and choose whether the environment is a production environment. Optionally, if there is an existing repository branch, you can choose a branch to link to the environment and choose whether a commit to the branch triggers a deployment.
  5. Click Create. A new environment appears.

Authentication Clients

Allows you to generate and manage the authentication clients that can connect to your XM Cloud instance. These clients enable CI/CD pipelines, custom tools, and other integrations to access and deploy to your XM Cloud instance. You can manage clients at the Organization or environment level.

XM Cloud Deploy Status

Displays the health of XM Cloud Deploy and information about its components.

Raising a Support Ticket

If you experience an issue with the actual XM Cloud or XM Cloud Deploy App you can raise a support case right from within the Cloud Portal. This will create a ticket in the Sitecore Support Portal. Saving you from having to jump out to the support portal.

To help the support team troubleshoot and resolve the issue as quickly as possible the support team request you provide them with the following if possible:

  • A screencast, showing the issue reproduction.
  • Collect a Fiddler session in .saz format with reproducing the reported issue:
    • Ensure that capturing and decrypting HTTPS traffic is enabled in the Fiddler tool
    • Open the Fiddler tool and start capturing
    • Ensure that the browser cache is disabled
    • Follow steps to reproduce the issue
    • Make sure that the necessary sessions have been captured successfully
    • Save all the recorded sessions in .saz format.

Setting up Local Dev Environment

Setting up your local development environment could not be easier with the XM Cloud Starter Kit. This solution is designed to help you learn and get started quickly with XM Cloud and SXA. It contains all the scripts and tools you need to develop against an XM Cloud instance. It only takes about 20 minutes to get up and running, most of that time is consumed downloading the docker images.

  1. Ensure your local instance meets the prerequisites:
    • A valid Sitecore license file.
    • Windows PowerShell 5.1. (PowerShell 7 is not supported at this time).
    • The current long-term support (LTS) version of Node.js.
    • .NET Core 6.0 SDK (check your installed version with the dotnet –version command).
    • .NET Framework 4.8 SDK (see the Microsoft procedure for checking .NET Framework versions).
    • Visual Studio 2019.
    • Docker for Windows, with Windows Containers enabled.
    • Any required components for using Sitecore Containers.
  2. Clone the XM Cloud Starter Kit repo
  3. To prepare the Sitecore container environment, in project directory run the script: .\init.ps1 -InitEnv -LicenseXmlPath “” -AdminPassword “”
  4. To download the Sitecore Docker images, install and configure the containers and client application, run the following script: .\up.ps1

There is a great Walkthrough: Setting up your full-stack XM Cloud local development environment available in the XM Cloud developer documentation including a step-by-step video by Sebastian Winter check it out.

Common Developer Tasks

Once your local environment is up and running you can perform the following tasks using Sitecore CLI version 5.0 or later and the XM Cloud plugin:

XM Cloud Introduction repository

The XM Cloud Introduction repository contains the code for the MVP & SUGCON Sites, also powered by XM Cloud. If you want a reference example of another Sitecore XM Cloud implementation then check it out.

NOTE: It is not a Starter Kit or Template Solution, and you should NOT clone this repository for the purposes of starting a new Sitecore project.

Useful Info

Enjoy Sitecore XM Cloud!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s