Pages

14 March, 2024

Vercel Edge Config for Sitecore Projects

Vercel has a key-value storage option, Edge Config, for ultra-fast read to handle quick logic at the edge. 

As of now, Vercel has 4 different storage options. 

ProductKVPostgresBlobEdge Config
DetailsDurable RedisServerless SQLLarge file storageGlobal, low-latency data store
Reads/WritesFast/msFast/msFast/msUltra-fast (~5ms - ~15ms) /s
Use CaseKey/value and JSON dataStructured, relational dataLarge, content-addressable files ("blobs")Runtime configuration (e.g., feature flags)

Advantages

  • Incredibly fast to read. Lookups return in 5 ms or less, and 99% of reads will return under 15 ms.
  • Do not need to perform a deployment.
  • Global, available in all regions

Use Cases

  • Feature flags and A/B testing
  • Enabling maintenance pages or critical redirects
  • Malicious IP and User Agent blocking

Details

  • Should not be used as a general-purpose key/value store. Use KV instead. 
  • Cost is mostly depends on the reads as the primary use case of Edge Config is reading data at the edge. Number of writes also matters in overall pricing. 
  • Important to note that the maximum store size of all the key value data is 64KB. So it is limited to only critical data which needs to be in edge for quicker read. 
  • Takes 10 seconds to propagate the changes in key-value data to global regions. 
  • There are costs and limits to the number of reads and writes per plan so I would recommend using it when there is a feature release, soft launching a feature to a limited group or similar tasks. Once done, it should be removed to avoid any charges. 

Edge Config SDK and API

  • Edge Config connection string should be added in the environment variable with key EDGE_CONFIG. By default, SDK reads the connecting string from the environment variable. 
  • An SDK to read data from Edge Config API is available. @vercel/edge-config. Install the npm package using 
    • get - Reading a value
    • has - Checking if a key exists
    • getAll - Reading all items or in batches

Use Case 1: Redirect

In case if you have a feature update on certain section of a site and you would like to enable maintenance page and need a way to quickly remove it without any deployment, you can add the flag in the Edge config and use it to rewrite the section of the site to maintenance page using middleware. 

Refer this demo page: Use case 1. https://nextjs-edgeconfig.vercel.app/


Use Case 2: Feature Flags

In case if a feature should be enabled or disabled with a feature flag, Edge Config can help in changing the response. This should eventually removed once the feature has been permanently enabled to avoid Edge Config read hits. 

Similarly there are many uses cases where the edge data can be used. Another reminder that this edge config is not for regular key-value data as there are restrictions to the size and the number of read/write hits. 



15 February, 2024

Sitecore XM Cloud CLI New Feature - Organization command

Sitecore updated the CLI with additional cloud command. 'organization'. This fits in along with other commands like login, logout, project, environment and deployment


Organization command has three sub commands which helps you to retrieve the organization information, health of the particular organization at that time and retrieve license file. 

In order to quickly update cloud plugin, you can just remove and add it by executing the following in terminal. 


cloud organization info

This sub command helps you to retrieve the currently logged in Organization details. 


cloud organization health

This sub command helps you to display the status of the organization. You can view the health in Sitecore Deploy Portal --> System Health.


cloud organization license

This sub command helps you to download the organization's license. This can be used for your local development. 

07 November, 2023

Sitecore Scheduled Publish Module Enhancements

Sitecore Scheduled Publish Module gives the content author the option to delay the publishing of an item for a future point in time. This module has been updated to Sitecore 10.3 recently. Also, I did update this module with few additional features for better usage. 

  • Set Scheduled Publish Requestor as Publisher

    A content author schedules a publish request. When the scheduler job executes the request at the appropriate time, it publishes the content as the requestor user. This allows Ops teams to track who initiated the request. If you want to track what items are published, you can override the publish:itemProcessed event to log the details.

    With this change, the actual publish request will be executed in the requestor user context. 



  • Alert content authors if the item is not in final workflow state

    The final workflow state is an important part of Sitecore's workflow system. It helps ensure that content items are published in a controlled manner and are not accidentally changed after they are published.

    If an item scheduled for publishing is not in the final workflow state, the publish job will not publish the item or will publish the last approved item version. To remind the content authors, a warning has been added to the dialog that shows whether the item is in the final state. If the item does not have a workflow, this section is hidden. 






  • Set the current time + 2 minutes as default for publish time

    Choosing the date and time when scheduling a publish was an extra step for content authors. With this change, the current date and time plus 2 minutes will be set as the default publish time in the publish time field.


  • Updated to latest Sitecore CLI and Serialization plugin

    Updated to use the latest version of Sitecore CLI (5.2.113 as of 11/07) with Serialization plugin. 

The Sitecore packages (.zip) are yet to be updated in the repository. Please take the latest codebase for the enhancements.  

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. 

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