Pages

18 October, 2023

XM Cloud Certification Exam Preparation

I am excited to announce that I have recently cleared the Sitecore XM Cloud Certification exam! This certification demonstrates my skills and knowledge in using Sitecore's cloud-native SaaS CMS to create and deliver engaging omnichannel experiences.


Few community members reached out to me to share the exam experience. So I have provided all the details in this blog post. 

The Sitecore XM Cloud Certification exam is somewhat challenging one, but it is well worth the effort. The exam covers a wide range of topics, including:

  • Competency 1: XM Cloud Architecture and Developer Workflow - 12% 
  • Competency 2: Deployment of XM Cloud Projects - 16%
  • Competency 3: Renderings and Layout - 14%
  • Competency 4: Sitecore Content Serialization - 14%
  • Competency 5: Sitecore APIs & Webhooks - 10%
  • Competency 6: XM Cloud Pages - 10%
  • Competency 7: Security for Developers - 10%
  • Competency 8: Data Modeling - 14%

Exam Details

  • Multiple-choice Questions
  • 100 minutes to complete the test
  • Closed book exam
  • 50 questions (more compared to other Sitecore certs :) )
  • Schedule it in Kryterion WebAssessor
  • Cost: $350
All the exam details are clearly explained in the Study Guide: Sitecore XM Cloud Developer Certification Exam in learning portal and there are 10 sample questions in the Study guide course. 
 

How to prepare for the Sitecore XM Cloud Certification exam

Here are a few tips to help you prepare for the exam:


Topics

The study guide course in learning portal has certain links on each competencies. It is highly recommended to read those articles. I have listed below some of the topics that I remember.
  • Headless SXA knowledge is important for the exam. Site Collection, Site, Modules, Page Variants, Creating component, Placeholder, Placeholder restrictions, Dynamic Placeholder.
  • Registering XM Cloud Components
  • Webhook
  • Features of XM Cloud Pages 
  • Experience Edge Publish Process
  • Using CLI for XM Environment Setup
  • Sitecore Content Serialization - Similar to XP certification. 
  • Understand the sample GraphQL queries
  • XM Cloud Environment and Source Control link
  • XM Cloud User roles and access

Exam Discount

  • MVPs get one free Sitecore exam voucher to use. 
  • (from Sitecore learning portal) Don't forget that Partners have Sitecore Special 20% promotion for all Sitecore certification exams. Promo code is CYBERCERT20



Good Luck and Happy Learning !!!

13 October, 2023

XM Cloud Component - Recursive Loop

In XM Cloud Components builder, we can add another component as an element in the canvas. 


Once you add the component element, you can choose what component to render in the right panel.


You can select other components from the list and also you can choose the same component as well. 


This will end up into infinite self-referential recursive loops and it is going to crash the application. 

Continuous calls to FEaaS Url to load component

Sitecore can do some check or warn before allowing content authors or developers to add same component.  

As of 11/08/2023 - Sitecore has fixed it by filtering out the current component from the available component list. 

10 October, 2023

XM Cloud Build Configuration & Post Deployment Actions

In the SaaS world, we have less control on what we can do and what to deploy. This is because SaaS applications are hosted and managed by the vendor, not by the customer. This means that the customer does not have the same level of access and control over the application as they would if it were deployed on-premises. Sitecore XM Cloud is similar, but the XM Cloud build configuration allows for a few additional capabilities.

The xmcloud.build.json file is an XM Cloud build configuration file that contains a set of configurations that allow customers to control what to build, what to deploy, and various options for post-deployment actions.

There are five configuration objects the build configuration right now.

  1. deployItems:

    Gets the list of serialization module names to be deployed, creates Items as Resources (IAR) file and deployed. No support for roles in this case so if there are any roles, you will need to use Post Deployment actions (scsModules).

  2. buildTargets:

    Enables you to define which project or solution to build. Otherwise, defaults to the solution file available in the root folder. 

  3. renderingHosts:

    To configure the location for the rendering hosts and sites they map to. More information about the rendering host configuration can be read here. 

  4. tranforms:

    To process XDT transformation of your configuration. Wildcard can be used for the path. 

  5. postActions:

    Various operations can be performed after the deployment stage in the XM Cloud deployment process. The available operations are explained below. 

Post Action Operations:

  1. CM Warm-up -  warmUpCm

    This option allows you to send GET requests to a set of URLs to start up and run your CM environment. You can also use this section to call a dedicated set of pages in your CM environment to perform any business-critical actions.

    In addition, you can create ASPX pages and trigger them to initiate any tasks. For example: 
    - triggering a task to pull content from 3rd party system. 
    - triggering a job to execute a Sitecore PowerShell script
    - triggering an email to content authors
    - ... and many more

    It would be really nice if we have a way to configure and trigger Sitecore Authoring and Management GraphQL API in post deployment actions. 

  2. Schema Population -  populateSchema

    Populate the managed schema for specific indexes by listing their names.

  3. Reindexing - reindex

    Reindex specific indexes by listing their names.

  4. Publishing - publish

    You can either publish a path and sub items with certain languages or specific items alone. You can specify whether it should be smart or republish. 

  5. SCS module deployment action - scsModules

    You can also use this section to push the content using Sitecore Content Serialization. Specify the modules names to be synched. In this section, you can push the roles as well. 

Currently, customers cannot create custom post-deployment actions in XM Cloud. They must use the out-of-the-box options available in the build configuration.

It would be really nice if we have a way to configure and trigger Sitecore Authoring and Management GraphQL API in post deployment actions. 

When you create a deployment request from the CLI, you can wait for post-deployment actions to complete and see the status or progress in CLI real time. By default, CLI will skip waiting for post-deployment actions. However, you cannot prevent these steps from execution if they are part of the XM Cloud build configuration.

07 October, 2023

XM Cloud Front-End Development Options

Sitecore XM Cloud has enabled front-end developers to quickly start developing applications. There are various ways for front-end developers to get started and connect to content endpoints to develop applications. From the recent conference, I learned that Sitecore is still working on enabling front-end developers as true first-class citizens.

In this blog post, I am providing various options for the front-end developers. 

  1. Using Local XM Cloud - a.k.a Full Stack XM Cloud Local Development


    In this case, the Sitecore XM Cloud local environment should be set up on the developer's machine and will be used to serve the content for the front-end app.

    Setting up the full-stack XM Cloud local development environment can be referenced here

    Be default, XM Cloud local development environment has the following environment key values. 

    API Key: Item ID of /sitecore/system/Settings/Services/API Keys/xmcloudpreview

    GraphQL Endpoint: https://xmcloudcm.localhost/sitecore/api/graph/edge (where xmcloudcm.localhost is the host name for the local CM environment)

    - In order to setup full-stack XM Cloud local development environment, developer needs a Windows machine to setup Sitecore. 
    - Developer has full control on the Sitecore content. They can play around with content as it is not going to impact any other users. 

  2. Using XM Cloud CM - a.k.a Edge Preview 


    In this case, Sitecore XM Cloud CM environment can serve the content for the front-end app. 

    API Key: Item ID of /sitecore/system/Settings/Services/API Keys/xmcloudpreview. You can also retrieve the Edge Preview API Key from the XM Cloud deploy app. Go to your XM Cloud project in Deploy app --> Details --> Edge Preview GraphQL IDE (CM) --> Generate Preview API Token

    GraphQL Endpoint: https://<Environment host name>/sitecore/api/graph/edge (where Environment host name can be retrieved from Deploy app --> Details --> Environment host name)

    JSS_APP_NAME: name of the front-end app mentioned in package.json.

    - Developer can setup/develop the front-end app using Mac or Windows.
    - Developer can work on published and unpublished content as CM has both the content. 

  3. Using Experience Edge


    In this case, Experience Edge can serve the content for the front-end app. 

    API Key: You can retrieve the Edge Delivery API Token from the XM Cloud deploy app. Go to your XM Cloud project in Deploy app --> Details --> Edge Delivery GraphQL IDE (Experience Edge) --> Generate Preview API Token

    GraphQL Endpoint: https://edge.sitecorecloud.io/api/graphql/v1

    JSS_APP_NAME: name of the front-end app mentioned in package.json.

    - Developer can setup/develop the front-end app using Mac or Windows.
    - Developer can work only on published content as edge delivery has only published content. 

06 October, 2023

XM Cloud - Troubleshooting the integration of Pages app with local XM Cloud Instance

As per Sitecore documentation, you can connect XM Cloud Pages app to your local XM cloud instance. 

How should you do it? 
  • Once you browse Pages app (pages.sitecorecloud.io), go to browser developer tools --> Application --> Storage --> Local Storage and open the entry for https://pages.sitecorecloud.io.
  • Add a new key and value. 
    • Key: Sitecore.Pages.LocalXmCloudUrl
    • Value: Your local XM Cloud CM instance. Ex: https://xmcloudcm.localhost/
  • Refresh the pages app and it should connect to your local XM cloud instance. 
I was facing some issues after setting it up. 
  1. login.sitecorecloud.io refused to connect or couldn't retrieve the page. 


    This happens when your local XM Cloud instance is not logged in. Make sure you login to use local XM Cloud instance in the same browser (another tab) and this error should go away. 

  2. Pages app does not render the content and components from local XM Cloud instance


    Looking at the console log, a possible certificate exception appeared.



    In the environment file, the public rendering host is www.xmcloudpreview.localhost. The Pages app is using https://xmcloudcm.localhost as the local XM Cloud URL, as we set it in the local storage key Sitecore.Pages.LocalXmCloudUrl. Then, the local XM Cloud instance calls the public rendering host and gets the content. However, the local XM Cloud instance does not have a valid certificate for the public rendering host www.xmcloudpreview.localhost.

    Once the certificate was created and placed in the \docker\traefik\certs folder and the config \docker\traefik\config\dynamic\certs_config.yaml was added, the rendering host public URL started working without any certificate errors and the pages app was also able to render the page for editing.

    Go to \docker\traefik\certs, run mkcert www.xmcloudpreview.localhost and it will create the cert and key. You can refer it in certs_config.yaml and restart the rendering container alone. 

    I am looking for other options or solutions which can fix this issue. If this is the only way, Sitecore can add it as part of their initial XM Cloud local instance setup itself. 





blockquote { margin: 0; } blockquote p { padding: 15px; background: #eee; border-radius: 5px; } blockquote p::before { content: '\201C'; } blockquote p::after { content: '\201D'; }