Showing posts with label tools. Show all posts
Showing posts with label tools. Show all posts

Friday, August 21, 2026

Sitecore Icon Search 2026: New UI, Favorites, Recent Icons + Browser Extension Updates

When I originally released Sitecore Icon Search back in 2018, the application was built around a searchable table containing thousands of Sitecore icons.

At the time, it solved the problem I was trying to fix: finding the right Sitecore icon without manually clicking through category after category in Sitecore's built-in icon selector.

Over the years, I've continued updating the app with new Sitecore icons, improved search data, JSS enum support, browser extensions, dark mode, and plenty of fixes along the way.

Last year, I gave the app a smaller visual refresh that cleaned up the styling, spacing, search bar, header, and finally added dark mode. It made the existing interface feel a lot better, but underneath it was still fundamentally the same table-based application I had originally built years earlier.

This time around, I wanted to go quite a bit further and rethink the core interface itself.

After eight years, I figured it was probably time. 😄


A Long Overdue UI Refresh

Sitecore Icon Search UI Refresh
Before
After

The most obvious change is that the table has finally been replaced.

Instead of displaying ten rows at a time and paging through search results, Sitecore Icon Search now displays icons in a responsive grid. All matching icons are available on the same page, so you can simply search and scroll through the results.

Search filtering still executes immediately as you type, but I've also made a few improvements to how searches are handled. For one, multiple search terms can now be combined to further narrow the results. For example, searching for user add will return icons matching both terms rather than treating the entire query as a single phrase.

I've also added a keyboard shortcut that I've found myself using quite a bit while testing the new UI: pressing / from anywhere on the page will automatically focus the search box.

Beyond the / shortcut, keyboard navigation is now fully in place. After searching for a keyword, you can use the arrow keys to move through the results and hit Enter to copy the selected icon's path.

In fact, Sitecore Icon Search is now hitting a 100% accessibility score:

Category filtering is also available directly alongside search, making it easier to narrow results to a specific Sitecore icon folder when needed.


Recent Icons, Favorites, and Icon Sizes

While rebuilding the grid, I ended up adding a few features that I didn't originally plan on but quickly found useful while testing the app.

The first is a new Recent filter. Every icon you copy is now added to a recent-history list stored locally in your browser.

Since the history is stored in local storage, it persists between sessions. If you copied an icon yesterday and can't remember exactly which one it was today, you don't necessarily have to search for it again.

There's also a new Favorites feature. Each icon card now has a small star in the upper-left corner that can be used to mark an icon as a favorite. Selecting the Favorites filter then brings all of those icons together in one place.

I can see this being particularly useful when planning out a set of templates. You can spend some time finding the icons you want to use, favorite them as you go, and then have that smaller collection readily available when it's time to actually apply the icons to your templates.

Both Recent and Favorites are stored locally in the browser, so there isn't any account, login, or server-side storage involved.

Finally, the new grid includes an icon-size slider for switching between 16x16, 24x24, and 32x32 previews.

This doesn't change the icon path being copied; it's purely a visual preference. The 16x16 setting lets you fit quite a few more results on the screen, while 32x32 is useful when you want a better look at some of the wonderfully pixelated artwork we've all been staring at inside Sitecore for years. 😄


Improved JSS Icon Support

Back in 2020, I added support for Sitecore JSS icon enums after a couple of colleagues pointed out how painful it was to find the corresponding SitecoreIcon enum value for an icon.

That functionality was originally implemented as an additional table column along with a JSS Icons Only filter.

With the new interface, JSS-supported icons now display a small JSS badge directly on the icon tile.

Clicking the icon itself copies the traditional Sitecore icon path, while clicking the JSS badge copies the corresponding enum value such as:

SitecoreIcon.Anchor

The JSS only filter is still available as well if you want to limit the grid exclusively to icons supported by the enum.


Copying Icons Without the Interruption

Copy confirmations are now displayed as small toast notifications at the top of the screen instead of a full overlay.

The randomly generated confirmation messages are still there. Some things don't need fixin'. 😄


Sitecore 10.5 Icons

Along with rebuilding the interface, I also updated the underlying icon dataset with the icons included with Sitecore 10.5. Admittedly, it's quite possible these newly added icons were introduced after 2022 (when I last went through the icon data extraction process), and I hadn't refreshed the datasource between XP releases, but they're in now!

After extracting and comparing the Sitecore 10.5 icon directories against the existing Sitecore Icon Search dataset, the application now contains 9,134 icons, up from 8,755.

The additions include:

  • 339 icons from the new NetworkV2 icon category
  • 40 additional icons added throughout existing categories, including document_json, checkbox_group, numbers_field, password_confirm, additional Marketing Automation icons, and several new persona avatars
  • No removed icons, so existing icon paths remain available

I've also added searchable attributes and synonyms for the new icons so they can be discovered through general keyword searches rather than requiring you to know the exact filename.


Browser Extension Updates

The browser extensions received the same UI overhaul as the web application.

I initially brought the updated experience into the Chrome extension, including the new grid layout, improved search, category filtering, dark mode, JSS badges, and the other interface improvements covered above.

I also updated both the Microsoft Edge Add-on and Firefox Add-on to match, so all three browser extensions are now aligned on the same refreshed UI and functionality.

The Sitecore integration itself hasn't changed.

When working in the Sitecore Content Editor, selecting an icon from the extension can still automatically update the item's Icon field and save the item. If you prefer to paste the copied icon path manually, that workflow still works.

One thing I'm particularly happy to finally bring into the extensions is JSS enum support. When an icon has a corresponding JSS enum, the JSS badge can be used to copy the enum directly without needing to jump over to the web application.

The latest Chrome version (v4.0.0) is available through the Chrome Web Store. Existing Chrome installations should receive the update automatically.

The updated versions are also available through the Microsoft Edge Add-ons and Firefox Add-ons stores for anyone using those browsers.

(FYI: Firefox's Addon submission review process always takes the longest.  At the time of this post, I'd already waited 10 days and it was still in Awaiting Review.  That said, the Firefox link may not yet be live yet, depending on when you read this - but I assure you, it's coming!)


A Quick Look at Usage

Before investing more time in another round of updates, I was curious about how much Sitecore Icon Search was still being used in 2026.

The answer is: it's still a small, very specific developer utility, but people are definitely still using it.

Over roughly the last 12 months, the Chrome Web Store reports 541 installs, an increase of 87.2% compared with the previous period.

During the same period, there were 118 uninstalls, which was down 18.06%.

Interestingly, the extension's Chrome Web Store listing received about 1.29K page views during that period, essentially flat at 1.76% lower than the previous period. I'm not going to pretend those numbers are enough to draw any grand conclusions, but seeing installs increase while listing traffic stayed relatively consistent was encouraging.

Traffic to sitecoreicons.com itself is a little more mixed.

So far in 2026, Google Analytics reports 961 active users, 884 new users, and about 2.6K views. Active users are down ~15%, and new users are down ~16% compared with the previous period.

More recently, though, the current quarter has been trending in the other direction with 212 active users, up ~18%, and 169 new users, up 29% over the previous period.

One metric I found particularly fitting was an average engagement time of about 38 seconds per active user.

Normally, a short engagement time might not sound all that great, but for Sitecore Icon Search, that's pretty much the goal lol. Search for an icon, copy it, and get back to whatever you were doing. You shouldn't have to spend 10 minutes on the site. 😄

The user base also continues to reach well beyond the US, with developers visiting from India, the Netherlands, the United Kingdom, Australia, China, Germany, and plenty of other locations.

To be clear, none of these numbers are the result of this UI refresh. They're the numbers leading into this release. It'll be interesting to come back to them later and see whether the new interface has any measurable impact.


Cleaning Up the Front-End

The UI wasn't the only part of Sitecore Icon Search showing its age.

The original application relied on jQuery, Bootstrap 3, and DataTables. Those dependencies made sense when I originally built the application in 2018, but after removing the table-based interface, there wasn't much reason to keep carrying them forward.

All three have now been removed.

Sitecore Icon Search is still built using plain HTML, CSS, and JavaScript with no external JavaScript framework dependencies. Aside from simplifying the codebase, this also reduced the amount of code and assets required to load the application (thx Claude).

Dark mode has also been updated with improved colors and contrasts.

On your first visit, the application now respects your operating system's preferred color scheme instead of defaulting everyone to light mode. You can still switch between light and dark mode manually afterward.

Finally, I've added a changelog to the About page to track future releases and application changes.


Eight Years Later...

Eight years after launching, I'm happy that developers are still using it. The usage numbers certainly aren't massive, but for a utility built to solve a very specific Sitecore developer problem, seeing it continue to get regular traffic and hundreds of extension installs years later is pretty cool.

I'm also happy to finally give the application the interface I've wanted for a while.

As always, if you run into an issue or have an idea that could make Sitecore Icon Search more useful, feel free to reach out.

Check out the updated Sitecore Icon Search

Happy Searching! 🔎

Wednesday, May 27, 2026

Team Sitecorepunk 2077 Wins the 2026 Sitecore Hackathon!

It happened again!!

I'm proud to say that 'Team Sitecorepunk 2077' (...it's still just me) has officially won the 2026 Sitecore Hackathon!  🏆



That's now two years in a row!  It's really an unreal feeling. 

A day or two after the event, I sifted through the SitecoreHackathon GitHub to pull some stats:  34 teams registered, 20 teams submitted something before the deadline.  

A solid Sitecore community turnout 👏👏👏  

I vibed together a submission showcase to digest all of this year's entries. 
Check it out here: Sitecore Hackathon 2026 Submission Showcase.


👟 Preparation

In my hackathon prep post, I basically said 'you can practice for this'.  Taking my own advice, I spent time leading up to the event building a couple of basic Marketplace applications locally using AI-assisted tools like Claude Code, OpenAI Codex, Microsoft Copilot, Cursor, VS Code, and Perplexity. 

After a few days into this deep dive, I wound up with a pretty solid LLM-friendly knowledge base containing relevant public Sitecore Marketplace SDK/Blok documentation, examples, and code samples to give my agents the context they need to successfully build and iterate on a Marketplace app.  With these technical barriers eliminated, I could focus on building features for whatever app I'd end up building during the event.  

Day of, I'd say I felt...pretty well prepared actually.  It wasn't my first rodeo, so I knew what to expect.   My workspace was ready, and I felt confident that I had the tools to execute whatever the categories/idea requirements. 

I took the afternoon off from work and forced a short nap, enough time to reset, and have dinner with the family.  

I had my calendar blocked.  Everyone at home knew that I'd be upstairs, locked away in my office for the next 24 hours (with the occasional break in between). 



I even had my Hackerspace Hero shirt on!


It was time.  

Tuesday, July 15, 2025

SPExAI GPT: SPE Script Generation, No Module Required

Earlier this year, I built SPExAI Report Builder during the 2025 Sitecore Hackathon, a natural language interface for generating Sitecore PowerShell Extensions (SPE) reports. The concept was simple: use plain English to get real, working scripts. The result? A winning module that turned heads and saved hours. 🙌

But what if your team loves the idea but doesn’t have the time, access, or appetite to install a custom module? Perhaps you just need a script now and then. Or maybe you're working in an environment with limited Sitecore customization privileges.

It would be great if you didn't need to rely on installing a module into your Sitecore instance to benefit from this technology. 


✨ Introducing SPExAI GPT

Introducing a new flavor of SPExAI; not as a Sitecore module, but as a custom GPT. It works entirely outside of Sitecore. No installs. No packages. No patch configs. Just a prompt box and your imagination.

Your prompt:

"Report of all templates (ID, Name, Path) and their usage count."

And SPExAI (the GPT version) responds with a fully working script.  Same quality, same intelligence, now universally accessible.



Simply copy the output, paste it into the Sitecore PowerShell ISE, and run it:


Results!



One benefit you get with the SPExAI GPT over the SPExAI module is that you can continue your chat, which isn't available in v1 of the SPExAI (it's all one-shot), allowing you to prompt beyond your initial prompt.  This is great for getting help with fixing errors you may encounter when using the initially generated script, or even for enhancing an existing script.

🧠 Under the Hood

The GPT version builds on the same core ideas as the Hackathon module:

  • 🔍 A system prompt trained to interpret natural-language Sitecore requests and produce accurate PowerShell reports.

  • 📚 A curated knowledgebase of common SPE scripting patterns tailored to tasks like item audits, rendering usage, field value searches, and more.

  • ⚙️ Designed to speak "Sitecore" fluently, not just ChatGPT syntax, but the nuances of $SitecoreContext, $item.Paths.FullPath, Get-Item, and all the other familiar constructs.

I've adapted the system prompt to better align with ChatGPT’s structure, ensuring cleaner completions, improved formatting, and fewer hallucinations.


🚀 Try It Yourself

If you're looking to generate SPE scripts without touching your Sitecore instance, this GPT-based version might be the way to go. Whether you're prototyping, documenting, or training a team, it removes friction and delivers fast results.

You can find the SPExAI GPT on the Chat GPT store by selecting GPTs in the left-hand panel of ChatGPT, then searching for `spexai`:



You can also access SPExAI GPT directly using this link:

If you use it, please take a moment to leave a rating. 
If you have suggestions for improving the GPT, I'm open to them! 😀

Friday, May 16, 2025

Sitecore Icon Search: 2025 Updates

Sitecore Icon Search recently turned 7! 🎂

Happy Birthday, little app 💖

I'm thrilled to see that it continues to serve the Sitecore developer community worldwide. In just the past month, it saw 191 active users and 152 new users, with the majority coming in through organic search - proof that it still ranks well and fills a need.

The U.S., India, and the Netherlands lead traffic, and even after all these years, developers are still finding their way to it. 

Here's a look at the latest analytics snapshot:


 

Updates 

In addition to keeping up with annual hosting and domain renewals, I've recently applied some long-overdue visual improvements.  



What’s New?

  • Modernized Styling: Fonts, borders, spacing, and color usage have been cleaned up for a more consistent and modern feel.

  • Improved Layouts: Improved component alignment and padding to help the content breathe, especially at different screen sizes.

  • Refined Search Bar Experience: Improved the search input styling.

  • Cleaned-Up Header: A few stale links were pruned from the top nav. The essentials remain.

  • Dark Mode! It's about time, right?
  • Clipboard Modal Enhancements: Icon copied modal now includes several new random lighthearted titles:

Hopefully, just a better, cleaner experience.

Go to Sitecore Icon Search

Happy Searching! 🔎

Thursday, April 17, 2025

Sitecore Container Prerequisites Script Updates



Heads up!  I’ve made some recent updates to the open source Sitecore Container Prerequisites script to keep things aligned with the latest Sitecore versions and development environments.

What’s new:

  • ✅ Added support for Sitecore 10.3.2 and 10.4.0

  • 🖥️ Improved OS compatibility checks for Windows 10 and 11

  • 📄 Refined the README with clearer instructions for installation, usage, and contributing

  • 🔗 Updated package download links and references to current installation guides

Sitecore Container Prerequisites script remains a helpful utility for preparing your Windows machine to run Sitecore containerized environments smoothly. 

Feedback and contributions are always welcome!

📍 View the GitHub repo

Thursday, August 1, 2024

Sitecore MCP 2.0 Roles and Responsibilities Matrix Decoder

TL;DR

I built an app to help me understand the differences in roles and responsibilities between MCP 1.0 and MCP 2.0, and I think it may be helpful for others.  I wanted an easy way to search or browse the different roles and responsibilities and get a clear answer. 

Check it out here:

Sitecore MCP 2.0 Roles and Responsibilities Matrix Decoder App



Navigating the complexities of the Sitecore Managed Cloud PaaS 2.0 roles and responsibilities matrix isn't particularly exciting, especially for those new to the platform or customers moving from MCP 1.0. While I discovered that the roles and responsibilities in MCP 1.0 and MCP 2.0 are fundamentally similar, MCP 2.0 introduces more detailed and specific tasks related to modern cloud infrastructure management and security enhancements.

This week, I built a learning/reference app to help Sitecore customers, developers, architects, operations administrator/support teams, and account/project managers (and myself 😏) easily reference the different roles and responsibilities defined in MCP 2.0. 

The tool sets out to simplify the process of familiarizing oneself with new tasks and responsibilities, making searching and browsing through the matrix far more digestible. Whether transitioning from MCP 1.0 or diving into MCP 2.0 for the first time,

First, let's highlight the key differences between MCP 1.0 and MCP 2.0 roles and responsibilities I noted during my research. 

The RACI Model

The MCP roles and responsibilities matrix is structured using the RACI model, a framework that defines various stakeholders' involvement in completing project tasks or deliverables. Understanding this model is important for effectively navigating the roles and responsibilities within Sitecore Managed Cloud PaaS 2.0.

What is the RACI Model?

RACI stands for Responsible, Accountable, Consulted, and Informed. Each role in the matrix is assigned one or more of these labels to specify their level of involvement in a given activity. 

  • Responsible (R): The person or people who do the work to complete the task. They are responsible for action/implementation. Responsibility can be shared.

  • Accountable (A): The person who is ultimately answerable for the correct and thorough completion of the task. This role is often called "the one who signs off on the work," and only one person can be assigned to this role for each task.

  • Consulted (C): The people who provide information for the project and with whom there is two-way communication. These are typically subject matter experts.

  • Informed (I): The people who are kept up-to-date on progress, often only on completion of the task or deliverable, and with whom there is just one-way communication.

Applying the RACI Model in Sitecore Managed Cloud PaaS

Sitecore applies the RACI model to delineate roles and responsibilities among Sitecore, customers, and partners within the MCP 2.0 environment to ensure all stakeholders understand their part of the bargain.

Here are some examples of how the RACI model is applied:

  • Activation and Termination: For activating the Sitecore Managed Cloud, Sitecore is Accountable (A) and Responsible (R), while the customer/partner is Informed (I).

  • Provisioning of Environments: Sitecore is Responsible (R) and Accountable (A) for creating new environments while the customer/partner is Consulted (C).

  • Application Design and Implementation: The customer/partner is Responsible (R) and Accountable (A) for planning Sitecore software upgrades, while Sitecore is Informed (I).

  • Infrastructure and Server Management: Sitecore handles the initial provisioning checks as Responsible (R) and Accountable (A), with the customer/partner being Informed (I).

Key Differences Between MCP 1.0 and MCP 2.0 Roles and Responsibilities

While both MCP 1.0 and MCP 2.0 maintain a similar structure and overall responsibilities, MCP 2.0 introduces several new and detailed tasks that reflect advancements in cloud infrastructure management and security. Here are the main differences:

Provisioning of Sitecore Environments

MCP 1.0:
  • Create new environment, installation, and initial set up: Sitecore (R, A)
  • Delete existing environment: Sitecore (R, A)
  • Reset existing environment: Sitecore (R, A)
MCP 2.0:
  • Provision Sitecore Managed Cloud production Hub-spoke environment(s): Sitecore (R, A)
  • Provision Sitecore Managed Cloud non-production environment(s): Sitecore (R, A)
  • Provision Sitecore Managed Cloud disaster recovery Hub-spoke environments(s): Sitecore (R, A)
  • Provision Sitecore Managed Cloud “custom customer-owned” Spoke environment: Sitecore (R, A)
  • Delete existing environment: Sitecore (R, A)
  • Reset existing environment: Sitecore (R, A)

Infrastructure and Server Management

MCP 1.0:
  • Perform initial provisioning check: Sitecore (R, A)
  • Scale infrastructure services (Web App, Solr, Azure SQL, Redis cache, and so on): Sitecore (R)
  • Initial Web Application Firewall - deployment and configuration: Sitecore (R)
  • Set up initial security (Azure SQL firewall): Sitecore (R, A)
  • Set up network firewalls and post-deployment security: Customer/Partner (R, A)
  • Set up third-party services (DevOps tools, CDN, databases, and so on): Customer/Partner (R, A)
  • Custom domain setup: Customer/Partner (R, A)
  • Initial setup and configuration of backup services (blobs, database): Sitecore (R, A)
  • Customization of backup schedules and services: Customer/Partner (R)
  • Consolidation of billing: Sitecore (R, A)
  • Infrastructure performance optimization: Customer/Partner (R, A)
MCP 2.0:
  • Initial Azure Front Door with Web Application Firewall - deployment and configuration: Sitecore (R)
  • Network security groups and initial security setup (Azure SQL firewall): Sitecore (R, A)
  • Network firewalls and post-deployment security setup (Azure SQL firewall): Customer/Partner (R, A)
  • Set up third-party services (DevOps tools, CDN, databases, and so on): Customer/Partner (R, A)
  • Custom domain setup: Customer/Partner (R, A)
  • Initial setup and configuration of backup services (blobs, database): Sitecore (R, A)
  • Customization of backup schedules and services: Customer/Partner (R)
  • Consolidation of billing: Sitecore (R, A)
  • Infrastructure performance optimization: Customer/Partner (R, A)

Security: Azure Platform

MCP 1.0:
  • Configure encryption at rest and in motion: Sitecore (R, A)
  • Configure and perform disaster recovery: Sitecore (R, A)
  • Configure host security - hardened OS: Sitecore (R, A)
  • Operating system (PaaS): Sitecore (R, A)
  • Sitecore Cloud operations change management (via ServiceNow): Sitecore (R, A)
  • Azure DDoS standard initial setup: Sitecore (R, A)
  • Azure DDoS standard post-provisioning: Customer/Partner (R)
  • Define basic Web Application Firewall requirements - rule management: Customer/Partner (R, A)
  • Initial deployment security hardening of Sitecore product: Sitecore (R, A)
  • Ongoing security hardening of Sitecore product: Customer/Partner (R, A)
MCP 2.0:
  • Configure encryption at rest and in motion: Sitecore (R, A)
  • Configure infrastructure security logging via Azure Defender for Cloud: Sitecore (R, A)
  • Configure and perform disaster recovery: Sitecore (R, A)
  • Configure CD App service for Azure Zone Redundancy: Sitecore (R, A)
  • Configure host security - hardened OS: Sitecore (R, A)
  • Configure initial network security – Network security groups: Sitecore (R, A)
  • Configure initial network security – VNET and subnets: Sitecore (R, A)
  • Configure initial network security – private link / private endpoint (App service, SQL, Key Vault): Sitecore (R, A)
  • Configure Azure Bastion service: Sitecore (R, A)
  • Implementation of Azure S2S VPN: Sitecore (R, A)
  • Ongoing S2S VPN configuration and client-side management: Customer/Partner (R, A)
  • Operating system (PaaS): Sitecore (R, A)
  • Sitecore Cloud operations change management (via ServiceNow): Sitecore (R, A)
  • Azure DDoS standard initial setup: Sitecore (R, A)
  • Azure DDoS standard post-provisioning: Customer/Partner (R)
  • Define basic Web Application Firewall requirements - rule management: Customer/Partner (R, A)
  • Implement initial Web Application Firewall configuration and rule management (Front Door): Sitecore (R, A)
  • Initial deployment security hardening of Sitecore product: Sitecore (R, A)
  • Ongoing security hardening of Sitecore application: Customer/Partner (R, A)

Why I Built This App

The roles and responsibilities matrix is a critical component of the Sitecore Managed Cloud PaaS 2.0 offering, providing essential information about the tasks and duties of different team members. However, the sheer volume of information can be overwhelming. 

My goal was to create an intuitive and user-friendly tool that would streamline familiarizing oneself with these roles, ultimately enhancing productivity and understanding.

Key Features of the App

The web app is designed to be straightforward and efficient, offering several key features:

  • Search Functionality: Users can quickly search for specific roles or responsibilities using keywords. This feature significantly reduces the time spent sifting through documents.
  • Browse Capability: For those who prefer to explore, the app allows users to browse through the roles and responsibilities in a structured manner, making it easy to find relevant information.

How to Use the App

Using the app is straightforward. Simply visit Sitecore MCP 2 Roles and Responsibilities Matrix Decoder, where you can start searching or browsing through the various roles and responsibilities.

Conclusion

Whether you are a new user trying to understand your role or an experienced professional looking for specific responsibilities, this tool is designed to help you find the information you need quickly and easily.

For a detailed look at the roles and responsibilities, refer to the official Sitecore documentation provided in the app. Feel free to reach out if you have any feedback or suggestions for improvement.

Tuesday, April 9, 2024

Sitecore XM Cloud Developer Certification Practice Exams: A Free Study Companion

Certification is a crucial milestone for any developer pursuing excellence and proficiency in Sitecore XM Cloud.  One of my preferred ways to learn and study is via practice exams.  However, with existing spread of Sitecore XM Cloud practice exams available online cost being between $30 and $150, the financial burden of personally preparing can be as daunting as the exam itself. 

That's why I'm excited to introduce the Sitecore XM Cloud Developer Certification Practice Exams app, a completely free resource designed to democratize the preparation process for all Sitecore developers.



Elevating Your Exam Readiness Without the Cost

The XM Cloud Certification demands a deep understanding of numerous Sitecore aspects, from XM Cloud architecture and developer workflow to security and data modeling. This exhaustive list requires serious preparation. The Sitecore XM Cloud Developer Certification Practice Exams app offer a thorough, cost-free study tool that reflects the actual exam's breadth and depth.

Tailored for Comprehensive Preparation

  • Precise Exam Simulation: The practice exams simulate the actual test with 50 questions chosen randomly, testing not just your knowledge but also your ability to perform under exam conditions.

  • Competency-Centric Learning: Dive into crucial competencies on which the exam will test you. Each practice question is sourced from Sitecore's documentation and is an opportunity to fortify your understanding of core Sitecore XM Cloud competencies.

  • Real Exam Experience: Sharpen your time management skills with a 100-minute timer that mirrors the exam's duration.



Commitment to Community and Accessibility

Access to educational resources should be barrier-free in a landscape dotted with expensive prep materials.  The Sitecore XM Cloud Developer Certification Practice Exams app was born from a blend of personal needs and a commitment to the Sitecore community. This practice exam tool is my contribution towards leveling the playing field for all aspiring XM Cloud certified developers.

I'm excited to offer this resource to the community, ensuring that everyone has the chance to study effectively and become certified without the financial strain. Start your free practice runs today and please share this tool with anyone who might benefit.


Happy learning!

Friday, September 8, 2023

Building Better Reports: 5 Sitecore PowerShell Extensions Functions for Your Toolbelt


When navigating the Sitecore ecosystem effectively, PowerShell extensions aren't just a helpful tool; they're practically a prerequisite. As someone who has spent a substantial amount of time in this space, I have distilled a set of functions that I've found myself using time and time again. 

Join me as I unpack a curated list of five functions that have become staples in my Sitecore toolkit.

Get-IsPublished

The "Get-IsPublished" function checks if a specific item, identified by its ID, is published on a "web" database. It takes an item as input and queries for it against the "web" database using its ID. If it finds the item in the database, it returns "TRUE," indicating that it is published. If it doesn't find the item (i.e., if the item is null), it returns "FALSE", indicating that it is not published.

This is particularly useful for displaying a column in your SPE report to denote if the item is published to the web database:


Get-ItemSitecoreCELink

The "Get-ItemSitecoreLink" function generates a URL to open a specific item in the Sitecore Content Editor. It takes a Sitecore item as input and uses various properties of that item (like its ID, version number, and language) to construct a URL. This URL, when accessed, will open the Sitecore Content Editor with that specific item loaded, allowing for easy navigation directly to the editing interface for that item. 

Please note that the base of the URL ("https://yourcmurl.com/") in this function is a placeholder that you'd replace with your actual Sitecore Content Management URL.

This is useful if the report is exported to Excel or CSV as it provides the direct link to reach the item without manually traversing the tree or searching for the item by GUID.


Get-LinkFieldUrl

The "Get-LinkFieldUrl" function retrieves the URL from a Sitecore item's link field. It takes a Sitecore item as its input and utilizes a regular expression to extract and return the URL stored in a "My Link Field" field. The regular expression is designed to find and capture the URL stored as a value in a link HTML element's URL attribute.  

If the "My Link Field" is not empty and matches the pattern specified by the regular expression, the URL is retrieved and returned. If the field is empty or doesn't match the pattern, the function returns nothing, essentially returning a null value.

This function couples well for reports if you need to extract the URL out of a Sitecore Link Field value to display in your report:

Assert-HasLayout

The "Assert-HasLayout" function checks if a given Sitecore item has a "final layout" defined. It accepts a Sitecore item as its input and uses the built-in "Get-Layout" function to retrieve the final layout details of the item.  If the item has a final layout (meaning the $layout variable is not null or empty), the function returns a "TRUE" string, indicating that a layout is present.

If no layout is found for the item (meaning the $layout variable is null or empty), it returns a "FALSE" string.

Usage example


Get-FormattedDate

The "Get-FormattedDate" function takes a raw date string as its input and attempts to turn it into a more user-friendly date format.

The raw date string is expected to follow a particular "yyyyMMddTHHmmssZ" pattern ("20230908T123456Z" representing September 8, 2023, 12:34:56 PM in Coordinated Universal Time, for example) - which is precisely how Sitecore typically stored DateTime fields in the database.

The function reads this string and converts it to a date format that is more commonly used, which includes the month, day, and year (like "09/08/2023"). If, for any reason, it can't convert the input into a date (maybe because the input doesn't follow the expected pattern), it will simply return an empty string. This way, even if it receives unexpected inputs, it won't crash and will still produce a result, even if that result is just an empty string.

By passing in the raw DateTime field value into the Get-FormattedDate function, the report will convert it to a readable string value when exporting the report to Excel, CSV, or JSON.




Whether you're a seasoned Sitecore developer or just starting out, these 5 functions can become essential tools in your developer toolkit, helping you navigate the complexities of Sitecore with greater ease and efficiency ✌.

Tuesday, February 28, 2023

Sitecore xDB Contact Lookup Utility

My client's lead flow includes capturing form data into a custom database. Each record contains an xDB Contact ID to correlate the data with the data captured in xDB directly.  We had a scenario where we had hundreds of records in the custom database where the xDB contact ID was missing, likely due to a networking issue between the CD and xConnect.

I needed a way to match users captured in the custom database against the data in xDB to obtain an existing xDB contact ID.  Luckily, Sitecore's documentation provides some sample code to help get me started: xConnect Client API (C#) (sitecore.com)

Thus was born, the...

🧰 xDB Contact Lookup Utility


The utility is your standard .aspx file that can be dropped into the/sitecore/admin folder or at the root of CM instance. It combines a series of xConnect API calls to search for contact information in the xDB.  Applicable parameters include email address, first name, last name, or xDB contact ID.

It can be used in two ways:

First, through the UI (as shown above), you have the ability to populate text boxes to obtain parameters and view the result list on the page.

Secondly as a simple rest endpoint, with the ability to pass parameters into the URL and return a JSON response containing a matching xDB contact ID.

For example: 
/xDB-Contact-Lookup.aspx?email=test@test.com&firstName=test&lastName=test




👨‍💻 Code Breakdown

Page_Load

The Page_Load event checks if a query parameter named "email," "lastName," or "firstName" are present in the URL. 

If at least the "email" parameter is present, the method calls the SearchForContactIdByEmail .If the lastName and firstName parameters accompany the email parameter, the SearchForContactIdByName method is also used to search for a contact. The search results are returned as a JSON response which contains an xDB contact ID of the first match or "NoMatch" if no match was found. The JSON string is written to the HTTP response, ending the response. If the "email" query parameter does not exist, the method does nothing and loads the UI.

btnLookup_Click

This button click handler retrieves user input from four text boxes for known contact ID, email, last name, and first name. If the user input is for a known contact ID, it calls the SearchForContactById method to retrieve the contact's information and displays it in an HTML table. 

If there is no matching contact, it displays a message saying that no contact was found. 

If the user input is for email, last name, and/or first name, it calls SearchForContactIdByEmail and/or SearchForContactIdByName methods to retrieve contact information and displays it in an HTML table. 

If there are no matching contacts, it displays a message saying that no contact was found.

There are three methods implemented for using the xConnect API:

SearchForContactById

This method searches for a Contact object in xDB using a known contact ID. The method SearchForContactById takes a string parameter knownContactId and returns a Contact object. The method first converts the knownContactId string to a Guid, creates an instance of Sitecore.XConnect.Client.XConnectClient, and uses the Get method of the client object to retrieve a Contact object using a Sitecore.XConnect.ContactReference object created from the Guid

It also uses a Sitecore.XConnect.ContactExpandOptions object to specify which facets of the Contact object to retrieve. 

If the Get method throws an XdbExecutionException, the method catches the exception and returns null.

SearchForContactIdByName

This method searches for a list of Contact objects by their LastName and FirstName facets of PersonalInformation

SearchForContactIdByName takes two string parameters, lastName and firstName, and returns a list of Contact objects. 

Inside the Sitecore.XConnect.Client.XConnectClient using block, the method creates an IAsyncQueryable object named queryableLastName that represents a xConnect API query to xDB. The query retrieves all contacts where the LastName and FirstName facets of PersonalInformation match the values of the lastName and firstName parameters. 

The query then sorts the results in descending order of LastModified. The WithExpandOptions method is used to specify which facets of the Contact object to retrieve. The method then retrieves the query results using a batch enumerator, which is added to a List<Contact> object named idsList. 

If the query throws an XdbExecutionException, the method catches the exception and returns null.

SearchForContactIdByEmail

This method searches for a list of Contact objects by their EmailAddress and optionally their LastName and FirstName facets of PersonalInformation

SearchForContactIdByEmail takes three string parameters, email, lastName, and firstName, and returns a list of Contact objects. 

Inside the using block, the method creates an IAsyncQueryable object named queryable that represents a xConnect API query to the xDB. The query retrieves all contacts where the PreferredEmail facet of EmailAddressList matches the email parameter value. 

The query then sorts the results in descending order of LastModified. The WithExpandOptions method is used to specify which facets of the Contact object to retrieve. The method then retrieves the query results using a batch enumerator, which is added to a List<Contact> object named idsList

If the firstName and lastName parameters are not empty, the method checks if the FirstName facet of PersonalInformation and LastName facet of PersonalInformation match the values of the firstName and lastName parameters respectively for each Contact object retrieved. 

If both match, the Contact object is added to idsList. If the firstName and lastName parameters are empty, all Contact objects retrieved are added to the idsList

If the query throws an XdbExecutionException, the method catches the exception and returns null.

Final Result

The full code can be copied here. Add the content to a .aspx file and place it where you need it.


As always, feel free to modify or build on top of this to satisfy your own requirements.

🚀


Friday, November 4, 2022

DALL-E OpenAI Image Generator for Sitecore

On January 5, 2021, OpenAI revealed DALL-E, an artificial intelligence program that creates images from textual descriptions, on January 5, 2021. It uses a 12-billion parameter training version of the GPT-3 transformer model to interpret the natural language inputs and generate corresponding images. 

Since the initial private beta release, access to DALL-E was limited to those on a waitlist. However, about a month back, on September 28, 2022, DALL-E 2 opened to the public, and the waitlist requirement was lifted. Over the past month, millions of users have explored DALL-E's capabilities using https://labs.openai.com/.

Yesterday, on November 3, 2022, OpenAI announced the DALL-E API, which developers could start immediately consuming. 🤩


DALL·E joins GPT-3, Embeddings, and Codex in our API platform, adding a new building block that developers can use to create novel experiences and applications. All API customers can use the DALL·E API today.
As soon as I heard the news, I couldn't help but immediately explore the API myself. I was already familiar with OpenAI's API playground for text-based AI  prompts and had an existing API key ready. 

My first instinct to consume the DALL-E API was to use plain old Windows PowerShell 🤓

"A photorealistic close-up of a variety of river rocks"

"A super cute puppy"

So dope 😎 - and wildly simple!

DALL-E OpenAI Image Generator for Sitecore

AI-generated images were featured prominently in Paige O'Neill's keynote at the 2022 Sitecore Symposium in Chicago. 

There's real value in this technology. A reality where designers, marketers, and developers who need a patterned backdrop can unleash their creativity to quickly and easily generate an image without needing to license stock images is nearly here. Even in its current state, the ease and simplicity of the DALL-E API make this the perfect candidate for consuming in a CMS.

With the fresh release of the DALL-E API, I couldn't think of a better time to give it a whirl and integrate it into Sitecore. 

🥁 Introducing...the ✨ DALL-E OpenAI Image Generator for Sitecore ✨ :




The Details

Naturally, Sitecore PowerShell Extensions was the way to go. The 'Context Menu' and 'Insert Item' integration points allow users to open the prompt while targetting any 'Media Folder' - either by right-clicking, expanding Insert, and selecting 'DALL-E OpenAI Image Generator' or selecting 'DALL-E OpenAI Image Generator' from the Folder tab of the active Media Folder.
Both integration points are configured out-of-the-box to only show on items where the Template is a 'Media Folder.'
Once the prompt is toggled, the user can configure their call to the DALL-E API using the following inputs:
  1. A prompt for the DALL-E to interpret.
  2. Image sizing options - restricted to these three sizes at this time: '256x256', '512x512', 'and 1024x1024' (see https://beta.openai.com/docs/api-reference/images/create#images/create-size)
  3. The number of images to generate (DALL-E API allows an integer from 0 to 10. The module limits generation to up to 5)
  4. The base name for new Media Items created in the Media Library after images are generated from DALL-E.



The module also comes bundled with a Settings item located in the following location:
  • /sitecore/system/Modules/PowerShell/Script Library/DALL-E OpenAI Image Generator/OpenAI API Settings
  • {F102AE0D-6A5B-499B-9500-505D0E6F686F}
This item allows users to change or override some default settings - the most important being the 'OpenAI API Key' field, where users must populate their unique API key. after installing the module, You can generate an OpenAI API Key by logging in and navigating to the API Keys settings for your account: https://beta.openai.com/account/api-keys
The Setting item's Template is located in the following location:
  • /sitecore/templates/Modules/DALL-E OpenAI Image Generator
  • {169EE16E-5D44-4CC1-B475-A2DFC8B08A0B}

The Code

The complete source code is available on GitHub, along with the Sitecore package (see https://github.com/strezag/DALL-E-OpenAI-Image-Generator-for-Sitecore/releases) and installation instructions: 
https://github.com/strezag/DALL-E-OpenAI-Image-Generator-for-Sitecore

The module is totally open to any community contributions or general suggestions. Beyond that, feel free to fork a version of your own a build on top of it.

Final Thoughts

I'm really excited about this space and where I believe it's headed. As this technology continues to grow, we should expect an expansion of the DALL-E API (and others) that will almost certainly redefine how we work with digital visual assets.

Enjoy! 🤖