Sitecore Questions 04122023
Sitecore Questions 04122023
Core Pipelines
This chapter describes the pipelines defined within the
/configuration/sitecore/pipelines element in the web.config file. These
pipelines tend to define system processes and are sometimes referred to as core
pipelines.
This chapter contains the following sections:
HttpBeginRequest Pipeline
DMS Pipelines
The DMS introduces additional pipelines through the
Sitecore.Analytics.config include file. It also adds processors to existing
CMS pipelines.
Overview
This section describes the important pipelines that are specific to the Sitecore
Digital Marketing
System (DMS).
The Sitecore Digital Marketing System (DMS) uses the
/App_Config/Include/Sitecore.Analytics.config file to define several pipelines and
update pipelines in the Web.config file.
2-: What is UserSwitcher() and SecurityDisabler() and for what purpose it is used?
A-: Sitecore request are executed in the context of the current user. In non logged
in case, request are made in the context of anonymous user.
For editing an Item, a user should have proper permission. So both
UserSwitcher() and SecurityDisabler() are used to change the security context
in Sitecore.
>Custom Layer :: Contains the patch files you create in order to modify
settings in the default Sitecore configuration. Files related to this layer
is stored in "Include" folder inside "App_Config" folder.
>Environment Layer :: Contains the patch files you create to configure Sitecore
for different environments. Files related to this layer is stored
in "Environment" folder inside "App_Config"
folder.
Layers execution of sequence :: Sitecore --> Modules --> Custom --> Environment
>Reporting :: Fetches reporting data from various data sources, such as the
collection and reporting databases, to use in Sitecore reporting application.
8-: How role based configuration is done in Sitecore 9 and above version?
A-: Sitecore allowed developers to define your server instance role in the
App.config.
You can have your own role and multiple roles to the single instance
In the patch file you can configure which instance the configuration is
applied.
<agent type="Sitecore.Tasks.HtmlCacheClearAgent"
role:require="ContentDelivery">
<patch:attribute name="interval">00:10:00<patch:attribute>
</agent>
We can use "OR", "AND" and "NOT" operators to configure the configuration in
Sitecore.
>https://mywebsite.com
>https://mywebsite.com
>https://mywebsite.com/a
>https://mywebsite.com/b
using Sitecore.Pipelines
namespace Sitecore.Foundation.Custom.Pipeline
{
public class CustomPipelineArgs : PipelineArgs
{
//Your Arguments
public string MyArgs {get; set;}
}
}
namespace Sitecore.Foundation.Custom.Pipeline
{
public class CustomProcessor
{
public void Process(CustomPipelineArgs args)
{
//Your logic
}
}
}
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<pipelines>
<CustomPipeline>
<processor
type="Sitecore.Foundation.Custom.Pipeline.CustomProcessor,
Sitecore.Foundation.Custom.Pipeline" />
</CustomPipeline>
</pipelines>
</sitecore>
</configuration>
Step 2 :: Overwrite the constructor of the existing process class like below
public CustomSiteResolver(BaseSiteContextFactory
siteContextFactory) : base(siteContextFactory)
{}
protected CustomSiteResolver(BaseSiteContextFactory
siteContextFactory, bool enableSiteConfigFiles) : base(siteContextFactory,
enableSiteConfigFiles)
{}
Step 3 :: Then you have to write the Process and if you have any arguments to
be customized then you have to inherit the Process class in arguments class
using Sitecore.Pipelines.HttpRequest;
namespace Sitecore.Foundation.Custom.Pipelines
{
public class CustomSiteResolver : SiteResolver
{
public CustomSiteResolver(BaseSiteContextFactory
siteContextFactory) : base(siteContextFactory)
{}
protected CustomSiteResolver(BaseSiteContextFactory
siteContextFactory, bool enableSiteConfigFiles) : base(siteContextFactory,
enableSiteConfigFiles)
{}
Step 4 :: Create the patch file and add the configuration to overwrite the
Process
<configuration
xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<pipelines>
<httpBeginRequest>
<processor
type="Sitecore.Foundation.Custom.Pipeline.CustomSiteResolver,
Sitecore.Foundation.Custom.Pipeline"
patch:instead="processor[@type='Sitecore.Pipelines.HttpRequest.SiteResolver,
Sitecore.Kernel']" />
</httpBeginRequest>
</pipelines>
</sitecore>
</configuration>
Workflows
Sample Workflow ================================Workflow
Draft --------------------------------State
Submit -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=Command
_OnSave
Awaiting Approval -------------------------State
Approve with Test
Validation Action
Launch Create Test Dialog ~~~~~~~~~~~Action
Approve =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=Command
Validation Action ~~~~~~~~~~~~~~~~~~~Action
Reject =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=Command
Approved ---------------------------------State
Auto Publish ~~~~~~~~~~~~~~~~~~~~~~~~~~~Action
An item bucket is a container that you can use to hide many items and still
eaisily retrieve and work with these items. The only way to find bucket
items is to use the Sitecore search engine.
So, the best practice is to have maximum 100 items under node for better
performance. Also if tree structure or you can say parent-child relationship is
not important
Once you click on the bucket then it will convert that folder into item
bucket.
19-: What will happen when you add any new item in the node/folder you have made as
item bucket?
A-: We will get below mentioned warning:
Warning on the Item - Item is not made bucketable thus not hidden
For adding any new item in the bucket, we should make it bucketable which
can be done at Item Level or Standard Value level.
-Go to standard values of the template and select "Buckets" checkbox in View
Menu
-Go to "Item Buckets" section and select "Bucketable" checkbox.
Now if you add any item of same template in a bucket(Folder/Node), you will
see by default date wise folder structure. There is an Insert Option for
"Saved Search" which allows user to quickly find items in a bucket based on
previous searches.
>sitecore\anonymous - A user who only has access to the login screen of the
website. This is used for users who will go on to access the application
framework section of the website.
22-: Role A
Role B
Role C
Step 1:: Create Sitecore roles in Sitecore with same name as in external
service.
Step 2:: Apply permission to Sitecore Items as per the requirement to your
role in the security editor.
Step 3:: Now on login button, authenticate your user against external
service and external service will return you the user object
You would need unique user id and the role of next step.
Step 4:: Build virtual user in external Sitecore domain using unique user id
which you must have got from external service.
Step 5:: Add role (as mentioned in Step 1 it should be same as Sitecore
Role) to user.
Step 6:: You can setup custom properties if needed to the Virtual user if
needed.
AuthenticationManager.BuildVirtualUser("external\\username",true);
-Add Role:
virtualUser.Roles.Add(Sitecore.Security.Accounts.Role.FromName("extranet\\
Role A"));
-Log In
Sitecore.Security.Authentication.AuthenticationManager.LoginVirtualUser(virtualUser
);
1> Item Level Fallback - It enables you to setup an 'empty' item version in
a given language so that it falls back to another language version,
including all its field.
2> Field Level Fallback - It enables you to specify on a single field, which
field values that you want to localize and which field values that
you want to fall back to another
language.
Attributes are
- enableItemLanguageFallback
- enableFieldLanguageFallback
<sites>
<site name="shell">
<patch:attribute
name="enableItemLanguageFallback">true</patch:attribute>
<patch:attribute
name="enableFieldLanguageFallback">true</patch:attribute>
</site>
<site name="website">
<patch:attribute
name="enableItemLanguageFallback">true</patch:attribute>
<patch:attribute
name="enableFieldLanguageFallback">true</patch:attribute>
</site>
</sites>
Cd Server -> Session DB -> Collection DB -> Processing Server -> Reporting
DB -> Reporting Service -> Reporting Application
1> Whenever a user interact with the website, then that data is stored in
the "Session DB(Private, Shared)"
2> Once that session is flushed it get stored in the "Collection DB" in the
Contact, History & Automation" type of a data.
3> The data stored in the "Collection DB" are raw data. So that raw data is
converted into reportable format by "Processing & Aggregation" and
converted and stored into "Reporting DB".
4> Then "Reporting Service" is used to extract the information which can be
displayed on the "Reporting Application".
Now these data are stored using "Sharding" mechanism where 2 different types
of databases are there.
1> Shard database which are used to store contacts, interactions and device
profiles(sitecoreInstanceName__Xdb.Collection.Shared0)
2> Shard map manager database which is used to manage the multiple shard
dbs(sitecoreInstanceName__Xdb.Collection.ShardMapManager)
Experience data is sharded in the following way:
So to maintain the integrity of the data among all the roles of the sitecore
services like "Reference Data Service", "xDB Processing", "Marketing Automation
Engine",
"Marketing Automation Operations service" are refering to the "xDB Reference
Data database".
##### INDEXING
###################################################################################
##
Now from command prompt you can chk the java installed version
like below"
Step 4: Run command prompt in admin mode and go to Solr bin path and then
type "solr start" like below
C:\solr-8.11.2\solr-8.11.2\solr start
Once done will a message like "Started Solr server on port 8994.
Happy searching."
<AppSettings>
<add key="search:define" value="Solr" />
</AppSettings>
-Enable a Search Provider: This setting tells the Sitecore that Solr is
enabled
1> RebuildAfterFullPublishStrategy
3> OnPublishEndAsyncSingleInstance
4> IntervalAsynchronousUpdateStrategy
5> SynchronousStrategy
6> RemoteRebuildStrategy
7> ManualStrategy
<strategies hint="list:AddStrategy">
<strategy
ref="contentSearch/indexConfigurations/indexUpdateStrategies/manual"
role:require="ContentManagement and !Indexing //>
<strategy
ref="contentSearch/indexConfigurations/indexUpdateStrategies/intervalAsyncMaster"
role:require="Standalone or (ContentManagement and Indexing) //>
</strategies>
<strategies hint="list:AddStrategy">
<strategy
ref="contentSearch/indexConfigurations/indexUpdateStrategies/manual"
role:require="(ContentManagement and !Indexing) or (ContentDelivery and !
Indexing) //>
<strategy
ref="contentSearch/indexConfigurations/indexUpdateStrategies/onPublishEndAsyncSingl
eInstance" role:require="Standalone or (ContentManagement and Indexing) //>
</strategies>
<strategies hint="list:AddStrategy">
<strategy
ref="contentSearch/indexConfigurations/indexUpdateStrategies/manual"
role:require="ContentManagement and !Indexing) //>
<strategy
ref="contentSearch/indexConfigurations/indexUpdateStrategies/intervalAsyncCore"
role:require="Standalone or (ContentManagement and Indexing) //>
</strategies>
You can use this strategy if you have multiple indexes that cover the same
database with published content.
Use this strategy for the master database indexes and for single-server
environments where you want to use as few resources as possible.
-RemoteRebuild can be combine with any other strategy. You can then trigger
a full rebuild from one CM server, and all remote servers where the index is
configured
with this strategy will rebuild.
-Manual strategy Do not combine this strategy with any other strategy. It is
reserved for special situations where you have to outsource the whole indexing
process to
a dedicated server and you do not want any index updates on other Sitecore
instances environments where you want to use as few resources as possible.
>Populate Solr Managed Schema - Solr uses a defined schema when it works
with documents. You can modify an existing schema with the Populate Solr Manager
Schema tool.
This tool automatically populates Sitecore fields and makes sure all fields
that Sitecore needs are present.
So a Dynamic field is just like a regular field except it has name with a
wildcard in it. When you are indexing documents, a field that does not match any
explicitly
defined fields can be matched with a dynamic field.
<fieldMap type="Sitecore.ContentSearch.SolrProvider.SolrFildMap,
Sitecore.ContentSearch.SolrProvider>
<typeMatches hint="raw:AddTypeMatch">
...
<typeMatch typeName="guid" type="System.Guid"
fieldNameFormat="{0}_s" />
<typeMatch typeName="string" type="System.String"
fieldNameFormat="{0}_s" />
<typeMatch typeName="text" type="System.String"
fieldNameFormat="{0}_t" />
<typeMatch typeName="int" type="System.Int32"
fieldNameFormat="{0}_tl" />
<typeMatch typeName="bool" type="System.Boolean"
fieldNameFormat="{0}_b" />
<typeMatch typeName="datetime" type="System.DateTime"
fieldNameFormat="{0}_tdt" />
<typeMatch typeName="long" type="System.Int64"
fieldNameFormat="{0}_tl" />
<typeMatch typeName="float" type="System.Single"
fieldNameFormat="{0}_tf" />
<typeMatch typeName="double" type="System.Double"
fieldNameFormat="{0}_td" />
...
</typeMatches>
-If Sitecore has a field with name "amount" and field type is "number" then
you do not need to map this manually in SOLR.
-Sitecore maps the Sitecore "number" type field to the Solr "float" type
field in the "AddFieldByFieldTypeName" section.
<fieldTypes hint="raw:AddFieldByFieldTypeName">
<fieldType fieldTypeName="number" returnType="float" />
...
</fieldTypes>
-Sitecore replaces the {0} part with the Sitecore "amount" field name to
become the Solr "amount_tf" filed name.
<typeMatches hint="raw:AddTypeMatch">
<typeMatch typeName="float" type="System.Single"
fieldNameFormat="{0}_tf"
settingType="Sitecore.ContentSearch.SolrProvider.SolrSearchFieldConfiguration,
Sitecore.ContentSearch.SolrProvider" />
...
</typeMatches>
-Sitecore indexes the Sitecore "number" type field named "amount" as a Solr
dynamic "float" type field named "amount_tf".
-When Sitecore looks for a filed name, it tries to match the exact name. If
there is no exact match, Sitecore removes any cultural suffixes and Solr dynamic
field
Step 4: In the
"Sitecore.ContentSearch.Solr.DefaultIndexConfiguration.config" configuration file,
locate <fields hint="raw:AddComputedIndexField">
<?xml version="1.0"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<contentSearch>
<indexConfigurations>
<defaultSolrIndexConfiguration
type="Sitecore.ContentSearch.SolrProvider.SolrIndexConfiguration,
Sitecore.ContentSearch.SolrProvider">
<documentOptions
type="Sitecore.ContentSearch.DocumentBuilderOptions, Sitecore.ContentSearch">
<fields
hint="raw:AddComputedIndexField">
<field
fieldName="nameOfComputedIndexField" returnType="string">
YourNamespaceHere.ComputedFields.IsClone, YourNamespaceHere
</field>
<sitecore>
</documentOptions>
</defaultSolrIndexConfiguration>
</indexConfigurations>
</contentSearch>
</sitecore>
</configuration>
00-: Index Optimization.
A-:
Check: Sitcore.ContentSearch.Solr.DefaultIndexConfiguration.config
<documentOptions
type="Sitecore.ContentSearch.SolrProvider.SolrDocumentBuilderOptions,
Sitecore.ContentSearch.SolrProvider">
<!-- This flag will index all fields by default.This allows new fields
in your template to automatically be included into the index.
You have two choices :
1) Set this to true and place all the fields you would like to
remove in the "ExcludeField" list below.
2) Set this to false and place all the fields you would like to
be indexed in the "IncludeField" list below.
-->
<indexAllFields>true</indexAllFields>
<BucketFolderTemplateId>{F599BF48-D6FE-40DC-9F78-CF2D56BFB657}</BucketFolderTemplat
eId>
<ProductTemplateId>{47D1A39E-3B4B-4428-A9F8-B446256C9581}</ProductTemplateId>
</exclude>
<__DefaultWorkflow>{47D1A39E-3B4B-4428-A9F8-B446256C9581}</__DefaultWorkflow>
...
</exclude>
-In Master indexes all the version of the content is getting stored
-You should make sure not more 10 versions of items get created.
-You can use marketplace tools to limit versions.
-Ideally you want to index only the latest version of the item.
-You can index inbound filter pipeline to store only latest version of an
item.
-Configure your index crawlers to include only the portion that it needs to
crawl and index.
namespace MyNamespace
{
public class InboundIndexVersionFilter :
Sitecore.ContentSearch.Pipelines.IndexingFilters.InboundIndexFilterProcessor
{
public override void
Process(Sitecore.ContentSearch.Pipelines.IndexingFilters.InboundIndexFilterArgs
args)
{
var item = args.IndexableToIndex as
Sitecore.ContentSearch.SitecoreIndexableItem;
if (item != null && item.Item != null && !
item.Item.Versions.IsLatestVersion())
{
args.IsExcluded = true;
}
}
}
}
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<pipelines>
<indexing.filterIndex.inbound>
<processor type="MyNamespace.InboundIndexVersionFilter,
MyNamespace" />
</indexing.filterIndex.inbound>
</pipelines>
</sitecore>
</configuration>
3> Index only required content locations - If you never intend to search for
content within a specific location of your content tree (such as templates,
layouts or maybe even media), you can configure your index crawlers to
include only the portion that it needs to crawl and index. Do keep in mind that
if you adopt this approach with your master indexes, the Search
functionality in some of the Sitecore authoring scenarios will not show the
excluded
content – Search tab, Quick Search, Search option in Media Browser dialog
and Copy Presentation Details dialog, etc.
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<contentSearch>
<configuration
type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch">
<indexes>
<index id="sitecore_master_index">
<locations>
<crawler name="content"
type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
<Database>master</Database>
<Root>/sitecore/content</Root>
</crawler>
<crawler name="media"
type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
<Database>master</Database>
<Root>/sitecore/media library</Root>
</crawler>
</locations>
</index>
</indexes>
</configuration>
</contentSearch>
</sitecore>
</configuration>
-Multisite scenerio you can create an index per site that is configured to
include only the items that belongs to the site content node.
-At the same time, you may also have the default Sitecore indexes which
includes every content in Sitecore by default.
-Crawl the Sitecore node using seperate crawler per index.
<indexes>
<index id="sitecore_web_index_MainWebsite">
<locations hint="lizt:AddCrawler">
<crawler name="mainwebsite"
type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
<Database>web</Database>
<Root>/sitecore/content/Main Website</Root>
</crawler>
</locations>
</index>
<index id="sitecore_web_index_BrandWebsite">
<locations hint="lizt:AddCrawler">
<crawler name="brandwebsite"
type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
<Database>web</Database>
<Root>/sitecore/content/Brand A</Root>
</crawler>
</locations>
</index>
</indexes>
-CMS Server uses master and webpreview databases then corresponding master
and webpreview index should be on the CMS server
-CD server uses web database then it should have only web indexes.
7> Keep your indexing pipeline clean and remove unused pipelines.
8> Keep your customizatkon logic minimum and light which includes your
computed fields also.
-contentSearch.Indexing.DisableDatabaseCaches:
Step 1: Get the index which you want to use by using "ContentSearchManager".
Step 3: Last step is to query the index for which you have to use
"GetQueryable<T>"
By default the API will map to the "SearchResultItem" class for the result.
Example2::
predicate = predicate.And<SearchResultItem>(item.Language ==
Context.Language.Name);
##### CACHING
###################################################################################
##
2> Partial page caching - Similar to page caching, except that it provides a
mechanism to cache only portions of page.
Step 2: Start a load test that hits all items in all languages - We have
different tools to do load testing. So we have to test following things here:
Content Delivery-
Content Management-
A cache is considered
stable when the Delta value remains relatively consistent. Significant fluctuations
in the cache
delta indicates that the
cache is regularly exceeding max size and being scavenged. The maximum amount of
memory that you
can assign to caches
depends on the amount of memory available in the system.
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<sites>
<site name="website" set:htmlCacheSize="300MB></site>
<site name="customsite" set:htmlCacheSize="300MB></site>
</sites>
</sitecore>
</configuration>
-cacheHtml = true Sitecore clears caches - Sitecore clears cashes and update
it with new values. The publish:end event handler is configured in a standard
installation to
do so.
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"
xmlns:set="http://www.sitecore.net/xmlconfig/set/"
xmlns:role="http://www.sitecore.net/xmlconfig/role">
<sitecore>
<databases>
<database id="web" role:require="ContentDelivery or
Standalone">
<cacheSizes>
<data>1000MB</data>
<items>1000MB</items>
</cacheSizes>
</database>
<database id="master" role:require="ContentManagement or
Standalone">
<cacheSizes>
<data>1000MB</data>
<items>1000MB</items>
</cacheSizes>
</database>
</databases>
</sitecore>
</configuration>
-Prefetch cache
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"
xmlns:set="http://www.sitecore.net/xmlconfig/set/"
xmlns:role="http://www.sitecore.net/xmlconfig/role">
<sitecore>
<databases>
<database id="web" role:require="ContentDelivery or
Standalone">
<dataProviders>
<dataProvider param1="$(id)">
<prefetch hint="raw:AddPrefetch>
<cache>1000MB</cache>
</prefetch>
<dataProvider>
</dataProviders>
</database>
<database id="master" role:require="ContentManagement or
Standalone">
<dataProviders>
<dataProvider param1="$(id)">
<prefetch hint="raw:AddPrefetch>
<cacheSize>1000MB</cacheSize>
</prefetch>
<dataProvider>
</dataProviders>
</database>
</databases>
</sitecore>
</configuration>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"
xmlns:set="http://www.sitecore.net/xmlconfig/set/"
xmlns:role="http://www.sitecore.net/xmlconfig/role">
<sitecore role:require="ContentManagement or ContentDelivery or
Standalone">
<settings>
<setting name="Caching.AccessResultCacheSize"
value="200MB">
</settings>
</sitecore>
</configuration>
If cache memory usage exceeds available memory, the application will crash
and throw an OutOfMemoryException exception.
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<settings>
<setting name="Caching.DisableCacheSizeLimits"
set:value="true">
</settings>
</sitecore>
</configuration>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"
xmlns:set="http://www.sitecore.net/xmlconfig/set/">
<sitecore>
<settings>
<setting
name="Caching.CacheKeyIndexingEnabled.AccessResultCache" set:value="true">
<setting name="Caching.CacheKeyIndexingEnabled.ItemCache"
set:value="true">
<setting
name="Caching.CacheKeyIndexingEnabled.ItemPathsCache" set:value="true">
<setting name="Caching.CacheKeyIndexingEnabled.PathCache"
set:value="true">
</settings>
</sitecore>
</configuration>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"
xmlns:set="http://www.sitecore.net/xmlconfig/set/">>
<sitecore>
<settings>
<setting name="Caching.SmallCacheSize" set:value="200KB">
</settings>
</sitecore>
</configuration>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"
xmlns:set="http://www.sitecore.net/xmlconfig/set/">>
<sitecore>
<settings>
<setting name="Caching.TinyCacheSize" set:value="100KB">
</settings>
</sitecore>
</configuration>
2> Method DI - In this case inject the dependency into a single method and
generally for the use of that method.
It could be useful where whole class does not need
the dependency and only one method having the dependency.
3> Property DI - In this case inject the dependency into a single method and
generally for the use of that method.
It is recommended using when a class has optional
dependencies or where the implementations may need to be swapped.
Does not require the creation of a new object or
modifying the existing one without changing the object state it could work.
3> You can use mock databases with dependency injection, and test your
application without affecting the actual database.
4> Easy to implement more modularized code and promote reusability without
any code changes.
5> Highly maintainable code.
00-: Methods to define the scope of the service that is going to create.
A-: Below are the methods that is used to define the scope of the service:
1> AddTransient - The services are created each time they're requested. It
means on every request a new object is created.
2> AddScoped - The services are created once per client request. It means an
object is created once for each user.
3> AddSingleton - The services are created for the first time they are
reqursted and then every subsequent request will use the same.
Step 1: Create a register dependency class and for that we have to add 2
namespaces mentioned below:
Microsoft.Extensions.DependencyInjection;
Sitecore.DependencyInjection;
2nd> Also have to give the dependency of the controller (for ex.
'SampleCompController').
serviceCollection.AddTransient(typeof(ISampleCompManager),
typeof(DisplayDataService));
serviceCollection.AddTransient(typeof(SampleCompController));
}
}
Step 5: Next we have to register the Service Configurator via config file
like below:
<?xml version="1.0"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<services>
<configurator
type="SitecoreWithDI.Feature.SampleComp.Configurators.RegisterDependencies,,
SitecoreWithDI.Feature.SampleComp" />
</services>
</sitecore>
</configuration>
1> Event handler - You can receive information about supported system
events. Ex- Event handler to send a request to a specified URL when an item
with the webpage templated is created.
2> Submit action - You can receive information when an item changes workflow
state or when a workflow command runs. Ex- Webhook when an item using
the workflow moves to the approved state.
3> Validation action - You can provide a third-party service the ability to
approve or reject changes in the workflow state of an item, by creating
a webhook validation action. When a
webhook validation action sends a request, third-party service must return a
response.
##### Personalization
###################################################################################
##
The goal is to deliver more relevant and engaging content to each visitor,
thereby enhancing their overall experience and increasing the likelihood of
achieving desired outcomes, such as convirsions or customer satisfaction.
Personalization
___________
______________________
Experiences
Data-gathering methods
________________________ ____________________
________________ ________________
Interruptive experiences Seamless experiences
Explicit Website Implicit Website
______________
Behavior-Based
website's content)
__________
Contextual
(Personalizes the experience of a visitor
2. Machine-Learning Personalization
•
Provide alternate option
on no
search result page
00-: XM Cloud
A-: -SaaS based solution.
-Upgrade will be done by Sitecore.
-Infrastructure management and maintenance, security maintenance, and
scalability will be managed by Sitecore.
-It does not have CDs at all but only serves content via highly available
Edge APIs.
-Reduces bottleneck of Sitecore developers availability.
-Cloud portal: Dashboard of the organization. Based on your subscription all
tools will be at one place.
-Sitecore Experience Edge is a content delivery service that provides
scalable, globally replicated access to Sitecore Experience Platform
items, layout and media through an API. It uses CDN networks to distribute
published content across the globe, ensuring a fast experience at scale.
-GraphQL schema is used to query the content.
-Custom search indexes are no longer available and one has to select from a
choice of composable options: Sitecore search, Coveo or Algolia.
-A cut version of Sitecore Personalize comes built into Pages interface of
XM Cloud to allow for basic view event personalization.
-Boxever page-level analytics tool is embeded.