Conversion Guide: Effortlessly Downgrade Your Sitecore XP Infrastructure to Sitecore XM

A guide to transition your Sitecore XP instance to Sitecore XM

November 21, 2024

By Karan Patel

Transitioning from Sitecore XP to XM

Over the years, Fishtank has partnered with variety of clients, helping them navigate their Sitecore journeys with precision and success. Our team has worked with the full spectrum of Sitecore products, from XP and XM to XM Cloud — you name it, we’ve done it. As Sitecore continues pushing toward XM Cloud as the future of digital experience management, many businesses with Sitecore XP, XM, or other products are exploring their options to stay ahead of the curve. If you're looking to future-proof your platform and maximize performance, converting Sitecore XP to XM could be your next step. In this blog, we’ll share the ins and outs of making that transition smoothly.

Why Do the Conversion?

Its natural to wonder why spend the time and effort to convert the XP instances to XM instead of migrating to XM Cloud directly.

  1. Control Over Infrastructure - XM can provide the option to host on-premises or in a private cloud for businesses with strict security, regulatory, or other hosting needs which is not possible on XM Cloud.
  2. Reduced Cost - When opposed to XP, Sitecore XM offers a simpler architecture with fewer integrated services. Moving to XM can minimize operational complexity and associated expenses for organizations who do not use all of XP's marketing capabilities without completely converting to XM Cloud.
  3. Gradual Transition to the Cloud - XM can serve as a springboard to the cloud without necessitating a full transition to a SaaS environment. This enables businesses to investigate XM Cloud as a potential future alternative while phasing their switch and reducing the complexity of the infrastructure.
  4. Customization Flexibility - Compared to XM Cloud, which could have some restrictions because it is a SaaS, XM provides more customization options for businesses with special requirements or those needing sophisticated bespoke integrations may find this advantageous.

Feature Comparison

Below is a list of feature comparison that needs to be kept in mind before you decide whether to convert XP to XM or migrate to XP to XM Cloud.

Feature XP XM XM Cloud
Headless Optional Optional Yes
Front-end Built-in Built-in Requires Vercel or Netlify
PaaS (Platform as a Service) Yes Yes No
SaaS (Software as a Service) No No Yes
Hosting Environments Azure, AWS, etc Azure, AWS, etc SaaS
Content Delivery Sitecore, Included Sitecore, Included Requires Vercel or Netlify, Not included
Personalization Multi-Session In-Session In-Session
Campaigns Multi-Session In-Session By Referrer
Profile / Personas Multi-Session In-Session Limited
Marketing Automation Yes No No
Email Marketing Yes No No
Forms Yes No No
Analytics Yes No Yes

Approach

To do a smooth conversion below is a general approach that can be used a blue print for the discovery session:

  1. Source Code and Pipelines - Review source code and deployment pipelines for any references to XP and modify in a way so that it is not reliant on XP.
  2. User authentication - Businesses may use xDB in their solution to store user information. It is good practice to review it and see if it can be removed.
  3. Personalization - Usually when XP is used businesses tend to also add personalization settings to show content based on visitors. Understanding how the personalization is applied, whether its in-session or multi-session will be a key factor in the conversion.
  4. Forms - XP comes with EXM so analyzing it can give an idea if send actions has used it.
  5. Azure Cost - Review existing Azure spend and shutdown down unnecessary XP infrastructure will result in cost savings.

Note: Conversion from XP to XM is a challenging task so analyzing current solution will be crucial step. This will solely decide how smooth the conversion will happen.

Tips on Analysis and Implementation

  1. Load up the solution and search for any references related to xDB or XConnect. Don’t forget custom pipelines.
  2. If there is member functionality in the solution, then chances are basic user information maybe stored as profile data in xDB for a user. Understand how it is being stored and used on the other components of the website.
  3. Use the following powershell code to find out what content items have personalization applied to it. Analyze them to understand whether its in-session personalization. If not, then find a way if it can behave the same way if its converted to in-session personalization. If that is also not possible, then understand the importance of the personalization and see if it can be removed entirely.

     $query = "fast:/sitecore/content//*[@__renderings='%<conditions%' or @#__Final Renderings#='%<conditions%']"
     $items = Get-Item -Path "master:" -Query $query
     $items | Show-ListView -Property `
        @{ Name="Item Name"; Expression={$_.DisplayName}},
        @{ Name="Item path"; Expression={$_.FullPath}}
    
  4. Open up forms and EXM, look for any performance tracking, send actions that may use EXM. Check for any automated campaigns being active and see if it can be replaced by other service or discarded.

  5. To disable xDB and Tracking, use the following config only after references have been removed and content has in-session personalization applied.

     <?xml version="1.0" encoding="utf-8" ?>
     <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:security="http://www.sitecore.net/xmlconfig/security/">
       <sitecore>
         <settings>
           <!--  XDB ENABLED
                       Determines whether xDB is enabled or not.
                       Default value: true
                   -->
           <setting name="Xdb.Enabled">
             <patch:attribute name="value" value="false" />
           </setting>
           <!--  XDB TRACKING ENABLED
                       Determines whether tracking is enabled or not.
                       Default value: true
                   -->
           <setting name="Xdb.Tracking.Enabled">
             <patch:attribute name="value" value="false" />
           </setting>
         </settings>
       </sitecore>
     </configuration>
    
  6. To disable EXM, use the following setting inside Web.config.

     <add key="exmEnabled:define" value="no"/>
    
  7. If you receive the following error, then disable the sessionEnd:batch:starting and sessionEnd:batch:ending event handlers as it depends on tracking.

     One or more exceptions occurred while processing the subscribers to the 'sessionEnd:batch:starting' event.
     Exception[1]: System.Reflection.TargetInvocationException
     Message[1]: Exception has been thrown by the target of an invocation.
     Source[1]: mscorlib
     at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
     at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
     at Sitecore.Reflection.ReflectionUtil.CreateObject(Type type, Object[] parameters)
     at Sitecore.Configuration.DefaultFactory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert)
     at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
     at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert)
     at Sitecore.Configuration.DefaultFactory.CreateObject(String configPath, String[] parameters, Boolean assert)
     at Sitecore.XConnect.Client.Configuration.SitecoreXConnectClientConfiguration.GetClient(String clientConfigPath)
     at Sitecore.Analytics.XConnect.DataAccess.BatchEnabledXdbRuntimeContext..ctor(IXdbContextFactory factory)
     at Sitecore.Analytics.Events.BatchEventHandler.OnBatchStarting(Object sender, EventArgs args)
     at Sitecore.Events.Event.EventSubscribers.RaiseEvent(String eventName, Object[] parameters, EventResult result)
    
     <events>
         <event name="sessionEnd:batch:starting">
             <handler type="Sitecore.Analytics.Events.BatchEventHandler, Sitecore.Analytics">
                 <patch:delete />
             </handler>
         </event>
         <event name="sessionEnd:batch:ended">
             <handler type="Sitecore.Analytics.Events.BatchEventHandler, Sitecore.Analytics">
                 <patch:delete />
           </handler>
       </event>
     </events>
    
  8. Following is a list of resources that are used when the Sitecore instances are in XP mode. Either you can take backups and delete them or group the app services to share a single app service plan. Databases are always recommended to be a part of elastic pool so they would be already sharing resources.

    1. App services
      • Cortex
        • -cortex-processing
        • -cortex-reporting
      • Marketing Automation
        • -ma-ops
        • -ma-rep
      • xConnect
        • -prc
        • -rep
        • -xc-collect
        • -xc-refdata
        • -xc-search
        • -xc-single
    2. App service plans
      • xConnect
        • -prc-hp
        • -rep-hp
        • -xc-basic-hp
        • -xc-resourceintensive-hp
        • -xc-single
    3. SQL databases
      • Cortex
        • -processingenginestorage-db
        • -processingenginetasks-db
      • Marketing Automation
        • -ma-db
      • xConnect
        • -pools-db
        • -refdata-db
        • -reporting-db
        • -shard0-db
        • -shard1-db
        • -smm-db
        • -tasks-db
  9. Shutting down the app services will still incur cost. However, before deleting them we recommend stopping it and testing the website for any problems. When you stop the app service, you may end up getting the following error. This error is due to the background jobs still being active even after the app services are stopped. We have a blog that goes into detail on how to fully shut down the Azure app service.

MessageType: Error Picking Processing Task, Message: Login failed for user 'processingengineuser'.

-----OR-----

Login failed for user 'xcsmmuser'.. The error occurred while attempting to perform the underlying storage operation during 'Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.StoreException: Error occurred while performing store operation. See the inner SqlException for details. ---> System.Data.SqlClient.SqlException: Login failed for user 'xcsmmuser'.

Ensuring a Smooth and Successful Sitecore XP to XM Conversion

That’s it folks! We discussed the approach and some tips for analyzing and implementation on how to convert your instance from XP to XM. Keep in mind, the better the analysis will be, the easier it’ll be implement it as you’ll have less unknowns to worry about it. If you’re interested in a discussion about your infrastructure, feel free to contact us and our experts will help you. At any stage during the analysis if it gets tricky, then remember you can still backout. However, the least thing you can do is optimize Azure infrastructure and to reduce the cost of the spend.

Karan Developer

Karan Patel

Sitecore Developer

Karan is a Sitecore Certified Developer with over 2 years of experience building and implementing Sitecore solutions using ASP .NET MVC, React, Azure and AWS. He's an avid fan of Counter-Strike and can usually be found playing it if he is not developing. In his spare time, he likes to play guitar and cook Indian food.

Second CTA Ogilvy's Legacy

Today, David Ogilvy's influence can still be felt in the world of advertising.

Ogilvy's Influence Example
Emphasis on research Market research is a crucial part of any successful advertising campaign
Focus on headlines A strong headline can make the difference between an ad that is noticed and one that is ignored
Use of visuals Compelling images and graphics are essential for capturing audience attention