How to prepare for XM Cloud certification

As of 629 days ago today when Sitecore announced XM Cloud, it has been THE BUZZ around town, I was fortunate enough to be part of the demo team at the time and get my hands dirty with all the tech that was acquired. We were getting ready to integrate with Sitecore before anyone else. We just finished transforming PLAY! Summit from XM/XP to headless and we started headless to XM CLoud right after that. See it here at Sitecore.Demo.XmCloud.PlaySummit.

Still, after not working with XM Cloud daily, I needed to study a bit for the test. Below are my steps:

  • I read through the documentation links provided in the study material.
  • I attended Martin Mile’s sessions when he went over the material.
  • Navan’s blog post
  • Navan’s video walkthrough
  • Vishal Khera’s practice test
  • Re-read Sitecore’s documentation
  • Voila!

My Wishlist for Sitecore and XM Cloud:
– Better price
– Better Salespeople
– Appreciate more North American developers
– Un-dockerized code base
– Easier upgrade path from XM Ground

XM CLoud Certification prep

Specially for those without access to learning.sitecore.com

To pass the Sitecore XM Cloud Developer Certification Exam, you must demonstrate critical job-related knowledge, skills, and abilities regarding Sitecore XM Cloud. The eight competencies align with the essential knowledge areas for successful Sitecore XM Cloud development. 

The guide below contains the eight competencies for developers certified in Sitecore XM Cloud. Click on each tab for more information and resources. 

Guide: Competencies and resources for Sitecore XM Cloud Developers

Competency 1: XM Cloud Architecture and Developer Workflow–

To be certified in Sitecore XM Cloud, a Developer should be able to describe the developer workflow and manage the architecture of XM Cloud. To meet this competency, you should be able to:  

  • Define Sitecore XM Cloud-specific terminology 
  • Describe the benefits of cloud and SaaS architecture for composable DXP foundations
  • Define key components within the developer workflow for XM Cloud 
  • Manage sites within site collections

Resources:

Competency 2: Deployment of XM Cloud Projects–

To be certified in Sitecore XM Cloud, a developer should be able to deploy new projects using both the Deploy Application and Sitecore CLI. To meet this competency, you should be able to: 

  • Log into and navigate the XM Cloud Deploy Application
  • Deploy a project using a starter template
    • Set up an XM Cloud local development environment
  • Define the attributes of a starter template
    • Deploy a project using Source Code Provider
  • Define compatibility requirements for deploying your own code
  • Configure repositories and environments
    • Connect to your repository  
    • Create environments such as production, QA, and test 
    • Configure deploys on demand or automatically based on code commits to a watched branch
  • Review project details to determine deployment status 
  • Review logs to troubleshoot errors

Resources:

Competency 3: Renderings and Layout–

To be certified in Sitecore XM Cloud, a developer should be able to create and manage components. To meet this competency, you should be able to: 

  • Create new components using the Component Builder
  • Create placeholder settings items and set allowed controls
  • Create and manage Page Designs and Partial Designs
  • Create a custom SXA module
  • Create component definition items
    • Set the compatible renderings on a rendering definition item
    • Set the Datasource location and data source template fields 
    • Set up rendering parameters  
    • Clone a rendering
    • Create and manage headless variants
  • Configure item security properly for existing and future items

Resources:

Competency 4: Sitecore Content Serialization

To be certified in Sitecore XM Cloud, a developer should be able to use Sitecore Content Serialization (SCS) to manage content and item changes among a team of developers. To meet this competency, you should be able to: 

  • Serialize and deserialize items from source control using the Sitecore CLI
    • Connect to a local or remote XM Cloud hosted instance
  • Configure a Serialization Module with included paths and rules
  • Use serialization packages for continuous integration

Resources: 

Competency 5: Sitecore APIs & Webhooks–

To be certified in Sitecore XM Cloud, a developer should be able to handle webhooks and use the Sitecore APIs. To meet this competency, you should be able to: 

  • Use Experience Edge API to query an item, layout, or search 
  • Use GraphQL Mutations to create, update, and delete items 
  • Define and handle webhooks

Resources: 

Competency 6: XM Cloud Pages–

To be certified in Sitecore XM Cloud, a developer should be able to create, edit, and publish page designs and components using Pages. To meet this competency, you should be able to: 

  • Create and edit items using Sitecore Pages
  • Add and modify components and component properties
    • Add components to placeholders
    • Differentiate between Front End as a Service components and Headless SXA Components
    • Add and change a component’s data source
    • Modify a component’s Grid layout settings
  • Use workflow to publish content
  • Preview a page on multiple devices

Resources: 

Competency 7: Security for Developers–

To be certified in Sitecore XM Cloud, a developer should be able to configure the environment and CM user security settings, and create and manage users and roles. To meet this competency, you should be able to: 

  • Create users in the Sitecore Cloud Portal
  • Configure and assign roles in the Sitecore XM Cloud Role Manager
  • Manage permissions for items, roles, and users
  • Configure multifactor authentication

Resources: 

Competency 8: Data Modeling–

To be certified in Sitecore XM Cloud, a developer must be able to create and manipulate items and data templates. To meet this competency, you should be able to: 

  • Create data templates, standard values, and set inset options to match the data structures outlined in a development plan.
    • Configure base templates for a data template
    • Create fields on a data template
  • Manage language and numbered versions of items
  • Data Model mapping to Experience Edge Schema 

Resources: 

Summary

The competencies listed above and the associated practical skills are crucial for being certified as a Sitecore XM Cloud Developer. Be sure you have a thorough understanding of each one and have spent adequate time preparing for the test. If you want to see what questions might be on the certification exam, please refer to the practice questions in this study guide.

What not to do in a remote job interview

  • Wear a t-shirt
  • Not wearing pants even if you are not standing up
  • Show up with messy hair
  • Be sick and not mention it
  • Close the door behind you
  • Make sure the lighting is good
  • Join late for the call
  • Making sure the mic is working
  • Saying “like” and “um” more than once a minute
  • Pronounce the name wrong
  • Know nothing about the company
  • Know nothing about the position
  • Play with your phone – Unless it’s your mom from the hospital
  • Forget to mute your phone and notifications – Stop the buzz
  • Pick your nose – either one would do
  • Not knowing the basics (like the difference between abstract class and interfaces)
  • Spout bullshit – You will be surprised how many people can detect that
  • Lie
  • Talk too much – especially when it’s not related
  • Going off on a tangent – talking about bitcoins when asked about the weather
  • Show magic tricks
  • Brag about materials
  • Talk about how you hacked into (read copy pasted/ stolen code/data) from someone

Docker desktop without full admin privileges.

Short answer it will not work in the long run.

The first problem I faced was this pop up with group membership error when trying to start.

Found the answer on the interweb.

net localgroup "docker-users" "<user_name>" /add

To create and modify group and add user, you will also need admin access. so keep your IT department on speed dial during this as well.

Even after this, I definitely saw other errors if you don’t have full admin privileges when trying to switch to windows containers, or starting the Docker engine service and during docker compose up.

So, realistically, I would not recommend running docker if you don’t have admin rights. But if you absolutely have to, just keep nagging IT for admin 😀

Show the number of Coveo results in facets within brackets

Last Thursday evening out of the blue, the client asked to see the result count inside of brackets. It is a very intuitive feature that gives the searcher an indication of the big picture when searching and filtering.

The PROBLEM:


The ASK:

We were using the Coveo Atomic component, but there was no reason to not show the results inside brackets as it was the default behavior anywhere else. After much debugging, there was no indication of why the numbers were not within brackets but the client wants what the client wants. so, we took a short and simple way of implementing it using CSS.

.coveo {
  .coveo-facet-value-count:before, .coveo-facet-value-count:before {
    content: "(";
  }
}

This solved all our problems and the client lived happily ever after.

~ Unless you are easily worried about everything, try not to stress. ~

Sitecore 9 training notes that are still valid for 10 but not for XM Cloud

Content, Templates & Renderings

Template Convention

Templates starting with an underscore are considered what kind of template:

  • “Parent” / Base templates

Sitecore allows for what kind of template inheritance

  • “Multiple”

What kind of template inheritance is bad?

  • Circular

Avoid what kind of field names?

  • “Duplicate”

How can you have duplicate field names? 

  • If they’re in different sections.  But use the “Title” field to hold the duplicate names and give the field actually different names.

Why would you limit available commands in the rich text editor?

  • Make it easier for content authors.
  • Prevent them from making content that doesn’t fit the site

Tokens

What does the $name token do?

  • Gets the name of the item

What does the $date token do?

  • Gets the current date (only date)

What does the $now token do?

  • Gets the current date & time

Content Structure Recommendations

What is the limit on child items?

  • “100”

What is the limit on item versions?

  • “10”

Sitecore image field rendering

When looking at the following code, what does mw and mh mean?

@Html.Sitecore().Field(“myImageField”, new {mw=120, mh=120})

  • Max width
  • Max height

What does the code above accomplish?

  • Caches the result on the server
  • Serves less data
  • Overrides author settings

Configuration

What does Sitecore call config groups?

  • “Layers”

What do the layers.config file do?

  • Defines the processing order

What’s the default order?

  • (base)
  • Sitecore layer
  • Modules
  • Custom
  • Environmental

What are the two syntaxes for changing values?

  • Patch
  • Set

Can Sitecore Rocks show the whole config?

  • True

What does Vertical Scaling do?

  • Use CM & CD environments, both do different things.

Where are server roles defined?

  • By an AppSetting in the web.config

What are the ways to go about extending Sitecore?

  • Package
  • Module
  • Update Package

What can Packages contain?

  • Code
  • Configuration
  • Serialized sitecore items, roles, and users

Users are installed disabled and passwords are reset, true or false?

  • True

Where are the modules found?

  • Modules are packages found on the Sitecore Marketplace

How are update packages defined?

  • Update packages have an .update extension
  • Installed via updateinstallationwizard.aspx page

What can Sitecore Rocks do to help undo a package installation?

  • Sitecore Rocks can make an anti-package
  • Has to be made before installing a package

Multisite Environment

Where are site nodes for a multisite environment stored?

  • Sitecore.config
  • Should use a separate patch file

Does order matter for Sitecore nodes?

  • Yes

Are sites added before or after the website node?

  • Before

What is included in the configuration?

  • Port
  • Hostname
  • Path url

In Sitecore 9, is it required to inherit from the standard rendering parameter template?

  • No
  • But you won’t get standard fields if you do
  • Previously was required for all Sitecore versions

Are compatible renderings a two-way setting?

  • No

Where are rendering parameters stored?

  • _rendering field

What is used to generate all links?

  • LinkManager

Why do we generate all links the same way?

  • So that all items are only indexed once

LinkManager

Var options = LinkManager.GetDefaultUrlOptions();

LinkManager.GetItemUrl(item, options);

  • Recommend single url for each page, not multiple URLs.
  • Can use canonical if different URLs are required for the same page

How does one produce translated urls?

  • By using the item’s display name property in the link manager

What do wildcard items do?

  • Allow you to use dynamic URLs
  • Match to any request

What is a wildcard item?

  • An item that is just an asterisk

How are navigation items typically made?

  • By inspecting the content tree
  • E.g. menus, dropdowns, parents and getchildren()

What is the recommended way of getting the sub-items in a branch?

  • ContentSearch recommended over GetDescendants.

Why does a foreach on a getchildren need Item vs var?

  • Var resolves as an object rather than an item

What is recommended as a way of preventing an item showing up in navigation?

  • “Exclude from navigation” field

What does it mean when Language Embedding is set to “As Needed”?

  • It means that the first request to a site will have the language embedded but after clicking the first link, the language will not show again until it is changed

Experience Editor

What foundation is the experience platform built on?

  • Exp management
  • xConnect
  • Exp database

What makes up Sitecore XP?

  • Exp Management
  • Marketing from xConnect
  • Exp Database

What is the name of the main screen of Sitecore?

  • The Launchpad

What does the view tab in the Experience Editor do?

  • Turns field highlighting on and off with “controls” checkbox

When are data and presentation?

  • Everywhere except for the rich text field

As of Sitecore 8.2 what service is now standalone?

  • Publishing

What two services makeup xConnect?

  • Collection
  • Search

Official Sitecore Documentation

What is the url for the Sitecore developer portal?

  • Dev.sitecore.net

What is the url for the Sitecore Documentation Site?

  • Doc.sitecore.net

What is the url for the Sitecore Developer Network?

  • Sdn.sitecore.net

What is the url for the Sitecore Knowledge Base?

  • Kb.sitecore.net

What is Sitecore’s Youtube Channel called?

  • Master Sitecore

Where do you find helix information for Sitecore?

  • Helix.sitecore.net

Where is Sitecore’s curated blog?

  • sitecore.net/learn/blogs/technical-blogs.aspx

What is the two main dll’s for Sitecore?

  • Sitecore.Kernal
  • Sitecore.MVC

What’s the best way to get the sitecore dlls?

  • Nuget feed

It’s recommending referencing dlls from where?

  • Separate folder

Can Sitecore Rocks synch folders?

  • True

In Sitecore Rocks, what does Mode Mirror do?

  • Syncs everything

In Sitecore ROcks, what does Mode Copy do?

  • Doesn’t sync deletions

What do you use to get current item?

  • Sitecore.Context.Item, OR
  • RenderingContext  ← this one

Where do you put items that need to be access by a URL?

  • Under the home item of the site

Creating Edit Frames

Where do you add buttons to Experience editor?

  • Core database

What does the edit frame do?

  • Makes part of the page clickable

Where do the edit frames live?

  • In Core
  • Under WebEdit / Edit Frame Buttons

What character is used to deliminate the field names?

  • Pipe

Search and Search Driven Components

What bulk operations can you do from Search in Sitecore?

  • Apply presentation
  • Add tag
  • Publish
  • Serialize

What kind of model does Search use?

  • Provider model

Name two search engines built into Sitecore?

  • Solr
  • Azure

What is the advantage of Azure Search?

  • High reliability – not really, but that’s the answer

Does sitecore index Data or Html?

  • Data

Do all search results have urls or presentation details?

  • No

Default index configuration indexes what?

  • All items and most fields
  • Except those based on a bucket related template

What is Sitecore’s basic unit?

  • Item

What does Sitecore index?

  • Document

Store vs Index

If StorageType = “yes” is set then what?

  • The entire content is stored in the index and can be retrieved from there.
  • The index is bigger
  • Index just keeps tokenized items

Name three different types of content in Sitecore can store in the same index?

  • Sharepoint
  • ERP
  • Sitecore items

Buckets

What is the max number of children?

  • 100

WIll urls change when items are converted into a bucket?

  • Yes

Who should make buckets?

  • Developers, not authors

What means when a standard value item is a bucket?

  • Items created from that template are also buckets

When do you use Synch – under Buckets?

  • When the configuration for the bucket or bucketed items has changed

If an item is hidden, in a bucket does it need to be bucketable to be hidden?

  • Yes

How do you retain parent-child relationships?

  • Click the lock child relationship” checkbox in the standard field

How best do you get bucket items?

  • Use ContentSearch api

When does a Linq query run?

  • When something like GetResults or ToList is invoked
  • Considered lazy loading

How do you do descendent-type searches?

  • Use the property “Paths” along with “Contains”

What does GetResult give?

  • Total number of search results hits property and facets

Custom QUery result types can be used in place of what?

  • SearchREsultItem

Predicate builder lets you do what?

  • Make complex searches at runtime (e.g. loops)

Facets have what?

  • Extension methods
  • Have conults (??? I don’t even remember what this was) of result values

Why should we use icons?

Why use buckets?

Why some items are not hidden inside a bucket?

How do you get items from a bucket that has thousands of items?

Which dll do you need to do a content search to build a menu?

Which dll do you need to get the model.rederingitem?

Where do we save the default values of an item?

Where should we save shared/common content in multi-site implementation?

Where are Sitecore indexes stored?

/data/indexes folder (I think)

What xml node is used in layers.config to set order?

How to get a custom subdomain for your Sitecore Content Hub instance.

You have a baby girl at home, but you want her to be potty trained?

You have a narrow garage and don’t have space to get out of your car after you park?

You just got a new phone but now you have to use Bluetooth headphones and they don’t fit inside your ear hole?

These are the problems I can’t help you with today. But I can help you by letting you know how to get a subdomain for your Content Hub instance.

  • you want to get a custom subdomain name for your content hub instance. so that it looks nicer and branded and easier to remember. Let’s say you want https://topaz.sitecorecontenthub.cloud
  • It’s a simple process. Create a Sitecore ticket. Follow the below screenshot when creating and Hank wil be your uncle.
  • That should be it. if there is anything I will come back here and edit the post.

~ If you put all your junk in your garage, you will have no room left for your cars. ~

Content Hub Web SDK – Programmatically update assets in Content hub from items in Sitecore

Getting the entity

IEntity entity = await _connector.Client.Entities.GetAsync(long.Parse(assetId));

assetId can be a string or a long. The string is mostly used when IDs look like an alphanumeric hash. If we want an image with asset Id of 99551 then use long.

Getting a relationship with an entity

IRelation relation = entity.GetRelation("AssetTypeToAsset");
IList<long> values = relation.GetIds();
//if (values.Count == 0) then we know there is no value set, otherwise there is already a value set for that relation

Setting up a related value

IEntity imageAssetEntity = await _connector.Client.Entities.GetAsync("M.AssetType.Custom");
IChildToOneParentRelation assetEntityRelation = await entity.GetRelationAsync<IChildToOneParentRelation>("AssetTypeToAsset");
assetEntityRelation.Parent = imageAssetEntity.Id.Value;
//This will set up the selected asset entity's AssetType as Custom

Set a property for an entity

string alt = item["Alt"] ?? "";
ICultureInsensitiveProperty altProperty = entity.GetProperty<ICultureInsensitiveProperty>("Alt");
altProperty.SetValue(alt);
//This will get the Alt field value of an item from sitecore and update an asset with that value in the Alt property

Sitecore Content Hub – Find an asset from the public link

I am using Content hub 4.2 and the client wants to know the asset ID, but all we have on the front end is the public key. With Anna‘s help, I got the below solution to work.

Step 1: Get the auth token

Make a POST call to https://subdomain.sitecorecontenthub.cloud/api/authenticate

JSON body should look like below

{
    "user_name": "topaz.ahmed@perficient.com",
    "password": "Vizient+2023"
}

This will return a token like below

{
    "token": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}

Step 2: Search for the public link

Suppose you have a public link that looks like

https://subdomain.sitecorecontenthub.cloud/api/public/content/qwertyuiopasdfghjklzxcvbnm?v=1

make a GET call to the below URL

https://subdomain.sitecorecontenthub.cloud/api/entities/query?query=Definition.Name==’M.PublicLink&#8217; AND FullText==’qwertyuiopasdfghjklzxcvbnm‘&skip=0&take=1

In the header of the call using the token from the previous step as X-Auth-Token

If the public link is found in Content Hub this will return JSON that looks something like this.

{
    "items": [
        {
            "id": 44923,
            "identifier": "95HiyeSDa0etMK3ZTMbofQ",
            "cultures": [
                "en-US"
            ],
            "properties": {
                "RelativeUrl": "eaeb36c088054d79b34636ef4e1e73dc",
                "Resource": "downloadOriginal",
                "ResourceType": "content",
                "VersionHash": "f1fd3bd2",
                "IsDisabled": false,
                "ExpirationDate": null,
                "Status": "Completed",
                "Progress": "The link is currently active.",
                "FileKey": "local-3dc41bebf9eb4788a4e85248efaffb6e",
                "ConversionConfiguration": null,
                "PublishStatus": null,
                "PublishStatusDetails": null
            },
            "relations": {
                "FileToPublicLink": {
                    "href": "https://<subdomain>.sitecorecontenthub.cloud/api/entities/44923/relations/FileToPublicLink"
                },
                "AssetToPublicLink": {
                    "href": "https://<subdomain>.sitecorecontenthub.cloud/api/entities/44923/relations/AssetToPublicLink"
                },
                "ThemeToPublicLinks": {
                    "href": "https://<subdomain>.sitecorecontenthub.cloud/api/entities/44923/relations/ThemeToPublicLinks"
                },
                "OrderToPublicLink": {
                    "href": "https://<subdomain>.sitecorecontenthub.cloud/api/entities/44923/relations/OrderToPublicLink"
                },
                "PageToPublicLink": {
                    "href": "https://<subdomain>.sitecorecontenthub.cloud/api/entities/44923/relations/PageToPublicLink"
                },
                "PublicLinkToWhereUsed": {
                    "href": "https://<subdomain>.sitecorecontenthub.cloud/api/entities/44923/relations/PublicLinkToWhereUsed"
                },
                "PublicLinkToUsage": {
                    "href": "https://<subdomain>.sitecorecontenthub.cloud/api/entities/44923/relations/PublicLinkToUsage"
                }
            },
            "created_by": {
                "href": "https://<subdomain>.sitecorecontenthub.cloud/api/entities/6729",
                "title": "The user who created the entity"
            },
            "created_on": "2023-02-28T16:11:16.4232379Z",
            "modified_by": {
                "href": "https://<subdomain>.sitecorecontenthub.cloud/api/entities/6",
                "title": "The user who last modified the entity"
            },
            "modified_on": "2023-02-28T16:11:20.7346984Z",
            "entitydefinition": {
                "href": "https://<subdomain>.sitecorecontenthub.cloud/api/entitydefinitions/M.PublicLink",
                "title": "The entity definition for this entity"
            },
            "copy": {
                "href": "https://<subdomain>.sitecorecontenthub.cloud/api/entities/44923/copy",
                "title": "Copy this entity"
            },
            "permissions": {
                "href": "https://<subdomain>.sitecorecontenthub.cloud/api/entities/44923/permissions",
                "title": "The permissions on this entity"
            },
            "lifecycle": {
                "href": "https://<subdomain>.sitecorecontenthub.cloud/api/entities/44923/lifecycle",
                "title": "The lifecycle action for this entity."
            },
            "saved_selections": {
                "href": "https://<subdomain>.sitecorecontenthub.cloud/api/entities/44923/savedselections",
                "title": "The saved selections this entity belongs to"
            },
            "roles": {
                "href": "https://<subdomain>.sitecorecontenthub.cloud/api/entities/44923/roles",
                "title": "Roles for this entity"
            },
            "annotations": {
                "href": "https://<subdomain>.sitecorecontenthub.cloud/api/entities/44923/annotations",
                "title": "Annotations for this entity"
            },
            "is_root_taxonomy_item": false,
            "is_path_root": false,
            "inherits_security": true,
            "is_system_owned": false,
            "version": 2,
            "self": {
                "href": "https://<subdomain>.sitecorecontenthub.cloud/api/entities/44923"
            },
            "renditions": {},
            "public_link": "https://<subdomain>.sitecorecontenthub.cloud/api/public/content/eaeb36c088054d79b34636ef4e1e73dc?v=f1fd3bd2"
        }
    ],
    "total_items": 1,
    "returned_items": 1,
    "offset": 0,
    "self": {
        "href": "https://<subdomain>.sitecorecontenthub.cloud/api/entities/query?skip=0&take=1&query=Definition.Name%3D%3D%27M.PublicLink%27%20AND%20FullText%3D%3D%27eaeb36c088054d79b34636ef4e1e73dc%27",
        "title": "This collection"
    }
}

Find the URL in the AssetToPublicLink relation.

Step 3: Find the asset

Grab the AssetToPublicLink URL from. use the same header as above and make a GET request.

you will a response like below

{
    "parents": [
        {
            "href": "https://<subdomain>.sitecorecontenthub.cloud/api/entities/66666"
        }
    ],
    "inherits_security": true,
    "self": {
        "href": "https://<subdomain>.sitecorecontenthub.cloud/api/entities/44923/relations/AssetToPublicLink"
    }
}

And there you go. 66666 is the Asset ID.

Enjoy it while it lasts, I mean until a new version of the API gets released and things change.

~ UPS is better than FEDEX. ~