Select Page

In this blog post, we will showcase how to use ChatGPT to provide businesses with a competitive advantage and enhance customer experiences. Firstly, we will explore the potential of implicit or behavioral personalization in real-time, seamlessly integrated with Sitecore Personalize without requiring a Sitecore Customer Data Platform(CDP). Secondly, we will examine a more comprehensive approach that combines behavioral and declarative personalization, where AI model outcomes are applied asynchronously and synchronized with Sitecore CDP through APIs, offering a robust and harmonized solution for personalization.

Sitecore Personalize

Sitecore Personalize is a DXP Packaged Business Capability that leverages behavioral data, including browsing history, click patterns, and session data, to drive the delivery of meaningful content. The integration of ChatGPT with Sitecore Personalize can be easily achieved through a simple three-step process: Connect, Integrate, and Present.

Connect: To begin, we need to procure an AI model that supports API connectivity over HTTP. One recommended option is the recently launched Azure OpenAI service, which offers access to a number of large-scale generative AI models, the ability to tune them, and enterprise-grade security.

Next, we proceed with the development of a “Decision Model” and integrate a programmable component that encompasses the business logic for selecting visitors/sessions. In my PoC, I leveraged my website’s sitemap along with the page visit data captured by Sitecore Personalize to identify the most pertinent article that users would potentially consider as their optimal “next-best” choice. A crucial aspect of creating a Decision Model is utilizing prompt engineering to craft meaningful prompts for running against ChatGPT.

ChatGPT Prompt:
Website Sitemap: <SITEMAP>
I viewed pages: <LIST OF VIEWED PAGES>
Predict which page I might enjoy next; format as JSON;
var cdpSessions = guest.sessions;
var locale = "EN";
            for (var i = 0; i < cdpSessions.length ; i++) {
            var cdpSession = cdpSessions[i];
                        if (cdpSession.sessionType === 'WEB') {
                                    var events = cdpSession.events;
                                    for (var j = 0 ; j < events.length; j++) {
                                         var event = events[j];
                                                           if(event.type == 'VIEW'){

Finally, I used the prebuilt template to render output generated by the ChatGPT model. The provided templates can help deliver meaningful content without a need for coding,  but custom templates can be created using JavaScript, CSS, and HTML for unique edge-case scenarios.

Sitecore Personalize and CDP

By integrating Sitecore CDP with Personalize, we can enhance our personalization capabilities. This integration enables us to deliver personalized content to both anonymous and known users, tailoring the experience based on relevant user data. The personalization logic can be implemented in real-time for immediate responses (similarly to the above use case) or asynchronously for efficient processing and delivery of personalized experiences.

Adopting Modern Data engineering principles empowers organizations to establish a collaborative and decentralized data ecosystem, fostering seamless integration between Sitecore CDP/Personalize and diverse data sources. This approach not only strengthens the development of effective personalization routines to deliver highly relevant content but also allows organizations with offline CDP platforms to participate in omnichannel personalization, expanding their reach across multiple channels and simplifying integration with AI models.

When it comes to integrating Sitecore CDP into modern data enterprises and AI models, businesses have several options at their disposal. They can choose from solutions such as Sitecore Connect, a Workato product, or explore third-party tools from leading cloud vendors. These options provide flexibility and enable organizations to select the integration approach that best aligns with their specific needs and requirements.

Irrespective of the chosen integration platform, the process typically involves utilizing Sitecore Data Lake Export Service to export data into the Data Lake and utilizing the Sitecore Batch API to synchronize the data back into Sitecore CDP for Batch implementation, or event-driven design along with Sitecore CDP Rest API for real-time integrations.

It is also worth considering the recently announced Microsoft product, Microsoft Fabric. This platform offers several advantages for enterprises, including scalability, reliability, seamless integration with Microsoft and Sitecore platforms, comprehensive management capabilities, and support for hybrid cloud deployments. With its features and capabilities, Microsoft Fabric looks to be an excellent choice for businesses seeking a robust integration solution based on Single Data Lake concepts.

Key Considerations When Using ChatGPT with Sitecore CDP/Personalize

  • The input/output size for the Chat GPT API differs between GPT-3.5 and GPT-4, with GPT-3.5 supporting approximately 4,000 tokens and GPT-4 ranging from 8,000 to 32,000 tokens-units of text often as short as a single character or as long as a word. To stay within these limits, normalization routines may be necessary to adjust requests.
  • Constantly monitoring the consistency of ChatGPT responses. While the model aims to provide coherent and contextually appropriate replies, there can be instances where the generated output lacks consistency or displays unexpected behavior. To address this, continuous monitoring and configuration adjustments may be necessary.
  • When working with larger datasets, considering the cost and performance implications is important. Generating responses for lengthy inputs, in high-traffic scenarios or processing extensive amounts of data can impact both the performance and cost of utilizing the API. Optimization of resources becomes important in such scenarios.
  • The use of Chat GPT may raise legal and moral questions. It is essential to prioritize responsible and ethical usage, adhering to relevant legal frameworks, to ensure fair and proper utilization of AI models.


The integration of ChatGPT with Sitecore Personalize and CDP creates a powerful combination that maximizes the capabilities of AI-powered personalization. This integration allows businesses to elevate their customer experience by delivering highly customized and personalized interactions. ChatGPT’s ability to generate responses that resemble human conversation and adapt to user preferences enhances customer engagement and increases conversion rates. Embracing this AI-powered personalization gives businesses a competitive edge, enabling them to establish stronger connections with their customers.