Searching for content on the web has evolved from basic string based matches to a sophisticated array of approaches including keywords, stemming, synonyms, word order, regular expressions, weights and relevance. Users expect the highest ranking results to be the most relevant and 75% of users don’t go past the first page of results. All of these advanced techniques are great to find relevant content. But sometimes you need to find an exact phrase with the specific words in a specific order. Many search engines do this by wrapping quote marks around the “search term” to indicate an exact match search. Sitecore Search defaults to relevance based searches, but you can achieve exact match search with some configuration.
Let’s take a moment to remember a few concepts in Sitecore Search to understand the configuration better.
Sitecore Search has a number of predefined analyzers built in. Each analyzer processes the search query in different ways.
The default analyzer is the multi local standard analyzer. This analyzer modifies the search query by making it lower case, splitting the search query into single word tokens, finding the root of each word, applying synonyms, and removing punctuation. For this reason, it will not find an exact match. For that we need the keyword analyzer which leaves the search query in a single token without applying any modifications.
In order to configure exact match search, we need to add the keyword analyzer to the textual relevance settings for the desired attribute, in this case the description.
Navigate to Admin/Domain Settings then click the feature configuration tab.
Edit the Textual Relevance section.
Add the keyword analyzer to the description attribute.
Make sure to save your changes then publish your domain settings for your changes to take effect.
Next we need to configure our search widget to use our textual relevance settings.
Navigate to a widget variation and click add rule.
Click the top icon on the left to set the site context. Add a context rule for Keyword and select the contains option. In the input box, type a single quote mark.
Click the bottom icon on the left to configure the settings. Click the tab for Textual Relevance and click the toggle to enable the configuration. Notice that the description field is listed twice, once for each analyzer. From here you can enable/disable each attribute/analyzer and set its relative weight. In this example, I’ve set the description-keyword to 3 and the name-multilocal to 1. This will do the exact match search only on the description attribute. You could include name-keyword analyzer to do an exact match on the name as well if that is desired.
Repeat the process to add or modify a second rule that uses the description-multilocal analyzer.
This rule will be the fallback if the search term does not include a quote.
With this configuration in place, you can see the difference in the search results. In this example, I’ve searched for “proxy statements”.
When you include a quote mark in the search term, you only get results that have the exact phrase “proxy statements”. This search returns 12 results.
When you do not include the quote mark in the search term, you get results that include proxy, statements and statement. This search returns 68 results.
]]>Securing your Sitecore XM Cloud environment is critical to protecting your content, your users, and your brand. This post walks through key areas of XM Cloud security, including user management, authentication, secure coding, and best practices you can implement today to reduce your security risks.
We’ll also take a step back to look at the Sitecore Cloud Portal—the central control panel for managing user access across your Sitecore organization. Understanding both the Cloud Portal and XM Cloud’s internal security tools is essential for building a strong foundation of security.
The Sitecore Cloud Portal is the gateway to managing user access across all Sitecore DXP tools, including XM Cloud. Proper setup here ensures that only the right people can view or change your environments and content.
Each user you invite to your Sitecore organization is assigned an Organization Role, which defines their overall access level:
Organization Owner – Full control over the organization, including user and app management.
Organization Admin – Can manage users and assign app access, but cannot assign/remove Owners.
Organization User – Limited access; can only use specific apps they’ve been assigned to.
Tip: Assign the “Owner” role sparingly—only to those who absolutely need full administrative control.
Beyond organization roles, users are granted App Roles for specific products like XM Cloud. These roles determine what actions they can take inside each product:
Admin – Full access to all features of the application.
User – More limited, often focused on content authoring or reviewing.
From the Admin section of the Cloud Portal, Organization Owners or Admins can:
Invite new team members and assign roles.
Grant access to apps like XM Cloud and assign appropriate app-level roles.
Review and update roles as team responsibilities shift.
Remove access when team members leave or change roles.
Security Tips:
Review user access regularly.
Use the least privilege principle—only grant what’s necessary.
Enable Multi-Factor Authentication (MFA) and integrate Single Sign-On (SSO) for extra protection.
Within XM Cloud itself, there’s another layer of user and role management that governs access to content and features.
Users: Individual accounts representing people who work in the XM Cloud instance.
Roles: Collections of users with shared permissions.
Domains: Logical groupings of users and roles, useful for managing access in larger organizations.
Recommendation: Don’t assign permissions directly to users—assign them to roles instead for easier management.
Permissions can be set at the item level for things like reading, writing, deleting, or publishing. Access rights include:
Read
Write
Create
Delete
Administer
Each right can be set to:
Allow
Deny
Inherit
Follow the Role-Based Access Control (RBAC) model.
Create custom roles to reflect your team’s structure and responsibilities.
Audit roles and access regularly to prevent privilege creep.
Avoid modifying default system users—create new accounts instead.
XM Cloud supports robust authentication mechanisms to control access between services, deployments, and repositories.
When integrating external services or deploying via CI/CD, you’ll often need to authenticate through client credentials.
Use the Sitecore Cloud Portal to create and manage client credentials.
Grant only the necessary scopes (permissions) to each credential.
Rotate credentials periodically and revoke unused ones.
Use secure secrets management tools to store client IDs and secrets outside of source code.
For Git and deployment pipelines, connect XM Cloud environments to your repository using secure tokens and limit access to specific environments or branches when possible.
Security isn’t just about who has access—it’s also about how your code and data behave in production.
Sanitize all inputs to prevent injection attacks.
Avoid exposing sensitive information in logs or error messages.
Use HTTPS for all external communications.
Validate data both on the client and server sides.
Keep dependencies up to date and monitor for vulnerabilities.
When using visitor data for personalization, be transparent and follow data privacy best practices:
Explicitly define what data is collected and how it’s used.
Give visitors control over their data preferences.
Avoid storing personally identifiable information (PII) unless absolutely necessary.
Securing your XM Cloud environment is an ongoing process that involves team coordination, regular reviews, and constant vigilance. Here’s how to get started:
Audit your Cloud Portal roles and remove unnecessary access.
Establish a role-based structure in XM Cloud and limit direct user permissions.
Implement secure credential management for deployments and integrations.
Train your developers on secure coding and privacy best practices.
]]>The stronger your security practices, the more confidence you—and your clients—can have in your digital experience platform.
AI transforms how businesses create, maintain, and provide engaging content in Sitecore. Embedding AI, Sitecore allows developers, marketers, and IT professionals to improve workflows, enhance customer interaction, and fine-tune digital strategies. Let’s explore how AI is shaping Sitecore and what it means for businesses.
From Content Hub to XM Cloud, products in Sitecore’s portfolio have embedded AI that provides speed and scalability to personalization. Noteworthy features include:
There are several important benefits for organizations with embedded AI in Sitecore:
Sitecore AI deployment is also being used widely across multiple verticals:
However, despite the clear benefits, integrating Sitecore with AI is not without its challenges. Organizations are forced to navigate additional challenges such as data security, implementation costs, and making sure the AI outputs maintain their brand identity. Skilled personnel are needed to manage these advanced tools effectively.
Sitecore is evolving into a high-performance, AI-infused platform that powers personalized digital experiences at scale. Sitecore provides businesses with the tools they need to automate tasks, encourage creativity, and derive actions from data analytics, allowing businesses to stay relevant in an ever-changing environment. In a time where upstanding customer relationships are just as important as an online approach, leveraging AI with their Sitecore development strategy can do wonders.
]]>In this post, we’ll take a look at a couple Sitecore SDKs commonly used to build XM Cloud head applications. Specifically, we’ll be looking at how to disable cookies used by these SDKs. This can be useful for data privacy and/or regulatory compliance reasons. These SDKs allow your application to integrate with other composable Sitecore services like analytics, personalization, and search. The cookies these SDKs use need to be considered as part of your application’s overall data protection strategy.
It’s worth noting that, even without any additional SDKs, an XM Cloud head application can issue cookies; see XM Cloud visitor cookies for more information.
The Sitecore Cloud SDK allows developers to integrate with Sitecore’s Digital Experience Platform (DXP) products. These include Sitecore CDP, Sitecore Personalize, etc. You can read the official documentation here. To learn more about the first-party cookies used by this SDK, see Cloud SDK cookies. These cookies include:
Sitecore are actively working on integrating the disparate Sitecore SDKs into the Sitecore Cloud SDK. The latest version, 0.5, was released on January 29, 2025, and added search capabilities (see the XM Cloud changelog entry here). As Sitecore’s Technical Product Manager Christian Hahn put it in this recent Discover Sitecore YouTube video:
“…[the] Cloud SDK is not another Sitecore SDK–it is the Sitecore SDK.”
It’s safe to assume that, eventually, the Sitecore Cloud SDK will be the only Sitecore SDK developers need to include in their head applications to integrate with any other Sitecore DXP offerings (which will be nice ).
For the remainder of this post, assume that a pre-0.5 version of the Cloud SDK is in use, say, 0.3.0—any version that doesn’t include search widgets (such that the Search JS SDK for React is still required).
The Search JS SDK for React allows developers to create components such as search bars, search results components, etc. These components interact with search sources defined and indexed in Sitecore Search. You can read the official documentation here. While the latest version of the Cloud SDK includes some search dependencies, for older Next.js applications using older versions of the Cloud SDK, the Search JS SDK for React can still be used to build search interfaces.
The Search JS SDK for React uses a cookie to track events context called __ec (reference). This SDK is historically based on Sitecore Discover whose cookies are similarly documented here, e.g., __rutma.
For the remainder of this post, assume that version 2.5.5 of the Search JS SDK for React is in use.
Let’s say your XM Cloud project leverages JSS for Next.js, including the multisite add-on. This add-on (which is included in the official starter kit by default) allows a single Next.js application to drive multiple headless sites. Next, let’s assume that some of these sites operate outside of the United States and are potentially subject to different data protection and privacy laws. Finally, let’s assume that not all of the sites will use the full feature set from these SDKs. For example, what if a couple of the sites are small and don’t need to integrate with Sitecore Search at all?
How do you disable the cookies written to the browser when the Search SDK’s <WidgetsProvider> component is initialized? Even though the smaller sites aren’t using search widgets on any of their pages, the <WidgetsProvider> component is (usually) included in the Layout.tsx file and is still initialized. We don’t want to remove the component since other sites do use search widgets and require the <WidgetsProvider> component.
Can these SDKs be configured to (conditionally) not create cookies on the client browser?
First and foremost (before we get into how to disable cookies used by these SDKs), know that you must ensure that your application is compliant with any and all data privacy and data protection laws to which it is subject. This includes allowing users to opt-out of all browser cookies. Cookie preferences, their management, third-party solutions, GDPR, CCPA, etc. are all great topics but are well outside the scope of this post. To get started, refer to Sitecore’s documentation on data privacy to understand who is responsible for what when building an XM Cloud application.
With that small disclaimer out of the way, the programmatic hooks discussed in the sections below can be used in conjunction with whatever cookie management solution that makes sense for your application. Let’s assume that, for these smaller sites operating in different geographies that require neither CDP nor search, we just want to disable cookies from these SDKs altogether.
The short version: just don’t call the SDK’s init() function . One way this can be done is to add an environment variable and check its value within the .\src\<rendering-host>\src\lib\context\sdk\events.ts file and either return early or throw before the call to Events.init():
import * as Events from '@sitecore-cloudsdk/events/browser'; import { SDK } from '@sitecore-jss/sitecore-jss-nextjs/context'; const sdkModule: SDK<typeof Events> = { sdk: Events, init: async (props) => { // Events module can't be initialized on the server side // We also don't want to initialize it in development mode if (typeof window === 'undefined') throw 'Browser Events SDK is not initialized in server context'; if (process.env.NODE_ENV === 'development') throw 'Browser Events SDK is not initialized in development environment'; // We don't want to initialize if the application doesn't require it if (process.env.DISABLE_CLOUD_SDK === 'true') // <===== HERE throw 'Browser Events SDK is not initialized for this site'; await Events.init({ siteName: props.siteName, sitecoreEdgeUrl: props.sitecoreEdgeUrl, sitecoreEdgeContextId: props.sitecoreEdgeContextId, // Replace with the top level cookie domain of the website that is being integrated e.g ".example.com" and not "www.example.com" cookieDomain: window.location.hostname.replace(/^www\./, ''), // Cookie may be created in personalize middleware (server), but if not we should create it here enableBrowserCookie: true, }); }, }; export default sdkModule;
By not calling Events.init(), the cookies aren’t written to the browser.
Note that in newer versions of the XM Cloud starter kit using the Cloud SDK, the initialize function may be in the Bootstrap.tsx file; however, the same principle applies—don’t call the initialize() function by either returning early or setting up conditions such that the function is never called.
For consistency, assuming your application uses the OOTB CdpPageView.tsx component, you’d probably want to do something similar within that component. By default, page view events are turned off when in development mode. Simply add another condition to ensure that the return value of disabled() is true:
import { CdpHelper, LayoutServicePageState, useSitecoreContext, } from '@sitecore-jss/sitecore-jss-nextjs'; import { useEffect } from 'react'; import config from 'temp/config'; import { context } from 'lib/context'; /** * This is the CDP page view component. * It uses the Sitecore Cloud SDK to enable page view events on the client-side. * See Sitecore Cloud SDK documentation for details. * https://www.npmjs.com/package/@sitecore-cloudsdk/events */ const CdpPageView = (): JSX.Element => { ... /** * Determines if the page view events should be turned off. * IMPORTANT: You should implement based on your cookie consent management solution of choice. * By default it is disabled in development mode */ const disabled = () => { return process.env.NODE_ENV === 'development' || process.env.DISABLE_CLOUD_SDK === 'true'; // <===== HERE }; ... return <></>; }; export default CdpPageView;
The <WidgetsProvider> component (imported from @sitecore-search/react) includes a property named trackConsent (documented here) and it controls exactly that—whether or not tracking cookies related to visitor actions are created. Setting the value of this property to false disables the various cookies. In the Layout.tsx file, assuming we added another environment variable, the code would look something like this:
ata-enlighter-language="typescript">/** * This Layout is needed for Starter Kit. */ import React from 'react'; ... import { Environment, WidgetsProvider } from '@sitecore-search/react'; const Layout = ({ layoutData, headLinks }: LayoutProps): JSX.Element => { ... return ( <> ... <div className="App"> <WidgetsProvider env={process.env.NEXT_CEC_APP_ENV as Environment} customerKey={process.env.NEXT_CEC_CUSTOMER_KEY} apiKey={process.env.NEXT_CEC_API_KEY} publicSuffix={true} trackConsent={!(process.env.DISABLE_TRACK_CONSENT === 'true') /* <===== HERE */} > ... </WidgetsProvider> </div> ... </> ); }; export default Layout;
If trackConsent is false, then the various __r… cookies are not written to the browser.
It’s worth mentioning that, by default, trackConsent is true. To opt-out of cookies, developers must set the property to false.
Whether you control the use of cookies by using environment variables as described in this post or by integrating a more complex cookie preference and consent management system, the onus is on you and your XM Cloud head application to avoid using cookies without a user’s consent.
Thanks for the read!
Are you using Vercel to supercharge your Sitecore experience? If so, you’re already benefiting from a powerful, globally optimized platform designed for modern web applications. But did you know you can take your performance even further? Vercel Fluid Compute is a game-changer, optimizing workloads for higher efficiency, lower costs, and enhanced scalability—perfect for high-performance Sitecore deployments.
Fluid Compute is Vercel’s next-generation execution model, blending the best of serverless and traditional compute. Unlike conventional serverless architectures, which often suffer from cold starts and limited concurrency, Fluid Compute allows multiple requests to be processed within a single function instance. This leads to reduced latency, faster response times, and better resource utilization.
Sitecore is a powerful digital experience platform, but ensuring smooth, high-speed performance at scale can be challenging. Fluid Compute helps reduce performance bottlenecks and optimize infrastructure costs, making it a perfect fit for Sitecore-powered applications. Here’s how it benefits you:
waitUntil
enable asynchronous tasks such as logging and analytics to run without delaying user responses.To truly understand the advantages of Fluid Compute for Sitecore, take a look at this comparison chart:
As shown, Fluid Compute outperforms both traditional servers and serverless architectures in key areas such as scaling, concurrency, and cost efficiency. By preventing cold starts, enabling efficient auto-scaling, and optimizing resource usage, Fluid Compute ensures your Sitecore application runs at peak performance with minimal overhead.
One of the best aspects of Fluid Compute is how easy it is to implement.
As brands continue to push the boundaries of digital experiences, having a highly optimized, scalable compute model is essential. With Vercel Fluid Compute, Sitecore developers can future-proof their applications, ensuring exceptional performance while keeping costs in check.
]]>While working on a recent project to migrate a Sitecore 9.1 solution to Sitecore XM Cloud, an interesting situation arose with Bootstrap grid parameters. More specifically, with grid rendering parameters configured on renderings migrated from the legacy 9.1 content tree into the XM Cloud content tree.
To start, some (brief?) background on SXA and the grid system. SXA includes several grid systems out-of-the-box (reference), including Bootstrap 4 (BS4) and Bootstrap 5 (BS5). These grid systems allow developers to build responsive layouts in a consistent, predictable way. When adding a new headless site in XM Cloud, BS5 is the default grid system (reference). The supporting Sitecore items for the different grid systems can be found in the content tree under /sitecore/system/Settings/Feature/Experience Accelerator (BS4 and BS5 are highlighted in the screenshot below, but there are others):
The grid system(s) a site uses can be configured on the site’s Settings item, e.g., /sitecore/content/Test Site Collection/Headless Site A/Settings:
When editing a rendering on a page in the Content Editor, Experience Editor, or XM Cloud Pages (which was recently updated ), content authors can configure the grid and set things like column sizes, offsets, order, etc.:
These grid settings are stored as a single rendering parameter named GridParameters
associated to the parent rendering in the page’s Renderings and/or Final Renderings field. For example, assuming a Container rendering has the Size settings depicted in the animation above (meaning: Mobile | Size | 12), the raw value of the rendering in presentation details would look something like this:
<r uid="{FE9A8A21-02C7-4EB0-B1B1-DF67ADD29ADD}" ... s:par="?Styles=%7b6221E315-B00F-4832-9054-B46F347EC247%7d&GridParameters=%7b7465D855-992E-4DC2-9855-A03250DFA74B%7d&DynamicPlaceholderId=1" s:ph="headless-main" />
The s:par
attribute stores a URL-encoded query string containing the rendering parameters. The value of GridParameters
is “%7b7465D855-992E-4DC2-9855-A03250DFA74B%7d”, or, when URL-decoded, “{7465D855-992E-4DC2-9855-A03250DFA74B}”. That looks a lot like a Sitecore item ID, right ?
Note that, if there was more than one grid parameter,
GridParameters
would be a pipe-delimited (“|”) string of IDs.
The ID points to the grid size definition item located at (in this case, for BS5) /sitecore/system/Settings/Feature/Experience Accelerator/Bootstrap 5/Bootstrap 5 Grid Definition/Extra small/Size/12. Finally, as part of the definition of the size item, the applicable Bootstrap CSS class is specified in the Class field. It is this class (or classes, if more than one grid parameter is specified) that is applied to the markup when the component is rendered in the UI.
For a slightly more “real world” example, assume a Container rendering had (BS5) grid settings that looked like this:
The value of the GridParameters
rendering parameter would be:
<r uid="{FE9A8A21-02C7-4EB0-B1B1-DF67ADD29ADD}" ... s:par="GridParameters=%7B7465D855-992E-4DC2-9855-A03250DFA74B%7D%7C%7B597223E6-B7EE-4D86-BC89-F7DA3DE8A7E5%7D%7C%7B7D865A50-F089-421E-ACDC-620DB03BC49D%7D&FieldNames&BackgroundImage&Styles=%7B6221E315-B00F-4832-9054-B46F347EC247%7D&RenderingIdentifier&CSSStyles&DynamicPlaceholderId=1" s:ph="headless-main" />
Which, URL-decoded would be: “{7465D855-992E-4DC2-9855-A03250DFA74B}|{597223E6-B7EE-4D86-BC89-F7DA3DE8A7E5}|{7D865A50-F089-421E-ACDC-620DB03BC49D}”.
The JSON pulled from the layout service for the rendering would look like this:
... "uid": "fe9a8a21-02c7-4eb0-b1b1-df67add29add", "componentName": "Container", "dataSource": "", "params": { "GridParameters": "col-12 col-md-10 col-xl-5", // <=== HERE "Styles": "container", "DynamicPlaceholderId": "1", "FieldNames": "Default" } ...
And, finally, the resulting markup would look like this:
<div class="col-12 col-md-10 col-xl-5"> ... </div>
For the remainder of this post, assume the following:
Okay, so, what’s the issue? We have BS4 and BS5 available in XM Cloud and the migrated renderings are emitting the correct grid styles in the markup (e.g., col-12
). What’s the problem?
The problem came when content authors went to view and/or update the grid style parameters, either in the Content Editor, Experience Editor, or XM Cloud Pages. There wasn’t an error or anything, but nothing appeared in the Grid tab or the Advanced tab when editing the rendering parameters for the rendering, as if the parameters weren’t there….
When viewing raw values of the Renderings and Final Renderings fields on the page, the GridParameters
parameter was clearly present–so why wasn’t anything appearing in the editing UI for content authors?
As you may have already guessed (and, yes, it seems obvious now), the reason for this was that the item IDs referenced in the grid rendering parameter are different between BS4 and BS5, even for two grid size definition items with the same CSS class. For example, the col-12
item for BS4 (/sitecore/system/Settings/Feature/Experience Accelerator/Bootstrap 4/Bootstrap 4 Grid Definition/Extra small/Size/12) didn’t have the same ID as the matching col-12
item in BS5 (/sitecore/system/Settings/Feature/Experience Accelerator/Bootstrap 5/Bootstrap 5 Grid Definition/Extra small/Size/12).
Because the new XM Cloud solution had both the supporting BS4 and BS5 items available under /sitecore/system/Settings/Feature/Experience Accelerator, the BS4 grid CSS classes were still coming through in the UI. However, when editing, the rendering parameters modal was expecting the BS5 IDs (since the site was configured to use BS5) to bind the editing controls. Since no BS5 parameter IDs were found, the editing controls in the modal weren’t bound to the correct values and appeared broken for content authors.
As usual, Sitecore PowerShell Extensions (SPE) to the rescue. A PowerShell script was written to iterate over page renderings, map the Bootstrap 4 parameter IDs to their equivalent Bootstrap 5 parameter IDs based on a CSS class name match, if possible, and then save the updated rendering parameters back to the page.
In some cases, it wasn’t possible to map parameters between the two grid systems as there are breaking changes between BS4 and BS5. In BS4, for example, some Order definitions exist that do not exist in BS5 i.e., /sitecore/system/Settings/Feature/Experience Accelerator/Bootstrap 4/Bootstrap 4 Grid Definition/Extra small/Order/6.
Luckily, in the case of this particular project, the vast majority of the parameters did have a BS5 equivalent and were remapped accordingy, allowing the rendering parameters modal to properly reflect the current grid parameters for content authors.
Update-GridParameters.ps1
A few highlights on the script and how it works:
Here’s the script:
Function Update-GridParameters { <# .SYNOPSIS Maps Bootstrap 4 grid rendering parameters to Bootstrap 5 grid rendering parameters. .DESCRIPTION This function maps Bootstrap 4 grid rendering parameter IDs to their Bootstrap 5 equivalent rendering parameter IDs, if possible. .NOTES Nick Sturdivant | Perficient | nick.sturdivant@perficient.com | https://www.linkedin.com/in/nicksturdivant/ #> param ( [Parameter()] [String] $Path, [Parameter()] [Switch] $WhatIf ) BEGIN { Write-Host "Beginning $($MyInvocation.MyCommand)" } PROCESS { # get bootstrap 4 grid parameter definitions $bs4GridParameters = Get-ChildItem -Path "/sitecore/system/Settings/Feature/Experience Accelerator/Bootstrap 4/Bootstrap 4 Grid Definition" -Recurse ` | Where-Object { $_.TemplateID -eq "{CB3B3906-BE80-4D9B-A2A4-038193DA5422}" # /sitecore/templates/Foundation/Experience Accelerator/Grid/Grid Definition Items/Class } # get bootstrap 5 grid parameter definitions $bs5GridParameters = Get-ChildItem -Path "/sitecore/system/Settings/Feature/Experience Accelerator/Bootstrap 5/Bootstrap 5 Grid Definition" -Recurse ` | Where-Object { $_.TemplateID -eq "{CB3B3906-BE80-4D9B-A2A4-038193DA5422}" # /sitecore/templates/Foundation/Experience Accelerator/Grid/Grid Definition Items/Class } # build mapping $bs4To5Mappings = @() foreach ($bs4GridParameter in $bs4GridParameters) { # match bootstrap 5 parameter based on class name $bs5GridParameter = $bs5GridParameters | Where-Object { $_.Fields["Class"].Value -eq $bs4GridParameter.Fields["Class"].Value } if ($null -ne $bs5GridParameter) { $bs4To5Mappings += [PSCustomObject]@{ BS4Id = $bs4GridParameter.ID BS4Class = $bs4GridParameter.Fields["Class"].Value BS5Id = $bs5GridParameter.ID BS5Class = $bs5GridParameter.Fields["Class"].Value } } } $report = @() Write-Host "Processing $Path..." -ForegroundColor Cyan # get children based on path parameter, filtering to only those items with a rendering defined in their final layout $items = Get-ChildItem -Path $Path -Recurse | Where-Object { ($null -ne (Get-Rendering -Item $_ -FinalLayout)) } foreach ($item in $items) { $renderings = Get-Rendering -Item $item -FinalLayout if ($null -ne $renderings) { foreach ($rendering in $renderings) { # get grid rendering parameter $renderingParameter = Get-RenderingParameter -Rendering $rendering -Name "GridParameters" if ($null -ne $renderingParameter) { Write-Host "Processing grid rendering parameters on item $($item.ID), rendering $($rendering.UniqueId)..." -ForegroundColor Green $gridParametersIdString = $renderingParameter["GridParameters"] if (-not [string]::IsNullOrWhiteSpace($gridParametersIdString)) { $gridParameterIds = $gridParametersIdString.Split("|") $newGridParameterIds = @() foreach ($gridParameterId in $gridParameterIds) { # check if the parameter is bootstrap 4 $mappedParameter = $bs4To5Mappings | Where-Object { $_.BS4Id.ToString() -eq $gridParameterId } | Select-Object -First 1 if ($null -eq $mappedParameter) { $message = "Grid parameter ID $gridParameterId is not a Bootstrap 4 parameter that can be mapped to a Bootstrap 5 parameter, retaining original ID." Write-Host $message -ForegroundColor Yellow $report += @{ ItemId = $item.ID ItemPath = $item.FullPath RenderingItemId = $rendering.ItemID RenderingUniqueId = $rendering.UniqueId CurrentGridParameterId = $gridParameterId MappedGridParameterId = "N/A" GridClassName = "N/A" Notes = $message } $newGridParameterIds += $gridParameterId # process next parameter continue } # map to bootstrap 5 parameter $report += @{ ItemId = $item.ID ItemPath = $item.FullPath RenderingItemId = $rendering.ItemID RenderingUniqueId = $rendering.UniqueId CurrentGridParameterId = $gridParameterId MappedGridParameterId = $mappedParameter.BS5Id.ToString() GridClassName = $mappedParameter.BS5Class Notes = "Mapping Bootstrap 4 grid parameter ID $gridParameterId to Bootstrap 5 grid parameter ID $($mappedParameter.BS5Id.ToString())." } $newGridParameterIds += $mappedParameter.BS5Id.ToString() } $newGridParametersIdString = $newGridParameterIds -join "|" Write-Host "Current: $gridParametersIdString" Write-Host "Mapped: $newGridParametersIdString" if ($gridParametersIdString -eq $newGridParametersIdString) { Write-Host "Current and mapped grid parameters match, skipping update..." -ForegroundColor Yellow # process next rendering continue } # set new rendering parameter $setMessage = "Setting new grid parameters on item $($item.ID) ($($item.FullPath)), rendering $($rendering.UniqueId)..." Write-Host $setMessage -ForegroundColor Yellow $newGridParameters = [Ordered]@{"GridParameters" = $newGridParametersIdString } $report += @{ ItemId = $item.ID ItemPath = $item.FullPath RenderingItemId = $rendering.ItemID RenderingUniqueId = $rendering.UniqueId CurrentGridParameterId = $gridParametersIdString MappedGridParameterId = $newGridParametersIdString GridClassName = "" Notes = "$setMessage ($gridParametersIdString ==> $newGridParametersIdString)" } if (-not $WhatIf) { # update new grid parameters and then update the rendering $rendering | Set-RenderingParameter -Parameter $newGridParameters | Set-Rendering -Item $item -FinalLayout } } } } } } # display report $report | Show-ListView -Property @{ Label = "Item ID"; Expression = { $_.ItemId } }, @{Label = "Item Path"; Expression = { $_.ItemPath } }, @{Label = "Rendering Item ID"; Expression = { $_.RenderingItemId } }, @{Label = "Rendering Unique ID"; Expression = { $_.RenderingUniqueId } }, @{Label = "Current Grid Parameter ID"; Expression = { $_.CurrentGridParameterId } }, @{Label = "Mapped Grid Parameter ID"; Expression = { $_.MappedGridParameterId } }, @{Label = "Grid Class Name"; Expression = { $_.GridClassName } }, @{Label = "Notes"; Expression = { $_.Notes } } } END { Write-Host "Ending $($MyInvocation.MyCommand)" } } # 1. Change the Path parameter as necessary, depending on where the content pages are in the tree. # 2. Use the -WhatIf switch to preview the changes; remove the switch to update the renderings and pages. Update-GridParameters -Path "/sitecore/content/Test Site Collection/Headless Site A" -WhatIf
My colleague (and Sitecore MVP) Eric Sanner happened to write a similar script recently. I can neither confirm nor deny that the two of us wrote two scripts to do the same thing at around the same time . His script can be found below and illustrates another approach to solve the same problem. Thanks for sharing, Eric!
BS4toBS5.ps1
<# .SYNOPSIS Update Final Layouts .DESCRIPTION Find bootstrap4 grid settings in final layout and convert to bootstrap5 .NOTES Eric Sanner | Perficient | eric.sanner@perficient.com | https://www.linkedin.com/in/ericsanner/ #> #BEGIN Config $database = "master" $allowDelete = $false #END Config #BEGIN Helper Functions function Write-LogExtended { param( [string]$Message, [System.ConsoleColor]$ForegroundColor = $host.UI.RawUI.ForegroundColor, [System.ConsoleColor]$BackgroundColor = $host.UI.RawUI.BackgroundColor ) Write-Log -Object $message Write-Host -Object $message -ForegroundColor $ForegroundColor -BackgroundColor $backgroundColor } function Strip-Html { #https://www.regular-expressions.info/lookaround.html#lookahead Replaces multiple spaces with a single space param ( [string]$text ) $text = $text -replace '<[^>]+>',' ' $text = $text -replace " (?= )", "$1" $text = $text.Trim() return $text } function Truncate-Output { param ( $obj, $maxLeng ) $ret = ""; if($obj -ne $null) { $str = $obj.ToString().Trim() $leng = [System.Math]::Min($str.Length, $maxLeng) $truncated = ($str.Length -gt $maxLeng) $ret = $str.Substring(0, $leng) if($truncated -eq $true) { $ret = $ret + "..." } } return $ret } #END Helper Functions #BEGIN Sitecore Functions function Get-SitecoreItemById { param( [string]$id ) return Get-Item -Path $database -ID $id -ErrorAction SilentlyContinue } function Update-SitecoreItem { param( [Sitecore.Data.Items.Item]$item, [System.Collections.Hashtable]$updates ) if($item -eq $null) { Write-LogExtended "[E] Error updating item $($item) - Item is null" Red return } if($updates -eq $null) { Write-LogExtended "[E] Error updating item $($item) - Update hashtable is null" Red return } $changeDetected = $false $foregroundColor = "Green" Write-LogExtended "[I] Updating Item $($item.ID) - $($item.Name)" $item.Editing.BeginEdit() foreach($key in $updates.GetEnumerator()) { if($item.($key.Name) -ne $null) { $output = "Field Name '$($key.Name)' Current Value: '$(Truncate-Output $item.($key.Name) 40)' New Value: '$(Truncate-Output $key.Value 40)'" if($item.($key.Name) -ne $key.Value) { Write-LogExtended "[U] $($output)" $item.($key.Name) = $key.Value $changeDetected = $true } else { Write-LogExtended "[-] $($output)" } } } $itemModified = $item.Editing.EndEdit() if($changeDetected -ne $itemModified) { $foregroundColor = "Red" } Write-LogExtended "[I] Change Detected: $($changeDetected) Item modified $($itemModified)" $foregroundColor } #END Sitecore Functions #BEGIN Conversion Functions function ProcessItem { param( [Sitecore.Data.Items.Item]$item ) Write-LogExtended "[I] Processing item $($item.ID): $($item.ItemPath)" $gridPattern = "GridParameters=%7B(\w{8}-\w{4}-\w{4}-\w{4}-\w{12})%7D" $bs4Pattern = "Bootstrap 4" $finalRenderings = $item["__Final Renderings"] $finalRenderingsNew = $item["__Final Renderings"] $gridRenderings = @{} $gridMatches = Select-String -InputObject $finalRenderings -Pattern $gridPattern -AllMatches foreach($gridMatch in $gridMatches.Matches) { if(!$gridRenderings.ContainsKey("$($gridMatch.Groups[1].Value)")) { $gridRenderingItem = Get-SitecoreItemById $gridMatch.Groups[1].Value $gridRenderings["$($gridMatch.Groups[1].Value)"] = $gridRenderingItem.ItemPath } } foreach($rendering in $gridRenderings.GetEnumerator()) { $bs4Matches = Select-String -InputObject $rendering.Value -Pattern $bs4Pattern if($bs4Matches) { Write-LogExtended "[I] Found BS4 GridParams $($rendering.Value)" -ForegroundColor "Red" $bs4Items.Add($item.ID, $item.Path) if($bs4ToBs5Mapping.ContainsKey($rendering.Name)) { Write-LogExtended "[I] Mapping $($rendering.Name) to $($bs4ToBs5Mapping[$rendering.Name])" -ForegroundColor "Green" $finalRenderingsNew = $finalRenderingsNew -replace $rendering.Name, $bs4ToBs5Mapping[$rendering.Name] } else { Write-LogExtended "[E] No Mapping Found for $($rendering.Name)" -ForegroundColor "Red" } } } if($update -and $finalRenderings -ne $finalRenderingsNew) { $updates = @{} $updates.Add("__Final Renderings", $finalRenderingsNew) Update-SitecoreItem $item $updates } } #END Conversion Functions #BEGIN Main $update = $true $bs4Items = @{} $bs4ToBs5Mapping = @{} #/sitecore/system/Settings/Feature/Experience Accelerator/Bootstrap 4/Bootstrap 4 Grid Definition/Extra small/Size/12 -> /sitecore/system/Settings/Feature/Experience Accelerator/Bootstrap 5/Bootstrap 5 Grid Definition/Extra small/Size/12 $bs4ToBs5Mapping.Add("908E2BC6-C110-4ED7-AF39-7EEACBB31A34", "7465D855-992E-4DC2-9855-A03250DFA74B") #/sitecore/system/Settings/Feature/Experience Accelerator/Bootstrap 4/Bootstrap 4 Grid Definition/Extra small/Size/8 -> /sitecore/system/Settings/Feature/Experience Accelerator/Bootstrap 5/Bootstrap 5 Grid Definition/Extra small/Size/8 $bs4ToBs5Mapping.Add("D65D90FB-45BF-4A04-A1EA-6F348E7CCBEA", "F2A11D85-8B09-40AC-B5D8-A9E1025F899D") $parentPath = "master:/sitecore/content/<tenantName>/<siteName>/Home" $childItems = Get-ChildItem -Path $parentPath -Recurse $childItems | ForEach-Object { ProcessItem $_ } Write-LogExtended "[I] Found $($bs4Items.Count) Items that reference BS4" #END Main
Thanks for the read!
Sitecore Search is a powerful tool that helps users quickly find relevant content by indexing various sources and presenting results in an intuitive, customizable way. To get the most out of it, businesses must optimize how search widgets function, manage crawlers to keep content fresh, and enhance query handling through automated tools. Let’s dive into these essential components to understand how they work together.
Search widgets shape how users interact with search results. These elements power features such as autocomplete, filtering, sorting, and ranking adjustments, making searches more intuitive and personalized. Businesses can configure widgets to offer spell-check, AI-driven recommendations, and customized ranking rules, ensuring that users find what they need with minimal effort. A well-optimized search widget improves relevance and usability, allowing users to refine results based on parameters like relevance, date, or popularity.
The Search API Explorer is another valuable tool that allows businesses to test and refine search queries before deploying them. It acts as a testing ground for adjusting ranking logic, playing with filters, and debugging settings in real time. By viewing API responses in JSON format, developers can fine-tune search behavior to better align with user expectations and business goals.
For search results to remain accurate, Sitecore Search relies on crawlers to fetch and index content from different sources. These crawlers can be scheduled to update content in real time, at set intervals, or manually. Businesses have control over crawl frequency, depth, and which URLs should be included or excluded. Additionally, authentication settings ensure that restricted content can be indexed when necessary.
There are different types of crawlers depending on where content resides:
A crucial part of making all content searchable is the Document Extractor, which enables search engines to read and index PDFs and Word documents. Since these file types often contain valuable information that would otherwise be hidden from search results, the extractor converts document content into searchable text and extracts metadata such as titles, authors, and dates. This makes it easier for users to find relevant information even when it exists within non-web-based files.
Automation plays a key role in delivering personalized and relevant search results. Search request triggers dynamically modify search behavior based on user actions, ensuring that results align with their needs. For instance, businesses can set up triggers to automatically apply filters based on past searches, boost specific results for certain keywords, or redirect users to relevant pages when they search for particular terms.
Similarly, search request extractors enhance the quality of search results by interpreting user intent, applying synonyms, and refining queries. These tools help improve accuracy by understanding variations in phrasing and context, ensuring that users receive the most relevant results even if their initial search terms aren’t perfectly aligned.
Sitecore Search is more than just a search tool—it’s a dynamic system that can be tailored to enhance user experience and ensure content is indexed efficiently. By optimizing search widgets, managing crawlers effectively, and leveraging automation, businesses can significantly improve search accuracy and usability.
If you need help configuring Sitecore Search or have questions about optimizing your setup, drop a comment or reach out—we’d love to chat!
]]>Personalization has always been one of the most sought-after features for brands, allowing them to deliver tailored digital experiences. Sitecore’s CMS products XP and XM have built-in personalization capabilities, ensuring that the right content reaches the right contacts, for example, by showing, hiding, or adjusting content.
In recent years, the shift towards headless solutions has gained significant momentum, enabling greater flexibility, omnichannel delivery, and seamless integrations with modern digital ecosystems – making Sitecore XM Cloud the next choice or most obvious step in a brand’s digital transformation. However, with the shift from Sitecore XP to Sitecore XM Cloud, customers will notice a significant change in how personalization works behind the scenes. While XM Cloud provides a cloud-first, headless, and scalable solution, it does come with certain limitations in personalization compared to XP. This blog will explore how personalization in Sitecore XM Cloud differs from XP, its strengths, and how marketers and developers can still leverage its capabilities effectively.
Personalization in XM Cloud, also known as Embedded Personalization in XM Cloud pages, offers a predefined set of built-in, page-based personalization features. Users can easily define audience segments and serve them customized page variations. The embedded personalization capabilities include real-time data stream collection, predefined conditions, and comprehensive site and page analytics.
For those migrating from Sitecore XP, the most significant change is the absence of a provision to create custom conditions for rule-based personalization. Sitecore XP provided extensive flexibility, allowing users to define custom conditions and personalize based on deep visitor analytics. However, in XM Cloud, personalization is streamlined and focused on a more structured OOTB (Out-of-the-Box) approach.
Here’s what changes:
The personalization model in XM Cloud is straightforward and designed for ease of use. Here’s how it functions:
Personalization in Sitecore XM Cloud takes a different approach than XP. Despite its limitations, personalization in XM Cloud still offers benefits: it favors simplicity and scalability over deep customization. While some brands may feel the impact of losing advanced personalization rules, the benefits of speed, cloud-native architecture, and ease of use make XM Cloud an attractive option. Combining XM Cloud with Sitecore Personalize can be a game-changer for those needing deeper personalization.
In the next few blogs, we’ll explore the details of embedded personalization and how Sitecore Personalize can enhance personalization in XM Cloud.
]]>The digital experience landscape is evolving rapidly, and businesses face growing pressure to deliver personalized, scalable, and seamless customer experiences while minimizing complexity. Traditional on-prem and PaaS-based CMS solutions often come with heavy infrastructure demands, maintenance, and upgrade cycles.
Sitecore XM Cloud addresses these areas with a fully cloud-native, SaaS-based approach, eliminating the need to manage infrastructure, accelerating deployments, and providing a scalable foundation for digital transformation. But beyond the technical shift, what does this mean for your digital roadmap? How can enterprises leverage this approach to future-proof their content strategy?
Sitecore XM Cloud represents more than just another update—it’s a fundamental shift in how digital experiences are built, delivered, and maintained. Here’s why organizations are making the move:
Organizations that require global scalability, frequent content updates, and reduced reliance on IT teams stand to gain the most from XM Cloud’s SaaS-based efficiency.
Transitioning to XM Cloud requires careful planning to maximize benefits while minimizing disruptions. Here’s what enterprises should consider:
Beyond just a shift to SaaS, Sitecore XM Cloud introduces advanced features designed to enhance business operations:
These enhancements allow businesses to be more responsive, data-driven, and customer-focused without the complexity of traditional platforms.
Sitecore XM Cloud isn’t just an upgrade—it’s a fundamental shift in digital experience management. By adopting a cloud-native, SaaS-first approach, businesses can move faster, scale effortlessly, and eliminate infrastructure complexity. This enables teams to focus on delivering exceptional customer experiences with greater agility.
For organizations looking to modernize their CMS strategy, XM Cloud offers the flexibility, efficiency, and innovation needed to stay ahead. However, every business has unique requirements, and a thoughtful evaluation of long-term goals is essential to determine if it’s the right fit.
]]>In one of the recent projects I worked on, there was a major challenge in integrating multiple digital systems effectively. The client had a complex technology stack comprising a CMS, an e-commerce platform, a search engine, and a personalization system, all of which needed to work together seamlessly. However, we ran into several roadblocks that made this integration far from straightforward:
Example Problem Scenario: E-Commerce (Product information management Integration)
Imagine a company that stores its product data in a Product Information Management (PIM) system but also wants to showcase featured products dynamically on its website’s homepage. Without proper integration, marketers would have to manually update product listings, leading to inconsistencies and delays in showcasing the latest promotions or inventory updates.
Many organizations struggle same kind if issues to bridge the gap between their current tech stack and modern, cloud-native solutions. This is where Sitecore Connect comes in.
Sitecore has transitioned into a composable digital experience platform (DXP), providing best-in-class products such as:
To ensure seamless integration between these products and external platforms, Sitecore Connect acts as the integration hub.
Sitecore Connect is a low-code/no-code integration platform designed to connect Sitecore products with third-party applications, services, and legacy systems. It enables businesses to:
Organizations should consider Sitecore Connect when they:
Need to integrate Sitecore products (XM Cloud, OrderCloud, Discover, CDP) with existing systems.
Want to connect legacy system or CMS platforms with modern Sitecore solutions.
Require seamless data synchronization between Sitecore and third-party tools (ex: Salesforce, SAP, Shopify, etc.).
Aim to reduce integration costs and implementation time using low-code/no-code solutions.
Seek to future-proof their digital architecture with a scalable, composable ecosystem.
Faster Time-to-Market – Reduces development time with pre-built connectors.
Seamless Interoperability – Ensures smooth communication between different systems. Better Data Management – Eliminates data silos for a unified customer experience.
Business Agility – Enables organizations to pivot quickly to new digital strategies.
Cost Efficiency – Minimizes the need for extensive custom development.
Example 1: Healthcare Website Integration
A healthcare provider has an Electronic Health Record (EHR) system to manage patient data but wants to offer an online appointment booking system while also providing personalized health content based on patient history.
With Sitecore Connect, they can:
By leveraging Sitecore Connect, the healthcare provider can offer a more personalized, automated, and efficient patient experience while reducing manual data handling.
Example 2: Integration with E-Commerce system
Returning to our PIM system example, Sitecore Connect can be configured to:
By using Sitecore Connect, the company can ensure that its PIM system, content management, and personalization efforts work in harmony without the need for complex custom development.
For organizations looking to modernize their digital experiences integrating all existing systems to share interrelated data, Sitecore Connect is the ideal solution. By enabling seamless integration between Sitecore’s composable products and external platforms, businesses can create scalable, future-proof digital experiences.
]]>While the world of digital experience platforms continues to evolve at a break-necking pace, and exponentially more so with the evolution of technologies like AI, there are still some steps digital marketing and development teams building digital customer experiences on the Sitecore platform can take to ensure long-term growth over the next five years and beyond. This will ensure your team won’t get stuck in an endless cycle of rework, patching or updates that are no longer relevant as soon as they are deployed. While there is no crystal ball that can tell us what the future might hold (even tomorrow), consider these steps as you continue to iterate on your Sitecore ecosystem.
It’s not new news that Sitecore’s approach has shifted away from a monolithic CMS in favor of a Composable DXP. This allows businesses to pick and choose best-in-class solutions rather than rely on one singular system.
Modern digital experiences extend beyond traditional websites to mobile apps, chatbots, voice assistants and more. A headless CMS allows organizations to manage content in one place while being able to deliver it anywhere, seamlessly.
Customer’s expect real-time, personalized experiences, now more than ever. In most instances, consumers are even willing to go as far as supplying personal data in order to get to this type of experience. With this data and segmentation capabilities, the leading brands must take action to deliver relevant content, offers and experiences to ensure these expectations are being met at a minimum, and exceeded wherever possible.
Especially within the digital space, content can become stale, and FAST! Content can take a while to ideate on, produce and distribute, but it doesn’t have to be this way. Finding ways to ideate, produce and distribute content as efficiently as possible is a great step in future-proofing your Sitecore implementation.
Data-driven decision-making is no longer a “nice-to-have” – it is a must. It helps marketers understand user behavior and measure success. In addition to this, there are many legal considerations around data collection and storage practices, and so having defined guidelines and guardrails in place can prevent organizations from being exposed to a whole host of risks.
The most important thing to keep in mind as you work toward applying these principles is to keep an open mind. It is an understatement to say that the DXP world and the technologies and tools that are available are constantly changing. Embrace the change. Find use cases for new best practices and technologies. Experiment, and most of all, have some fun! This will help your organization to adapt to the ever-changing digital landscape and make sure you are always there to meet your customers and prospects where they are on their journeys
A successful Sitecore implementation isn’t just about what works today – it is about ensuring long-term flexibility, success and innovation. Build for that and the rest will follow. Now is the time to assess your strategies and pivot where needed. Are you ready to future-proof your organization’s Sitecore implementation? Reach out to Perficient today!
]]>Sitecore frequently releases hotfixes to address reported issues, including critical security vulnerabilities or urgent problems. Having a quick, automated process to apply these updates is crucial. By automating the deployment of Sitecore hotfixes with an Azure DevOps pipeline, you can ensure faster, more reliable updates while reducing human error and minimizing downtime. This approach allows you to apply hotfixes quickly and consistently to your Azure PaaS environment, ensuring your Sitecore instance remains secure and up to date without manual intervention. In this post, we’ll walk you through how to automate this process using Azure DevOps.
Before diving into the pipeline setup, make sure you have the following prerequisites in place:
Steps to Automate Sitecore Hotfix Deployment
Automating the deployment of Sitecore hotfixes to Azure PaaS with an Azure DevOps pipeline saves time and ensures consistency and accuracy across environments. By storing the hotfix WDP in an Azure Storage Account, you create a centralized, secure location for all your hotfixes. The Azure DevOps pipeline then handles the rest—keeping your Sitecore environment up to date.
This process makes applying Sitecore hotfixes faster, more reliable, and less prone to error, which is exactly what you need in a production environment.
]]>