Monday, 25 August 2025

Migrating from Sitecore XM to XM Cloud Using the Migration Tool GUI

August 25, 2025 0

 



Sitecore XM to XM Cloud Migration tool helps to move content, media and user data from a on-prem Sitecore Experience Manager (XM) instance to a target XM Cloud environment. It is middleware that simplifies the task of entering and selecting data, and orchestrating the migration. The tool is available in both a Graphical User Interface (GUI) tool, and a Command Line Interface (CLI) comprising operations that you can embed into your own tooling.

In my previous blog, I discussed about complete analysis a developer should perform before migrating from Sitecore XP/XM to XM Cloud. In our today's blog, I'll discuss about the Sitecore XM to XM Cloud Migration tool Graphical User Interface features and process.

The current version is v2.1.71. Current supported Sitecore XM versions are 9.1+ and 10.0+

Key Features

  • Dual support for GUI and CLI.

  • TreeView selection for choosing content and media items.

  • Media migration via CDN or on-premise MSSQL database binaries.

  • User migration directly into the Sitecore Cloud Portal.

Prerequisites

Before starting, ensure you have:

  • A Sitecore XM on-premise instance with content, media, or users.

  • A fresh XM Cloud environment.

  • Compatible OS: Windows Server 2022, Windows 10 (64-bit), or Windows 11 (64-bit).

What’s Inside the ZIP Package?

The migration tool’s ZIP file includes:

  • appsettings.json – configuration file.

  • Executable (.exe) to run the application.

  • SitecorePackage.zip – required for setup.

  • Logs folder.

  • README.md – highly recommended to read before starting.

  • Docs folder with details on configuration, dependencies, FAQs, and known issues.



Initial Setup

  1. Upload and install the SitecorePackage.zip file into your on-prem XM application.



  2. After installation, a new _MigrationHarness folder will appear in your XM root directory.


  3. Update the Web.config file to include specific <assemblyBinding> entries (for assemblies like protobuf-net, System.Buffers, System.Memory, etc.).

    <probing privatePath="_MigrationHarness/bin" />

              <dependentAssembly>

                <assemblyIdentity name="protobuf-net" publicKeyToken="257b51d87d2e4d67" />

                <codeBase version="2.4.0.0" href="_MigrationHarness/bin/protobuf-net.dll" />

              </dependentAssembly>

              <dependentAssembly>

                <assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" />

                <codeBase version="6.0.0.0" href="_MigrationHarness/bin/Microsoft.Extensions.Logging.Abstractions.dll" />

              </dependentAssembly>

              <dependentAssembly>

                <assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" />

                <codeBase version="4.0.2.0" href="_MigrationHarness/bin/System.Buffers.dll" />

              </dependentAssembly>

              <dependentAssembly>

                <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" />

                <codeBase version="4.0.1.2" href="_MigrationHarness/bin/System.Memory.dll" />

                <bindingRedirect oldVersion="4.0.1.1" newVersion="4.0.1.2" />

              </dependentAssembly>

              <dependentAssembly>

                <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" />

                <codeBase version="6.0.0.0" href="_MigrationHarness/bin/System.Runtime.CompilerServices.Unsafe.dll" />

                <bindingRedirect oldVersion="4.0.4.1" newVersion="6.0.0.0" />

              </dependentAssembly>


  4. Adjust the appsettings.json file if needed, especially the line:

    "SitecoreCmMigrationHandlerFileRelativePath": "_MigrationHarness/MigrationHandler.ashx"

Running the Migration GUI

  1. Launch XMMigrationGUI.exe and select the data types to migrate (Content, Media, and Users if required).


  2. Click on Next and you can see the Source configuration- Sitecore XM/XP on premises. 

    Please provide CM Base URL, Username and Password.



  3. Click on Next button and provide the XM Cloud settings. Please follow the instruction to find the specific data for each fields.




  4. You can get the XM Cloud Envionment related information from the enviornment (in our case Development) details section.



  5. If credentials are not already available, create new Cloud Portal credentials.


  6. Use the Content Tree view to select the items and Media you wish to migrate.


  7. Click on Next, and provide the credential to choose the users you want to migrate.


  8. Click the Next button and configure the Users Migration Target Settings. Click the Connect to Sitecore Cloud button and follow the instructions. A new browser window will be opened where you should log in as a Sitecore Portal User and confirm the code that you see in the Migration tool.


  9. As the last step for users configuration, choose an environment where you would like to invite users under the chosen organization.



  10. Review the migration summary and start the process.


  11. Once complete, your content, media, and users will be successfully migrated to your XM Cloud environment.

    On-Prem XM :



    XM Cloud



Conclusion

The Sitecore XM to XM Cloud Migration Tool (GUI) provides a guided approach for migrating data from on-premise to the cloud. By supporting both content and user migration, it eliminates much of the complexity involved in traditional migration methods. Whether you’re performing a quick lift-and-shift or preparing for a larger digital transformation, this tool ensures a smooth, reliable, and efficient migration experience.

References

1. XM Cloud Tools and Resources

Tuesday, 19 August 2025

Getting Started with Building Custom Apps for Sitecore XM Cloud Marketplace

August 19, 2025 0

 


The Sitecore App Marketplace for XM Cloud Has Officially Launched

The Sitecore App Marketplace for XM Cloud is now live, opening up extensive possibilities for customizing and extending the platform. This blog consolidates the key development and configuration steps to help you build your first custom app.

I began by setting up a basic standalone application in XM Cloud to understand how the process works. With this capability, you can now create custom tools for your organization—or even apps for the broader Sitecore community. In this blog, we’ll walk through the essential steps to build an app in your development environment and then register and install it in XM Cloud.


What is the Sitecore Marketplace?

The Sitecore Marketplace enables customers, partners, and developers to build and use applications that extend Sitecore’s functionality. This means you can integrate your custom modules into Sitecore XM Cloud through various extension points.

These apps can be:

  • Private (available only to your organization), or

  • Public (shared with anyone using XM Cloud, though the public marketplace is not available yet).

Prerequisites

Before you start, ensure you have the following:

  • Access to Sitecore Cloud Portal – Marketplace apps are currently available only to Organization Owners and Admin users.

  • Development Environment – Node.js 16+ and npm 10+.

  • Basic Web Development Skills – TypeScript and React.

Extension Points: Where Your App Will Appear

When configuring your app, you can choose where in the Sitecore UI it should be visible. Available extension points include:

  • Standalone applications in the Portal

  • Full-screen experiences in XM Cloud

  • XM Cloud site dashboard widgets

  • Page Builder panel applications

  • Page Builder custom fields

For more detail- visit Overview of extension points

Step 1: Create Your App in Cloud Portal

  1. Log in to the Cloud Portal using an Admin or Owner account.

  2. Navigate to Developer Studio > Create App.


  3. Enter the details:

    • Descriptive name (max 50 characters).

    • Select Custom as the app type.



       4. Click Create – your app is now registered and ready for configuration.

Step 2: Configure Your App

  • Extension Points: Choose where your app should appear. You can select multiple points and customize the Route URL or Display Name.

  • API Access: Select the APIs your app will use. For XM Cloud integration, enable XM Cloud APIs.


  • Development URL:

    • React apps → http://localhost:5173

    • Next.js apps → http://localhost:3000

  • App Logo: Add a public logo URL (or use a temporary one: https://cdn-1.webcatalog.io/catalog/sitecore/sitecore-icon.png?v=1731337318728).

  • Activate App: Click Activate > Activate.



Step 3: Set Up Your Development Project

Create a Next.js or React app:

Next.js

npx create-next-app@latest my-test-app
cd my-test-app

React

npm create vite@latest my-test-app
cd my-test-app

Install required SDK packages:

npm install @sitecore-marketplace-sdk/client
npm install @sitecore-marketplace-sdk/xmc # if your app uses XM Cloud APIs


Step 4: Create the useMarketplaceClient Hook

Create a custom hook to manage the SDK initialization. In your src folder,
create /utils/hooks/useMarketplaceClient.ts, and paste the below code:

// utils/hooks/useMarketplaceClient.ts
import { ClientSDK } from "@sitecore-marketplace-sdk/client";
import { useEffect, useState, useCallback, useMemo, useRef } from "react";
export interface MarketplaceClientState {
client: ClientSDK | null;
error: Error | null;
isLoading: boolean;
isInitialized: boolean;
}

export interface UseMarketplaceClientOptions {
retryAttempts?: number; // Default: 3
retryDelay?: number; // Default: 1000ms
autoInit?: boolean; // Default: true
}

const DEFAULT_OPTIONS: Required<UseMarketplaceClientOptions> = {
retryAttempts: 3,
retryDelay: 1000,
autoInit: true,
};

let client: ClientSDK | undefined = undefined;

async function getMarketplaceClient() {
if (client) {
return client;
}
const config = {
target: window.parent,
};
client = await ClientSDK.init(config);
return client;
}

export function useMarketplaceClient(options: UseMarketplaceClientOptions = {}) {
const opts = useMemo(() => ({ ...DEFAULT_OPTIONS, ...options }), [options]);

const [state, setState] = useState<MarketplaceClientState>({
client: null,
error: null,
isLoading: false,
isInitialized: false,
});

const isInitializingRef = useRef(false);

const initializeClient = useCallback(async (attempt = 1): Promise<void> => {
let shouldProceed = false;
setState(prev => {
if (prev.isLoading || prev.isInitialized || isInitializingRef.current) {
return prev;
}
shouldProceed = true;
isInitializingRef.current = true;
return { ...prev, isLoading: true, error: null };
});

if (!shouldProceed) return;

try {
const client = await getMarketplaceClient();
setState({
client,
error: null,
isLoading: false,
isInitialized: true,
});
} catch (error) {
if (attempt < opts.retryAttempts) {
await new Promise(resolve => setTimeout(resolve, opts.retryDelay));
return initializeClient(attempt + 1);
}
setState({
client: null,
error: error instanceof Error ? error : new Error('Failed to initialize MarketplaceClient'),
isLoading: false,
isInitialized: false,
});
} finally {
isInitializingRef.current = false;
}
}, [opts.retryAttempts, opts.retryDelay]);

useEffect(() => {
if (opts.autoInit) {
initializeClient();
}
return () => {
isInitializingRef.current = false;
setState({
client: null,
error: null,
isLoading: false,
isInitialized: false,
});
};
}, [opts.autoInit, initializeClient]);

return useMemo(() => ({
...state,
initialize: initializeClient,
}), [state, initializeClient]);

}

This hook handles:

  • SDK initialization

  • Error handling and retry logic

  • Preventing race conditions

Step 5: Use the Hook in Your App

In your main app component (e.g., App.tsx or pages/index.tsx), import and use the hook.

For Next.js (pages/index.tsx):

import { useState, useEffect } from "react";
import type { ApplicationContext } from "@sitecore-marketplace-sdk/client";
import { useMarketplaceClient } from "../utils/hooks/useMarketplaceClient";
 
export default function Home() {
  const { client, error, isInitialized, isLoading } = useMarketplaceClient();
  const [appContext, setAppContext] = useState<ApplicationContext>();
 
  useEffect(() => {
    if (!error && isInitialized && client) {
      client.query("application.context")
        .then((res) => {
          setAppContext(res.data);
        })
        .catch((error) => {
          console.error("Error retrieving application.context:", error);
        });
    }
  }, [client, error, isInitialized]);
 
  if (isLoading) return <div>Loading...</div>;
  if (error) return <div>Error: {error.message}</div>;
 
  return (
    <div className="p-4">
      <h1>Welcome to {appContext?.name || 'My Marketplace App'}</h1>
    </div>
  );
}


Step 6: Start Development

Run your app:

npm run dev

Then:

  1. Open your Sitecore Cloud Portal.

  2. Navigate to Marketplace.


  3. Find your registered app and open it in one of the configured extension points.

  4. Your app will now run inside Sitecore with secure communication.



Development Tips

  • Always test your app within Sitecore, not just on localhost.

  • Use the browser console in the Sitecore extension point for accurate logs.

  • Sitecore-specific functionality only works inside extension points.

Conclusion

The Sitecore XM Cloud Marketplace is a powerful way to extend the platform with custom applications tailored to your organization’s needs. By following the steps above, you can create, configure, and register your first app—from setting up a development environment to embedding it seamlessly in XM Cloud.

As the marketplace continues to evolve, it opens new opportunities for developers to innovate and share apps across the Sitecore community. If you’re building for your team today, you’re also preparing for tomorrow’s broader ecosystem.

References

Wednesday, 6 August 2025

Migrating from Sitecore XP to XM Cloud: A Developer’s Guide

August 06, 2025 0


Welcome to my new blog series! Over the next three posts, we'll explore the developer's journey of migrating from Sitecore XP to Sitecore XM Cloud. In this series, we’ll cover the analysis phase, and take a deep dive into the migration of media and content items.

As businesses strive to deliver more efficient and engaging digital experiences, Sitecore XM Cloud stands out as a robust solution — offering improved performance, high availability, reduced maintenance overhead, and automatic updates. It empowers organizations to modernize their digital infrastructure and deliver seamless experiences to end-users.

However, migration to XM Cloud isn’t a simple lift-and-shift. It requires careful planning, a deep understanding of your current setup, and a clearly defined strategy. In this first post, we’ll walk through the critical considerations that developers must keep in mind to ensure a smooth transition.

Audit Your Existing Sitecore XP Setup

Before you migrate, a thorough audit of your current environment is essential:

1. Sitecore Version & Modules

  • Identify the current Sitecore version and any installed modules (e.g., Forms, Marketing Automation).
  • These components can significantly influence migration complexity.

2. Custom Code & Integrations

  • Review all custom modules, pipelines, processors, commands, field types, and event handlers.

  • Document all inbound/outbound API integrations and assess their compatibility with XM Cloud.

3. Hosting Environment

  • Record details of your hosting setup — on-premises, PaaS, or hybrid.

  • Include hardware specs, OS, and database configurations.

4. Development Stack

  • Note the current development framework (.NET versions, MVC, rendering engines, or headless setup).

  • A headless approach can ease code migration.

5. Content & Template Architecture

  • Audit your content model, templates, and field configurations.

  • XM Cloud’s headless nature may require template restructuring or simplification.

6. Workflows & Publishing

  • Document custom workflows and approval processes.

  • XM Cloud’s simplified publishing may require workflow redesign.

7. Third-party & Legacy Systems

  • List integrations with CRMs, ERPs, eCommerce platforms, analytics, and marketing tools.

  • Identify any legacy systems that may not support API-first communication.

8. Digital Asset Management

  • Analyze current asset usage and storage.

  • XM Cloud often uses different CDNs or asset delivery methods — plan accordingly.


Choosing the Right Frontend Framework

XM Cloud is headless-first, and the frontend stack plays a critical role in performance and maintainability:

1. Recommended: Next.js

  • Sitecore recommends Next.js for its support of SSR, SSG, and ISR.

  • While frameworks like React or Angular can be used, they may require more configuration.

2. Performance & SEO

  • Next.js boosts performance through static generation and edge rendering.

  • Its built-in SSR enhances SEO — especially beneficial for content-heavy sites.

3. Team Skill Set

  • Choose a framework aligned with your development team’s skill set for faster adoption.

Understanding XM Cloud SaaS Capabilities

1. API-First Architecture

XM Cloud delivers content via GraphQL APIs through Experience Edge. Planning is required in several areas:

  • GraphQL schema design: Align current content types to GraphQL models.

  • Caching strategies: Understand and plan for Experience Edge’s behavior.

  • Error handling: Implement fallback mechanisms for API failures or partial content loads.

2. Development & Deployment Shifts

Migration involves adapting to XM Cloud’s SaaS-based development environment:

  • Local development: Use Sitecore CLI, containers, and serialization tools.

  • API-first model: Replace direct DB access and server-side integrations with APIs or webhooks.

  • CI/CD overhaul: Restructure deployment processes to align with XM Cloud's model.

  • Hosting: Evaluate platforms like Vercel, Netlify, or Azure Static Web Apps. Consider long-term cost, scalability, and team familiarity.

Migrating Content, Media, Forms & Personalization

1. Content Audit & Cleanup

  • Archive outdated items, remove duplicates, and streamline the content hierarchy.

  • Deeply nested templates and complex dependencies may need restructuring.

2. Content Serialization

  • Use Sitecore’s serialization tools to automate content export/import, reducing manual effort and error.

3. Content Transformation

  • Adjust field types and consolidate templates to match XM Cloud's streamlined data model.

4. Mapping & Validation

  • Map legacy content structures to headless models.

  • Run validation tests to ensure migration accuracy.

5. Media Asset Strategy

  • XM Cloud uses different CDN and media storage mechanisms.

  • Plan for migration, optimization, and cross-channel delivery.

6. xDB and Analytics

  • XM Cloud no longer supports xDB.

  • Plan to use Sitecore CDP, Google Analytics, or a custom CDP for behavioral tracking.

7. Personalization & A/B Testing

  • Evaluate if XM Cloud’s basic personalization is sufficient.

  • For advanced needs, consider integrating Sitecore Personalize.

  • A/B testing can be implemented using XM Cloud's native experimentation features.

Testing & Validation Strategy

Thorough testing ensures the stability and reliability of your new environment:

1. Integration Testing

  • Validate all feature migrations using end-to-end tests across APIs and services.

2. User Acceptance Testing (UAT)

  • Engage business users to test UI, content accuracy, and key workflows.

3. Performance Testing

  • Conduct load testing to ensure scalability and responsiveness under peak traffic.

4. SEO Testing

  • Verify all on-page SEO, structured data, meta tags, and sitemap integrations.

5. Security Testing

  • Test all APIs and data flows for vulnerabilities.

  • Ensure compliance with GDPR or other data protection standards.

Planning Your Migration

1. Phase-wise Rollout

  • Consider migrating in stages based on priority, complexity, or module dependency to reduce risk.

2. Risk Assessment

  • Plan for common risks:

    • Technical: Compatibility issues, integration challenges

    • Business: Training gaps, feature mismatches

    • Timeline: Scope creep, resource availability

Conclusion

Migrating to Sitecore XM Cloud is a transformational step — one that can significantly improve digital agility and performance. But to ensure a smooth migration, developers need to audit, plan, and test every stage of the process.

In the next blog, we’ll explore actual migration strategies and tools to help you move content, templates, and assets from XP to XM Cloud efficiently.