Showing posts with label sitecoreAI. Show all posts
Showing posts with label sitecoreAI. Show all posts

Monday, August 3, 2026

Connecting Sitecore XP to Your IDE via MCP — With VSCode and GitHub Copilot

Hello Sitecorian Community! 👋

Blog 2 gave me the working mental model for MCP. Now it was time to point that knowledge at something real: a live Sitecore XP instance, from inside VSCode, through GitHub Copilot.

While exploring what the community had already built, I came across an excellent guide from the Flux Digital team:

📄 Setting Up Sitecore MCP Server with XP + VSCode & CoPilot — Flux Digital

This is based on Anton Tishchenko’s open-source Sitecore MCP server:
📦 github.com/Antonytm/mcp-sitecore-server (released May 2025)

I’m going to walk through the full setup here with additional context from my own experience along the way.

What this server gives you access to

Once connected, your IDE can interact with a running Sitecore XP instance for:

  • Content item operations — read, create, and update items
  • User, domain, and role management
  • Search index control — rebuild, status checks
  • Databases, caches, and log access

The full architecture of this setup


Full architecture of the Sitecore MCP setup. VSCode reads the mcp.json config to launch the server process via NPX, which then authenticates and queries the local Sitecore XP instance

Prerequisites

  • Sitecore XP 10.x installed locally (the Flux Digital guide uses 10.4)
  • Node.js and NPX installed on your machine
  • GraphQL configured on your Sitecore instance with the Item API enabled
  • VSCode with the GitHub Copilot extension

Step-by-step setup

  1. Create your MCP configuration fileIn a .vscode folder at the root of your Sitecore project, create a new file named mcp.json:
{
"servers": {
"Sitecore Local": {
"type": "stdio",
"command": "npx",
"args": ["@antonytm/mcp-sitecore-server@latest"],
"env": {
"TRANSPORT": "stdio",
"GRAPHQL_ENDPOINT": "https://<your-sc-hostname>/sitecore/api/edge/graphql",
"GRAPHQL_SCHEMAS": "edge,master,core",
"GRAPHQL_API_KEY": "{YOUR-API-KEY-GUID-HERE}",
"ITEM_SERVICE_SERVER_URL": "https://<your-sc-hostname>",
"ITEM_SERVICE_DOMAIN": "sitecore",
"ITEM_SERVICE_USERNAME": "admin",
"ITEM_SERVICE_PASSWORD": "yourpassword"
}
}
}
}


Update every value to match your local Sitecore instance — hostname, API key, and credentials.

2. Start the MCP server

Open the mcp.json file in VSCode. A 

Start

button appears inline at the top of the file — click it. VSCode launches the server as a background process via NPX, downloading the package on the first run. Monitor the output in the VSCode 

Output 

panel to confirm it started cleanly.

3. Switch Copilot to Agent mode and verify the connection

Open GitHub Copilot in VSCode and switch to

Agent

mode. Click the 

tool icon

at the bottom of the Copilot panel. Scroll through the list — your Sitecore Local server should appear with its tools registered beneath it. If it doesn’t show up, restart VSCode, reopen Copilot, and click the tool icon again.

4. Test the connection

Type the following prompt in Copilot agent mode:

  • Test Sitecore MCP connection works by bringing back the default home item from Sitecore

Copilot will ask permission before running — click

Continue

If the connection is working, you’ll see your Sitecore Home item data come back directly inside the Copilot response. That moment is genuinely satisfying.

Alternative: clone and run via NPM instead of NPX

If you prefer not to rely on NPX fetching the package on demand, you can clone and run the server directly:

git clone https://github.com/Antonytm/mcp-sitecore-server.git
cd mcp-sitecore-server
npm install
npm run build
npm start

Solving common issues

Too many tools error (on a free Copilot account)

Go to the tool icon in Copilot and deselect the default built-in tools, leaving only the Sitecore MCP Server tools active. Free tier accounts have a tool limit per request.

TLS / connection error connecting to local Sitecore

Add the following to the env section of your mcp.json:

"NODE_TLS_REJECT_UNAUTHORIZED": "0"

⚠️ Important: Only use NODE_TLS_REJECT_UNAUTHORIZED: "0" for local development instances. Never use this setting for remote or production servers.

Item API not responding

Your local Sitecore instance may need a config patch to allow HTTP access for the Item Service. You need to set Sitecore.Services.AllowToLoginWithHttp to true and configure the appropriate security policy. The full config patch XML is in the Flux Digital guide.

What this stage proved

By the end of this setup, I had GitHub Copilot in my IDE talking directly to a local Sitecore XP instance — browsing items, querying content, checking data — all through natural language prompts. No Content Editor. No manual navigation. Just a prompt and a result.

It worked well. But I noticed that Anton’s server was a general-purpose Sitecore administration tool. What I actually wanted was something more focused — tools shaped around my specific daily reporting needs on a real project. That is what Blog 4 is about.

Till then, Happy Sitecoring! 😊

Monday, July 20, 2026

Your First MCP Server in .NET — From Zero to Hello Tool

 

Hello Sitecorian Community! 👋

Before building anything Sitecore-specific, I needed to understand MCP from the ground up. Jumping straight to a Sitecore integration without that foundation would mean debugging two things at once — the Sitecore layer and the MCP layer. That is a reliable recipe for confusion.

So step one was this: build the smallest possible working MCP server in .NET, connect it to GitHub Copilot, and see a single tool call succeed. That mental model turned out to be everything that followed.

The guide I followed was Microsoft’s official quickstart:
📘 Create a minimal MCP server using C# — Microsoft Learn

Understanding the project structure first

Before diving into the steps, it helps to understand what a .NET MCP server project actually contains. The template generates four key files:

MyFirstMcpServer — scaffolded projectProgram.csDefines the app as an MCP serverSets transport type (stdio / http)RandomNumberTools.csSample tool — returns a randomnumber between min / max valuesserver.jsonDefines how and where the serveris published (NuGet)[ServerName].httpHTTP transport only — defaulthost address for remote server

The four files generated by the MCP Server App template. Program.cs and the tools file are the two you'll spend most time in

Prerequisites

  • .NET 10.0 SDK — required; the MCP project templates won’t install on earlier versions
  • Visual Studio Code
  • C# Dev Kit extension for VSCode (ms-dotnettools.csdevkit)
  • GitHub Copilot extension for VSCode (GitHub.copilot)
  • A NuGet.org account — only if you want to publish; skip for local experiments

Note: The Microsoft.McpServer.ProjectTemplates package is currently in preview. It works well, but always check the official docs for the latest before you start.

Step-by-step setup

Step-by-step setup

  1. Install the MCP Server project templateOpen a terminal and run:
dotnet new install Microsoft.McpServer.ProjectTemplates

This adds the MCP Server Apptemplate to your .NET tooling. You won’t see it in the project list until this step is done. .NET 10.0 SDK or later is required.

2. Create the project in VSCode

Open VSCode and bring up the Command Palette (Ctrl+Shift+P on Windows/Linux, Cmd+Shift+P on Mac). Type .NET: New Project and select it. In the template list that appears, search for

MCP Server App and select it. Choose a location, give your project a name — I used MyFirstMcpServer — and press Enter.

3. Choose your template optionsYou’ll be prompted to configure:

  • Framework: Select .NET 10
  • Transport type: Choose stdio(local process) for your first experiment. It communicates via standard input/output and needs no web hosting setup. 
  • Choose http only if you need a remotely accessible server
  • Native AOT / Self-contained: Leave as defaults for now

4. Read the scaffolded code before changing anything

VSCode opens your new project. Spend five minutes reading through Program.cs and RandomNumberTools.cs before modifying anything. The template gives you a working server with a sample tool already registered. That structure — the attribute decoration, the description, the method signature — is the pattern you will repeat for every tool you build later.

5. Connect Copilot and test a tool call 

Open GitHub Copilot in VSCode and switch it to Agent mode

Click the tool icon at the bottom of the Copilot panel. Your MCP server should appear in the list of available tools. If it doesn’t, restart VSCode and try again. Once it appears, type a prompt that exercises the sample tool. Copilot will ask permission to run it — click Continue. When you see the tool execute and return a result inside the Copilot response, you have done it.

6. Update PackageId if publishing to NuGet (optional)

If you want to publish your server as a NuGet package, update the <PackageId> in your .csproj to something unique:

<PackageId>YourNuGetUsername.SampleMcpServer</PackageId>

Not required for local use.

What the transport types actually mean

stdio transportLocal process, stdin/stdoutIDE / Copilot.exe✓ No web server needed✓ Simplest to get started — Local machine onlyhttp transportRemote web serviceIDE / CopilotHTTP API✓ Shareable across a team✓ Works remotely — Needs hosting setup

stdio vs http transport. For a first experiment, stdio is the right choice. Switch to http when you need to share the server across a team or access it remotely

Three things this exercise taught me

Tools are the entire model. An MCP server is a collection of tools. Each tool has a name, description, typed inputs, and a return value. The AI model reads those descriptions to decide which tool to call. That is the whole protocol — no magic underneath.

The transport layer is a deployment decision, not a logic decision. stdio vs http changes how clients connect to your server. The tools themselves work identically in both modes. Start with stdio locally; reach for http when you need remote access or team sharing.

Clear descriptions drive reliable routing. In the sample tool, the description is short and precise. I learned the hard way later that vague descriptions cause the AI to call the wrong tool or ignore it entirely. Write descriptions as if you are explaining to a teammate what this function does and when exactly to use it.

Quick tip: after getting the sample tool working, try modifying the RandomNumberTools.cs description to something vague, then ask Copilot the same prompt. You will see immediately how much description quality affects routing reliability.

Till then, Happy Sitecoring! 😊

Tuesday, July 14, 2026

MCP — The Protocol the Sitecore Community Is Talking About

Hello Sitecorian Community! 👋

If you have been following Sitecore community conversations lately, one acronym keeps coming up: MCP. If you have heard the term but not yet found time to dig into it properly — this four-part series is for you.

I have already written a full recap of SUGCON India 2026 in Delhi — the announcements, the sessions, the community energy. I will not repeat all of that here. But one topic from those two days sent me down a rabbit hole I haven’t climbed out of since, and that is what this series documents.

That topic was Model Context Protocol — MCP.

So what actually is MCP?

MCP — Model Context Protocol — is an open protocol that defines how AI models communicate with external tools and data sources in a structured, standardised way. The core shift it represents is this: instead of an AI assistant only being able to chat, it can also act — querying systems, reading live data, triggering operations — through a defined interface.

Think of it as a universal adapter between your AI client and any external system. The AI model discovers available tools, reads their descriptions, and calls them in response to a natural language prompt. No hardcoded API client code. No custom integration per tool. One protocol, any system that implements it.

AI ClientCopilot / Claude / CursorpromptMCP ServerTool registryRequest handlerResponse formatterresultAPI callSitecore XPItem API / GraphQLDatabasesLogs, cachesAny APIREST, GraphQL…Natural languageprompt in IDE

 MCP high-level flow: a natural language prompt triggers the MCP client, which routes through the server to the target system and returns structured results

The three things that make MCP relevant for Sitecore developers right now

1. Sitecore’s own direction

At SUGCON India 2026, Sitecore announced Marketer MCP powered by Agent API — the ability to access Sitecore marketing capabilities directly through AI environments like Claude, Cursor, and other LLM-powered tools. This is not a roadmap item. It is Sitecore signalling that MCP is a first-class integration path.

2. The community built it first — for XP

In May 2025 — before the SUGCON announcement — community contributor Anton Tishchenko released an open-source Sitecore MCP server on GitHub: github.com/Antonytm/mcp-sitecore-server. This server connects to Sitecore XP via the Item Service API and GraphQL, and exposes tools for content operations, user and role management, index control, and database and log access. The community did not wait for an official product — it built the bridge itself.

3. The .NET angle for developers like me

Microsoft published an official quickstart for building MCP servers in C# using the C# SDK for MCP. The same language stack we use for Sitecore development is now a first-class way to build AI tooling. That alignment made experimentation feel natural rather than foreign.

What MCP actually enables — in practical terms

Without MCP, an AI assistant in your IDE can only work with the code in front of it. With an MCP server connected to your Sitecore instance, it can also:

  • Browse the content tree and retrieve specific items
  • Check the publishing queue without opening the Sitecore admin
  • Query workflow states across a template type
  • Check which items are currently locked and by whom
  • Read logs and surface errors without leaving your editor

All of this through a natural language prompt. No tab-switching, no manual navigation, no copy-pasting item IDs.

Why this matters more than it sounds: Sitecore developers already know their IDE. The friction of context-switching to a browser, logging into the admin UI, navigating to the right screen — that adds up across a working day. MCP removes that friction without changing the way Sitecore works.

How MCP tools work — a closer look

Every MCP server is essentially a collection of tools. Each tool is a named function with a description and typed inputs. The AI model reads those descriptions to decide which tool to call when responding to a prompt.

MCP Server — tool anatomyTool: GetPublishingQueueStatusNameUnique identifierDescriptionAI reads this to routeInput schemaTyped parametersExecution logicCalls Sitecore APIsAI Modelreads descriptionSitecore XPreturns live data

Anatomy of a single MCP tool. The AI reads the description to decide whether to call the tool; the execution logic does the actual work against Sitecore

What is coming in this series

BlogWhat it coversBlog 1 (this one)What MCP is, why it matters for Sitecore developers, and the landscapeBlog 2Building a minimal MCP server in .NET using Microsoft’s official C# quickstartBlog 3Setting up Anton Tishchenko’s community Sitecore MCP server for XP with VSCode and CopilotBlog 4Building a custom .NET MCP server tailored to real Sitecore project reporting needs

If you are a .NET developer working on Sitecore and curious about where AI tooling is heading — stick around. The barrier is genuinely lower than it looks.

Till then, Happy Sitecoring! 😊

Monday, June 8, 2026

SUGCON India 2026 — My Key Takeaways from Two Days in Delhi

 

Hello Sitecorian Community,

SUGCON (Sitecore User Group Conference) India 2026 just wrapped up in Delhi on June 4–5, and what an incredible two days it was!

If you couldn’t make it this year, or if you attended and want a structured recap of everything that happened — this post is for you. I’m going to walk through the biggest announcements, the sessions that stood out, and what I personally think you should be paying attention to as a Sitecore practitioner right now.

Let’s dive in. 🚀

🔷 The Big Announcement: Sitecore vNext

If there was one topic that had every room buzzing at SUGCON India 2026, it was Sitecore vNext.

The next major evolution of the Sitecore Platform DXP is officially on the horizon — and here’s what makes it genuinely exciting: it’s not the kind of “upgrade” that forces you to rewrite everything overnight.

What we know about vNext so far:

  • Built on a modern .NET foundation, fully aligned with Microsoft’s long-term roadmap
  • Uses the Strangler Fig pattern for gradual modernization — you adopt new capabilities at your own pace, alongside your existing implementation
  • No forced migrations, no massive rewrites
  • AI-powered authoring experiences built in from the start
  • A refreshed Content Editor and Experience Editor experience
  • Support for Windows Server 2025, SQL Server 2025, Solr 10, and .NET 10
🔥 What really got the room talking: The Strangler Fig approach means organisations can introduce vNext capabilities gradually — running them alongside what they already have, and transitioning components when the time is right for them. That’s a massive shift from the traditional “big bang” upgrade model Sitecore customers have been used to.

And the bridge to get there? Sitecore 10.5.

Sitecore 10.5 is the next stepping stone and it’s already delivering AI-powered authoring capabilities as a preview of what vNext will bring at scale.

✅ Three Things You Can Start Doing Right Now

  1. Build clean separation between your Sitecore implementation and custom code — this is what makes the Strangler Fig approach actually work
  2. Stay current — 10.4 and 10.5 are key modernization milestones, don’t fall behind
  3. Invest in automation — DevOps pipelines, CI/CD, and regression testing will be your best friends during any gradual migration

🔷 AI Is Moving From Buzzword to Engineering Discipline

This was the theme that ran through almost every technical session at SUGCON India 2026: AI has moved out of the slide deck and into the codebase.

The conversations weren’t about whether to use AI. They were about how to engineer with it properly.

Two sessions stood out here in particular.

Building AI-Powered Migration Engines with MCP

The Model Context Protocol (MCP) is enabling a genuinely new class of developer tools. Sessions at SUGCON showed teams using MCP to build migration engines that dramatically cut the time and risk of moving content and configurations across Sitecore environments.

What used to be weeks of careful manual work is being transformed into guided, AI-assisted workflows. For anyone who has managed a large content migration on a Sitecore project — you’ll understand just how significant that is.

Building Hallucination-Safe AI Assistants

This was one of the most practically useful sessions of the conference.

Building AI assistants on top of a DXP is only valuable if those assistants can be trusted. Speakers walked through architectural patterns for:

  • Grounding AI responses in verified, approved content sources
  • Implementing guardrails that prevent out-of-scope or incorrect responses
  • Designing systems that fail gracefully — rather than confidently generating wrong answers
⚠️ Key insight from this session: The shift isn’t just about adding AI to your implementation. It’s about treating AI as an engineering discipline with proper reliability, testing, and governance built in from day one.

🔷 XM Cloud and Headless: Maturing Faster Than You Might Think

For developers in the headless space, the XM Cloud and Next.js sessions offered some of the most immediately actionable content of the two days.

The state of headless Sitecore in mid-2026 is genuinely more mature than it was even 12 months ago. Sessions covered:

  • Next.js performance optimization for Sitecore-powered sites — tackling real-world bottlenecks around rendering strategies, edge caching, and ISR/SSR tradeoffs
  • Composable DXP architecture patterns that are proving out at scale in production environments
  • Developer experience improvements in XM Cloud — local development tooling, component scaffolding, and how teams are structuring their headless codebases for maintainability

The clearest signal from these sessions: headless isn’t the “advanced” or “optional” approach anymore. It’s becoming the default, and the ecosystem tooling around it is catching up fast.

✅ Tip: If you’re still on a traditional Sitecore rendering model and haven’t started exploring a composable path yet, now is the time to start. The XM Cloud ecosystem is ready.

🔷 The Community: Still What Makes SUGCON Special

I’d be doing a disservice to the conference if I only talked about the technology.

What makes SUGCON India genuinely different from any other enterprise tech event is the people — and the culture of openness they’ve built together. Sitecore MVPs, architects, developers, and product leaders all in the same space, sharing knowledge freely, asking hard questions, and genuinely helping each other figure things out.

This edition had a particularly meaningful moment: a heartfelt farewell to Tamas Varga, whose energy and vision have shaped the SUGCON community for years. And a warm welcome to Sebastian Winter, stepping into his new leadership role — wishing him the very best as he continues building on that momentum.

A huge shoutout to the organizing committee who made this all happen in Delhi:

Sakshi Khurana, Sean Broderick, Rob Earlam, Hardeep Bhamra, Vikas Kumar, Yamini Punyavathi Muttevi, Raman Gupta — and every volunteer and sponsor who contributed behind the scenes.

And to the sponsors — Horizontal Digital, Altudo, Arroact Technologies, BIZTECHNOSYS, Codehouse, EPAM Systems, and Techxot — thank you for supporting the community.

🔷 My Personal Takeaways — What I’m Doing Differently Now

Here’s what I’m taking back to the desk and actually acting on:

On vNext and platform modernization: Start getting familiar with the Strangler Fig approach now — don’t wait for a migration to be forced. Understanding the pattern early means you can start shaping your current implementation to support it.

On AI: Move past experimentation. If you’re building anything with AI in the Sitecore space, invest in understanding MCP and hallucination-safe design patterns. The maturity bar for production AI implementations is rising quickly.

On headless and XM Cloud: If you haven’t started the composable journey yet, the ecosystem is ready for you. The tooling, patterns, and community knowledge are all there now.

On community: Show up. Whether at SUGCON, local Sitecore user groups, or online forums — the knowledge shared in this community is one of the most underrated resources in the Sitecore ecosystem, and it only works because people contribute to it.

Wrapping Up

SUGCON India 2026 was a reminder that the Sitecore ecosystem isn’t standing still. vNext signals a platform team that has listened carefully to years of community feedback and is building for the next decade — not defending the last one.

The combination of modern .NET foundations, AI woven thoughtfully into the platform, and a maturing headless ecosystem makes the next 12–18 months a genuinely exciting time to be working in this space.

I hope this recap was useful — whether you attended and want to consolidate your notes, or you couldn’t make it and wanted a proper rundown of what happened.

Stay tuned for more Sitecore articles, tips, and deep-dives right here on the blog.

Till then, Happy Sitecoring! 😊

Did you attend SUGCON India 2026? What was your biggest takeaway? Drop it in the comments below — I’d love to hear from you!


AI Personalization and Governance in SitecoreAI — What We Got Wrong First, and How We Fixed It

Hello Sitecorian Community,

If you have set up personalization on a SitecoreAI project, you’ve probably come across a situation like this a few months after go-live:

“Our personalization is configured. Decision models are deployed. But the analytics show variants are serving to only 4–5% of sessions. Everything else is hitting the fallback experience.”

And separately, when AI-generated content first goes into a governance review:

“If the AI produces something incorrect or off-brand — who is responsible for catching it, and what is the process for fixing it?”

Both of these come up on almost every enterprise SitecoreAI project. They look like different problems, but they have the same root cause: teams move to implementation before fully understanding how the underlying system works.

In this post I want to cover what we got wrong with personalization first, how we fixed it, and then walk through the governance setup that addresses the second question properly.

The Real Problem With Personalization Underperforming

The first thing worth clarifying — because there is a lot of confusion about this:

Sitecore Personalize decision models are primarily rules-based, not machine learning models that train automatically from your visitor traffic.

They are built on the DMN (Decision Model and Notation) standard. You define conditions, decision tables, and business logic on a visual canvas. Decision models should run in under 200ms — going beyond that risks impacting the visitor experience. This is a hard limit to design to, not a guideline. (Source: Fishtank practitioner implementation guide, confirmed by community implementations.)

Machine learning is available through optional Analytical Model components, but these connect to external propensity or forecast models that you supply via REST API. Sitecore does not auto-train models from your site’s visitor data. You bring the model; Sitecore Personalize calls it.

This matters because the most common mistake we see is teams building complex decision models and then assuming they need more traffic data before they work. In most cases, that is not the problem at all.

Why Variants Were Serving to Only 5% of Sessions

In our experience, low variant serving rates almost always trace back to one of three specific things:

  • Conditions are too narrow. The decision rules don’t match enough real visitor profiles to fire. Teams write conditions based on ideal visitor segments, not how real visitors actually arrive on the site.
  • Guest profiles are missing session event data. The conditions reference behavioral data — page views, interactions, past purchases — but that data was never captured because the Cloud SDK was not set up correctly from day one.
  • The Cloud SDK initialised too late. Behavioral events from the visitor’s first interactions never reached CDP, so there was nothing for the decision model to work with.

⚠️ The step most teams skip: Sitecore’s own best practices documentation recommends running a decision discovery workshop before building anything — bringing together analysts, architects, marketers, and data leads to define the expected outcome, the required input data, and the decision logic. Most low personalization rates we have seen trace back directly to skipping this step and jumping straight to the canvas.

The Two Personalization Layers — Which One to Use When

There are two separate personalization mechanisms in SitecoreAI and it is important to be clear about what each one is for:

XM Cloud Built-inSitecore PersonalizeRule-based: geo, authentication state, device typeDMN decision models, optional external ML Analytical ModelsAvailable from day one — no additional product neededRequires Cloud SDK initialised correctly + CDP event data flowingWorks well for: simple launch-day conditionsWorks well for: complex behavioral targeting, multi-source decisioningNo discovery workshop required for basic setupDiscovery workshop recommended before building any decision model

The sequence that has worked well for us on multiple projects:

  1. Run the decision discovery workshop with the full team — define the outcome, inputs, and decision logic before opening Sitecore Personalize
  2. Launch with XM Cloud built-in rules for the simple conditions at go-live
  3. Validate the Cloud SDK is initialised correctly and events are actually landing in CDP
  4. Build Personalize decision models once you have confirmed the event data is clean, complete, and matching what your conditions expect

The Cloud SDK Initialisation Problem

This is the most common root cause we find when personalization is underperforming — and it is an invisible problem until you know to look for it.

If the Cloud SDK initialises after user interactions have already fired — which happens easily in React applications when component mount order is not carefully managed — the visitor’s earliest behavioral events never reach CDP. Those early events are often the highest-intent signals you have. Losing them means decision conditions based on page view counts, product category interests, or funnel stage simply never trigger.

The fix is straightforward. Initialise in the application root, before any component that fires events:

// ✅ Correct — in _app.tsx or the root layout
// Must run before any child component mounts
import { init } from '@sitecore/engage'
useEffect(() => {
init({
clientKey: process.env.NEXT_PUBLIC_CDP_CLIENT_KEY,
targetURL: process.env.NEXT_PUBLIC_CDP_TARGET_URL,
pointOfSale: process.env.NEXT_PUBLIC_CDP_POINT_OF_SALE,
cookieDomain: window.location.hostname,
cookieExpiryDays: 365,
})
}, []) // Empty dependency array - runs once on mount

✅ Tip: Add a test that confirms the SDK initialises before the first behavioral event fires. We added this to our integration test suite after finding the problem on a live project. It has caught the issue twice since then in earlier environments before it reached production.

How We Approach Experiment Design

Personalization without measurement is decoration. Before any personalized variant goes live, we agree on these things in writing — not after the experiment has already been running for two weeks:

  • A single clear hypothesis — for example, “showing industry-specific case studies to financial services visitors on the solutions page will increase demo request form submissions”
  • One primary conversion metric tied to a real business outcome, not a proxy metric like time on page or scroll depth
  • A minimum runtime before anyone looks at results — stopping an experiment after a few days because the early numbers look good gives you noise, not signal
  • A statistical significance threshold agreed before launch — 95% is the standard; 90% is acceptable for lower-stakes tests where speed matters more

One more thing: do not run multiple experiments on the same page at the same time. When two experiments are running simultaneously, you cannot isolate which one caused any change in conversion. We learned this the hard way on a project where three experiments were live at once and the results were completely uninterpretable.

Why This Helped Our Team — Personalization

Before we understood these patterns:

  • Variants served to 4–5% of sessions — default fallback almost everywhere
  • CDP guest profiles had incomplete behavioral event data because SDK was initialising too late
  • Decision models built without a discovery workshop were matching conditions almost nobody actually met
  • Experiments ran without agreed hypotheses — results were disputed and inconclusive

After:

  • Decision discovery workshop runs before any canvas work begins
  • SDK initialisation test is part of the standard integration test suite
  • Variant serving rates improved significantly once conditions matched real visitor profiles
  • Experiments have written hypotheses, success metrics, and minimum runtimes agreed before launch

Now — Governance for AI-Generated Content

In a governance review on a recent project, the client’s risk team asked this:

“If the AI generates content that is factually incorrect, or that violates our brand guidelines, or our regulatory requirements — who catches it, and what is the process for fixing it before it reaches the public site?”

The system was working well technically. But there was no governance model to point to. That is a different problem and it needs to be solved before AI-generated content goes near production — not after a stakeholder raises it in a review.

1. Human Review Is Structural — Not a Nice to Have

Sitecore’s own platform design is explicit about this: AI agents generate and automate, but human review sits before any content reaches production. In every Agentic Studio Flow we build, every path that leads to a publish action has a Spaces review step between it and the publish trigger.

This is not about distrust of the AI output. It is about having a clear, auditable answer to the question: “who approved this content before it went live?” That answer needs to be a named person with a timestamp — not “the agent did it.”

❌ Without Human Review Gate

  • AI generates → publishes directly
  • No audit trail for what shipped
  • No one to catch off-brand or incorrect output
  • Governance review fails on first question

✅ With Spaces Review Step

  • AI generates → goes to review board
  • Author approves, edits, or rejects
  • Approval record with name + timestamp
  • Governance review has a real answer

2. Brand Guardrails Need Testing — Not Just Configuration

Sitecore Stream grounds AI generation in your brand guidelines document. This reduces off-brand output. But “reduces” is not the same as “prevents” — and in a regulated industry, that distinction matters.

What we do in practice:

  • Define “on-brand” in explicit, testable terms — specific phrases to avoid, required tone characteristics, prohibited content categories — not just “upload the PDF”
  • Build a validation test set of 20–30 prompts with known expected outputs, and known boundary cases that should produce a compliant refusal or flagged output
  • Re-run this validation set after any brand guidelines update, and after any platform update that touches the Stream layer
  • Log every AI generation with prompt, model version, and timestamp — this is the audit trail for compliance questions

⚠️ Common mistake: Teams upload the brand guidelines PDF once at setup and assume the guardrails are working. Brand guidelines change. Platform updates happen. Without a validation test set that runs regularly, you do not actually know what the guardrails are doing.

3. AI Configuration Should Be Environment-Specific

Dev, staging, and production should not use the same AI model, the same brand guidelines document version, or the same moderation settings. We treat all AI configuration the same way we treat database connection strings — stored as environment-specific variables, version-controlled, never hardcoded.

Config ItemDevStagingProductionAI modelLighter capacity — lower cost for iterationProduction parityFull capacityBrand guidelines docWorking draftClient-approved draftFinal approved versionModeration thresholdLenient — faster feedback loopMediumStrictHuman review gateOptionalRequiredRequired

4. CI/CD Pipeline — What Changes With SitecoreAI

The existing XM Cloud deployment pipeline carries over — Deploy App, Sitecore CLI, GitHub Actions all work the same way. What is new is that the pipeline may now need to handle agent and flow deployments from Agentic Studio and app deployments from App Studio. The DevOps tooling for Studio is still maturing through 2026, so expect some manual steps while that catches up.

Here is the pipeline sequence we use on SitecoreAI projects:

1. Unit tests — JSS components (Jest / React Testing Library)
2. Sitecore CLI sync — content serialization validation
3. Integration tests — webhooks, Management API (all workflow states)
4. Brand guardrail validation suite ← automate this, do not skip it
5. Deploy to staging via Deploy App API
6. Smoke tests — page render, personalization variants, search results
7. Manual approval gate ← required before any production deployment
8. Deploy to production via Deploy App API

✅ Step 4 is the one most teams skip in early sprints and then regret later. Automating the brand guardrail validation as part of CI means you find problems before they reach staging, not after a client review.

5. Questions to Have Answers for in Regulated Industries

If you are building for financial services, healthcare, or public sector clients, prepare clear answers to these before any pre-sales conversation or delivery kick-off:

  • Data residency: SitecoreAI runs on Microsoft Azure. Sitecore Stream uses Azure OpenAI. Confirm which Azure regions are used for processing. Clients with strict data residency requirements will ask this in the first security review.
  • Retention: Define a log retention policy for AI generation records before go-live. These are audit records, and regulated industries often have minimum retention requirements that vary by sector.
  • Model transparency: Log the exact model version alongside every AI generation event. If a compliance issue surfaces six months after launch, you need to be able to show which model version produced that content on that date.
  • Bias and fairness: Healthcare and public sector clients will ask whether AI-driven personalization treats different audience segments equitably. Plan periodic audits of personalization variant distribution across demographic segments into your operational monitoring — not just as a one-time launch check.

Why This Helped Our Team — Governance

Before we had a governance model in place:

  • No audit trail for AI-generated content that had shipped to production
  • Brand guardrails assumed to be working — no regular validation running
  • AI configuration differences between environments were undocumented and inconsistent
  • Data residency and retention questions in client reviews had no ready answers

After:

  • Every piece of AI-generated content that reached production has an approval record — named reviewer, timestamp, and any edits made
  • Brand guardrail validation runs as part of CI — problems are caught before staging, not in client reviews
  • AI configuration is version-controlled alongside the rest of the codebase, with clear environment-specific settings
  • Data residency, retention, and model transparency answers are prepared as standard artefacts in the project discovery phase

Final Thoughts

Personalization and governance are two areas where teams consistently invest less time upfront than they should — and then spend significantly more time fixing things after go-live than they would have spent getting the foundations right at the start.

For personalization: run the decision discovery workshop. Validate the Cloud SDK before any experiment goes live. Match conditions to real visitor profiles, not idealised ones.

For governance: set up the human review gate before the first AI agent touches production. Treat brand guardrails like tests — they need to run regularly, not just once at setup. And have the regulated industry questions answered before a client asks them in a review meeting, not during one.

That wraps up the Sitecore AI series. I hope these three posts have been useful — whether you are planning a new SitecoreAI project, mid-way through an XM Cloud migration, or trying to figure out why your personalization is not firing the way you expected.

Stay tuned for more Sitecore-related articles, tips, and tricks to enhance your Sitecore experience.

Till then, happy Sitecoring! 😊

Please leave your comments or share this article if it’s useful for you!

Monday, April 20, 2026

SitecoreAI and Sitecore Studio — What Actually Changed and What We Can Build Now

 Hello Sitecorian Community,

If you’ve been working on Sitecore projects over the last few years, you’ve probably seen this situation at some point:

“We have XM Cloud for content, CDP for customer data, Personalize for targeting, and Content Hub for assets — but our team spends half the day switching between four different portals.”

And honestly, that was the reality for most enterprise Sitecore projects. Different logins. Different APIs. Different billing conversations. Developers writing integration glue between products that were supposed to talk to each other.

At Sitecore Symposium 2025 in Orlando, Sitecore announced SitecoreAI — and on November 10, 2025, every XM Cloud tenant was automatically upgraded. No migration. No new contract required.

Let me walk through what actually changed, and what it means for teams building on Sitecore right now.

What Is SitecoreAI, Really?

The simplest way to say it:

SitecoreAI is XM Cloud + CDP + Personalize + Search + Content Hub — all unified into one platform, one login, one data model, with AI built into every layer.

Sitecore calls this shift going from “composable” to “composed.” The flexibility is still there underneath. But the friction between products is significantly reduced on top.

Before vs. After

❌ Before (XM Cloud era)

  • 4 separate portals, 4 logins
  • Token-based AI billing surprises
  • Separate contracts for each product
  • Sitecore Stream was a separate add-on
  • “You can’t customise SaaS”

✅ After (SitecoreAI)

  • One unified workspace, one login
  • No token billing — one metric per module*
  • Buy one module, access the full suite
  • Brand-aware AI copilot baked in
  • Sitecore Studio — governed extensibility

* Sitecore COO Dave Tilbury on stage at Symposium: “no addons, no upsells, no tokens, no games.” Pricing shifts to one metric per module — e.g. requests for CMS, profiles for CDP. Source: Sitecore Developer Portal FAQ.

What Stays the Same for Developers

This is probably the most important thing for teams who are mid-project:

  • Your JSS setup is unchanged
  • Your Sitecore CLI and serialization workflows carry over
  • The Deploy App pipeline works exactly the same
  • All existing SDK integrations continue without breaking changes

The platform adds new capabilities on top. It doesn’t remove what was already working.

⚠️ One thing to watch: Content Hub integration into SitecoreAI is being phased through 2026. If your project depends heavily on Content Hub DAM workflows, check the Sitecore changelog regularly and build with loose coupling where Content Hub is involved.

Sitecore Studio — The Part That Changes Daily Workflows

If SitecoreAI is the platform, Sitecore Studio is where we actually build and extend things. It has four parts:

  • Agentic Studio — build and run AI agents and multi-step flows
  • App Studio — build and package custom extensions and apps
  • Sitecore Connect — pre-built connectors (Salesforce, OpenAI, Gemini, etc.)
  • Marketplace — discover and publish community-built agents and apps

Agentic Studio — Four Concepts You Need to Know First

Everything in Agentic Studio is built around four things. Understanding these before you start building will save a lot of confusion:

A Real Use Case: Bulk SEO Metadata Generation

Here is a situation we came across recently. A client had 600 product pages that needed SEO titles, descriptions, and keywords updated before a Monday go-live. Previously, this would mean a custom PowerShell pipeline and a lot of manual effort.

With Agentic Studio, here is how the flow looks:

Step 1 — Create the Agent

In Agentic Studio, create a new agent with one clear purpose: “Generate SEO metadata for a given page item.” Keep the scope narrow. One agent = one job. This gives you consistent, predictable output.

Step 2 — Add Brand Context

Upload the client’s brand guidelines document as RAG context for the agent. Sitecore Stream uses this to ground the AI generation. The output then sounds like the client’s actual brand voice — not generic AI copy.

Step 3 — Add a Human Review Step

Connect the agent to a Spaces review step before any publish action. This is not optional in enterprise setups. When a stakeholder asks “who approved that AI-written content?” — you need to point to an actual approval record.

Bulk content trigger (query content tree)

[Agent: Generate SEO Metadata]

[Spaces: Author Review Board]
↓ (on approval)
[Publish to Experience Edge]

Step 4 — Run It Overnight

Attach a bulk trigger to the flow with a content tree query. 600 pages queue through the agent overnight. Monday morning, the review board has everything waiting. Authors approve or edit, then publish. The weekend is saved.

App Studio — For Developers Specifically

While Agentic Studio is for building flows, App Studio is where developers build the underlying extensions — custom connectors, UI plugins, packaged apps that extend the platform.

Think of it as the modern replacement for custom pipelines and processor chains, but built as versioned, deployable, shareable apps. If you have a Helix background, the pattern feels familiar — bounded modules, clear interfaces, single responsibility. The deployment model is SaaS-native instead of server-side, but the discipline translates directly.

Before You Demo — Set Up Permissions First

One thing we learned early: configure role-based permissions in Sitecore Studio before showing it to a client. Studio uses the same permission model as the rest of SitecoreAI. You can control who creates agents, who deploys flows, who can modify a live workflow.

The question “can someone accidentally publish AI content to production?” will always come up. Having the answer ready — and demonstrating the controls — builds a lot of confidence.

Why This Matters for Our Teams

Before SitecoreAI:

  • Bulk content operations needed custom PowerShell scripts
  • AI generation required external tooling and custom pipelines
  • No governed way to build reusable AI workflows inside the platform

After SitecoreAI:

  • Agents handle bulk operations with a structured flow
  • Brand-aware generation is built into the authoring environment
  • App Studio gives developers a governed way to build and ship extensions

Final Thoughts

SitecoreAI is not just a name change. It is a genuine platform shift that changes how teams work day to day — from how content is created, to how integrations are built, to how AI automation fits into existing workflows.

The good news for teams mid-project: your existing toolchain is unchanged. You can start exploring Studio incrementally without disrupting what is already in flight.

If you are starting a new project, I would recommend spending a sprint early just exploring Agentic Studio. Build one simple agent, run it through a flow with a review step, and see where it fits in your client’s content operations. That early spike will shape how you scope the rest of the project.

Stay tuned for more Sitecore-related articles, tips, and tricks to enhance your Sitecore experience.

Till then, happy Sitecoring! 😊

Please leave your comments or share this article if it’s useful for you!

Monday, March 16, 2026

Debugging Sitecore Publishing Issues at Scale: A Simple PowerShell Tool That Saved Our Team Hours

Hello Sitecorian Community,

If you’ve worked with Sitecore in a large multi-site environment, you’ve probably faced this situation.

Someone reports:

“The content is updated in CMS but not visible on the website.”

And the investigation begins.

You start checking:

  • Is the item published?
  • Does it exist in the web database?
  • Is the revision updated?
  • Did the child items publish?
  • Is it a language version issue?

Now imagine doing this when you manage 300+ websites and hundreds of items move across environments every day.

That’s the reality our team deals with.

The Real Problem

Publishing issues in Sitecore are rarely obvious.

Sometimes:

  • The item exists in master but not in web
  • The item exists in both but revision IDs don’t match
  • The updated date differs
  • Only the parent item published, but children didn’t
  • Deployment pipelines move items but something silently fails

When troubleshooting these issues manually, developers often:

  1. Open master database
  2. Inspect the item
  3. Switch to web database
  4. Check again
  5. Compare Revision IDs
  6. Repeat for multiple items or entire trees

Doing this repeatedly across dozens (or hundreds) of items quickly becomes slow, frustrating, and error-prone.

Our Daily Reality

Our platform supports 300+ websites, and content changes constantly move between databases and environments.

During deployments or publishing validations, the most common question is:

Did the content actually publish correctly?

Finding that answer quickly is critical for developers, QA teams, and support engineers.

The Tool We Built

To simplify this process, we built a Sitecore PowerShell Extensions (SPE) script that compares items between two databases.

We call it:

Sitecore Publishing Validation Tool

GitHub Repository (script available here):
https://github.com/gaurarun777/SitecorePowerShell/blob/main/2026/sitecore-publishing-validation-tool.ps1

This script allows developers to:

  • Provide specific item paths
  • Provide root paths for recursive validation
  • Compare two databases (for example master vs web)
  • Validate Revision ID
  • Validate Updated Date
  • Detect missing or mismatched items

Instead of manually switching between databases, the script produces a comparison grid instantly.

The PowerShell Script

Below is the core idea behind the script used in our Sitecore environment.

# Simplified comparison logic
$sourceItem = Get-Item "${sourceDatabase}:$path" -Language $language
$targetItem = Get-Item "${targetDatabase}:$path" -Language $language
$sourceRevision = $sourceItem["__Revision"]
$targetRevision = $targetItem["__Revision"]
$sourceUpdated = $sourceItem["__Updated"]
$targetUpdated = $targetItem["__Updated"]
if ($sourceRevision -ne $targetRevision) {
$status = "Revision Mismatch"
}
elseif ($sourceUpdated -ne $targetUpdated) {
$status = "Updated Date Mismatch"
}
else {
$status = "Match"
}

The script loops through item paths and recursively scans content trees to validate publishing results between databases.

Developers can then quickly identify:

  • Items that failed to publish
  • Items with outdated revisions
  • Missing items in the target database
  • Partial publishing issues within item trees

What the Output Looks Like

The script generates a comparison grid showing:

  • Item Path
  • Exists in Source DB
  • Exists in Target DB
  • Source Revision ID
  • Target Revision ID
  • Updated Dates
  • Comparison Status

Example statuses:

  • Match
  • Revision Mismatch
  • Updated Date Mismatch
  • Missing in Target
  • Missing in Source

This makes it extremely easy to spot publishing issues.

Why This Helped Our Team

Before using this tool:

  • Troubleshooting publishing issues could take 30–60 minutes
  • Developers had to manually inspect each item
  • Recursive tree validation was tedious

Now:

  1. Paste item paths
  2. Select databases
  3. Run the script

Within seconds we can see exactly where publishing failed.

Why Sitecore PowerShell Extensions Is So Powerful

One thing I really appreciate about Sitecore PowerShell Extensions is how quickly developers can build practical operational tools.

With a few lines of PowerShell, you can automate tasks that would otherwise take significant manual effort.

SPE is extremely useful for:

  • Content validation
  • Publishing verification
  • Bulk content operations
  • Content audits
  • Operational automation

Final Thoughts

When working with large Sitecore implementations, operational tooling becomes just as important as development.

Sometimes the biggest productivity improvements come from small internal tools that solve daily problems.

This publishing validation script became one of those tools for our team.

If you manage a large Sitecore environment, I highly recommend building small utilities with Sitecore PowerShell Extensions to simplify repetitive tasks.

They might save your team more time than you expect.

Reference Screesnhots:


If you’re interested in trying the script, you can find it here:

GitHub:
https://github.com/gaurarun777/SitecorePowerShell/blob/main/2026/sitecore-publishing-validation-tool.ps1

Would love to hear what internal tools or automation scripts your Sitecore teams are using to improve daily operations.

Stay tuned for more Sitecore-related articles, tips, and tricks to enhance your Sitecore experience.

Till then, happy Sitecoring! 😊

Please leave your comments or share this article if it’s useful for you!

Tuesday, March 10, 2026

Auditing Sitemap Cache Configuration Across 300+ SXA Sites in Sitecore 10.4

Hello Sitecorian Community,

In large SXA implementations, operational issues rarely affect just one site. In our case, we were working on a Sitecore 10.4 SXA solution with 300+ websites, and we encountered a performance concern:

The sitemap refresh job was executing more frequently than expected.

To properly investigate the issue, we first needed visibility.

Specifically, we needed to answer:

  • How many sites actually have a Sitemap item?
  • What values are configured for:
  • Refresh Threshold
  • Cache Type
  • Cache Expiration
  • Are there inconsistencies across tenants and sites?

Manually checking 300+ sites was not realistic. Automation was the only viable approach.

Understanding the SXA Structure

In SXA, the typical structure looks like this:

/sitecore/content/{Tenant}/{Tenant}/{Site}/Settings/Sitemap

The configuration fields we were interested in are stored directly on the Sitemap item under the Settings node.

The required fields:

  • Refresh Threshold
  • Cache Type
  • Cache Expiration

Our goal was to extract:

  • Sitemap item path
  • Configured values of the three fields
  • Total count of sitemap items found

Approach: Automating with Sitecore PowerShell Extensions (SPE)

Instead of writing everything from scratch, I reused an existing PowerShell script that I had previously written for deleting Flashes items in an older SXA setup.

Given that we now have powerful AI-assisted tools available, I provided the reference script to ChatGPT and adapted it to:

  • Traverse all Settings nodes
  • Locate Sitemap items
  • Extract required field values
  • Display results in a Show-ListView

This significantly reduced the time required to build a reliable audit script.

Final Working Script

# -----------------------------------------
# SXA: Read Sitemap cache settings per site
# Path pattern: .../Settings/Sitemap
# -----------------------------------------

# Fields on the Sitemap item
$fieldRefreshThreshold = "Refresh Threshold"
$fieldCacheType = "Cache Type"
$fieldCacheExpiration = "Cache Expiration"

$results = @()

# Find all "Settings" items under /sitecore/content (fast query by name)
$settingsItems = Get-Item -Path master: -Query "fast:/sitecore/content//*[@@name='Settings']"

foreach ($settings in $settingsItems) {

# Get child Sitemap item under Settings
$sitemapPath = "$($settings.Paths.FullPath)/Sitemap"
$sitemapItem = Get-Item -Path ("master:" + $sitemapPath) -ErrorAction SilentlyContinue

if ($null -ne $sitemapItem) {
$results += [pscustomobject]@{
SitemapItemName = $sitemapItem.Name
SitemapTemplate = $sitemapItem.TemplateName
SitemapPath = $sitemapItem.Paths.FullPath
"Refresh Threshold" = $sitemapItem[$fieldRefreshThreshold]
"Cache Type" = $sitemapItem[$fieldCacheType]
"Cache Expiration" = $sitemapItem[$fieldCacheExpiration]
}
}
}

# Show in list view
$results | Show-ListView `
-Title "SXA Sitemap Settings (Refresh Threshold / Cache Type / Cache Expiration)" `

-Property SitemapItemName, SitemapTemplate, SitemapPath, "Refresh Threshold", "Cache Type", "Cache Expiration"

Write-Host ""
Write-Host "Total Sitemap items found under Settings: $($results.Count)" -ForegroundColor Green

OutPut:

Why This Matters in Large SXA Implementations

In enterprise setups with hundreds of sites:

  • Configuration drift is common
  • Some sites may override defaults
  • Cache misconfiguration can lead to:
  • Excessive job executions
  • Increased publishing pressure
  • Performance degradation

Before fixing the problem, you need visibility.

Automation through SPE enables:

  • Rapid environment auditing
  • Cross-tenant configuration comparison
  • Reliable investigation at scale

Key Takeaways

  • In large multi-tenant SXA environments, manual verification does not scale.
  • Structural traversal (Settings/Sitemap) is a predictable way to audit configuration.
  • SPE is extremely powerful for operational investigations.
  • AI-assisted scripting can accelerate development when you already understand the architecture.

Conclusion

Investigating performance issues in a 300+ site SXA environment requires structured visibility and automation.

A small PowerShell audit script can save hours of manual effort and provide precise insights needed to diagnose job behavior in environments like jobs.aspx.

If you’re managing a multi-tenant SXA solution, consider building a small internal audit toolkit using SPE — it pays off quickly.

Stay tuned for more Sitecore-related articles, tips, and tricks to enhance your Sitecore experience.

Till then, happy Sitecoring! 😊

Please leave your comments or share this article if it’s useful for you!