Posts

Introduction To Sitecore OrderCloud

Image
Hello everyone, This is my first blog for Sitecore OrderCloud series. This is an introductory blog where we will try to understand basic concept about what is Sitecore OrderCloud, what are some common terminologies use in Order Cloud. In this blog we will also see how we can create our first market place in Sitecore OrderCloud. Lets understand what is Sitecore OrderCloud first. According to Sitecore, Sitecore OrderCloud powers unique ecommerce, order management, and marketplace solutions while following MACH( Microservices-based, API-first, Cloud-native, and Headless ) architecture. Sitecore OrderCloud gives a platform in form of portal as well as expose Rest API where you can build whole backend system require for and ecommerce solution.Everything inside Sitecore OrderCloud is exposed through rest api which any front end ecommerce application can easily integrate and use it. Sitecore OrderCloud supports B2B, B2C and B2X business model Some basic concept in Sitecore OrderCloud are ...

My Sitecore Upgrade Learnings Part 2

Image
Hello Everyone, This is second part of  My Sitecore Upgrade Learnings. In previous part we have seen, how to upgrade Sitecore from one version to another. You can refer the same in link Part1 . In this blog, we will try to cover the backend code part upgrade required for the same. There are many ways in which we can upgrade the code part listed below. Updating the Sitecore DLL using Package Manager Console for all the projects in your current solution Using a Powershell Script to update the Sitecore DLL for all the projects in your current solution The First option is fairly simple. Open any project of your solution, Click on references --> Manage Nuget Package. Once Nuget Package is open, then you will see the installed version of Sitecore DLL. Click on Update tab and you will be able to see the updated version. Just select the version as per your need and click on update. It will also update all the dependent DLL for that version. There is one more option to update th...

My Sitecore Upgrade Learnings Part 1

Image
Hello Everyone, In this blog I will share my learnings and experience while working on Sitecore upgrade project. Recently we migrated our Sitecore solution from 9.2 with SXA to Sitecore 10.2 with SXA. I will also share my experience regarding what was our approach to implement the same. Sitecore already have a very good document which clearly explains what is needed to upgrade the Sitecore version. If you are upgrading from version prior to Sitecore 9 that this blog will not be that much useful but still you can refer this for some learning purpose. So let's get started. We were having a Sitecore managed cloud in 9.2 with compatible SXA 1.9 installed on it. We started with following approach mentioned below. We got a new Sitecore Manage cloud instance with 10.2 version We installed the Compatible Sitecore PowerShell (6.3 IAR) and SXA version (10.2.0) with respect to 10.2 After successful installation on CM environment, we required to deploy respective SXA modules on CD environmen...

OAuth 2.0 and OpenID implementation in Sitecore Website

Image
Hello everyone, In this blog we will try to see how we can implement OAuth 2.0 and OpenID for Authentication and Authorization. In previous blog post we discuss what is OAuth 2.0 and OpenID and how Sitecore uses the same for Authentication and Authorization. This blog will give you a basic idea that how we can follow Sitecore approach to integrate third party Identity provider. So let's get started. Would recommend everyone to read my previous article on OAuthAndOpenID The first step will be, to create a client page with login button. This button will be responsible for transfering you to Identity Server. We will see how Sitecore does it and will try to use the same logic for our login button logic. Create a Login Controller. This controller will give us the required SignInInfo details which will be passed to Identity Server. You can refer below code. We have created a Login Action method which will call the GetSignInInfo method to get the identity url protected readonl...

Understanding OAuth 2.0 and OpenID Connect with Sitecore

Image
Hello everyone, In this blog we will try to understand Federated Authentication and Authorization concept and will try to see how Sitecore uses this concepts to perform Authentication and Authorization. Let's begin. We will see basic terminology like OAuth 2.0, OpenID Connect etc. which is mostly used in implementing the Federated login mechanism. OAuth 2.0 : OAuth 2.0, which stands for “Open Authorization”, is a standard designed to allow a website or application to access resources hosted by other web apps on behalf of a user. OpenID : OpenID is a unified user identification method released as an open standard that essentially acts as a single user identification system that can be used across multiple websites. It is a wrapper made on top of OAuth 2.0 which provide the functionality of Authentication. Resource Owner : User who is trying to login on an application Client : An Application which provide the interface where user can click on Sign In button. Authorization Server ...

Steps to Enable Sitecore Analytics and Verify Data flow to Shard Databases

Hello everyone, This blog will help us to understand what settings are required to enable Sitecore Analytics in newly installed Sitecore instance. We will also see one common errors which get logged in our logs after setting up of our local instance. We will see the steps required to solve the same. Without wasting time, let's start with the steps. Steps to enable Analytics and verify data is flowing to Shard DB or not 1. Changed the below settings to true in the indexersettings.xml file in xconnect webroot   Path:C:\inetpub\wwwroot\xconnectinstance\App_Data\jobs\continuous\IndexWorker\App_Data\config\sitecore\SearchIndexer      o IndexPIISensitiveData      o IndexAnonymousContactData 2. Rebuilt the xconnect indexes using the following command. Refer  Rebuild XConnectIndex  for same. Path: C:\inetpub\wwwroot\xconnectinstance\App_Data\jobs\continuous\IndexWorker      o Sitecore.XConnectSearchIndexer -rr 3. Rebuilt the Sitecore i...

Understanding Sitecore Role And Virtual User Creation With Use Case

Image
Hello everyone, I am back with another blog. In this blog we will try to understand, how we can create a new Sitecore Domain, how we can create a new Sitecore Role and how we can use the role to restrict the user in backend system from accessing the items in Sitecore. Will try to keep this blog as short as possible. So let's begin. We will try to understand all the above concepts using a use case. This came as a requirement for one of our project. Recently, we got an requirement to restrict some of the logged in user in our website from accessing some of the pages in Sitecore. To overcome this requirement, we have done it by implementing Sitecore Roles and Concept of virtual user in our code behind. Below is the steps which I followed. Step 1: Create a new domain in Sitecore. There are few inbuilt domain which Sitecore automatically provides like Extranet, Sitecore etc. But for our understanding we will create everything new. Go to launchpad once you have logged into Sitecore. In l...

Custom SXA Search Scope Query Token

Image
Hello everyone, In this blog we will see how we can use a custom token in SXA search scope query. What is custom search scope query token and when it is useful. So let's start with understanding what is SXA search scope query token. We all are aware like how search is an important and integral part of any website built using Sitecore. Specially when we are building a website using SXA then most of the time we use Search Result OOTB SXA component for any kind of listing. The Search Result OOTB component primary requirement is Search Scope query. We can build the scope query from Sitecore only where we can define things like Location, Templates etc. Location: Used to help the Solr to get data from specific folder Templates: Used to filter the Sitecore items created from specific templates Many of the time, this suffice to build your search scope query to get the desired results. But we all know, there are times that we need something different from normal scope query to get our resul...

Different ways of Storing Page URL while session expires or User Logout

Hello everyone, In this blog, we will discuss few ways to store last access URL for the users so that we can provide seamless login and same journey for the user.  So recently we got same kind of requirement, where we wanted user to get the last access page if session expires or user is logged out mistakenly. We started exploring different ways. First thing came in mind was to use query string parameter to pass the last access web URL of the page. This works absolutely fine but there are situation where the web page URL can have appended query string parameters. So it will be difficult to pass URL with query string as parameter to login page URL. Also if there are security mechanism like WAF implemented on your website then, there is a high chance it will not allow query string to pass from non-authenticated pages to your controller. This was the same scenario which we were facing. Somehow, the query string was removed automatically while the user was redirecting to login page wh...

Custom Table To Store Sitecore Analytics data in Reporting Database Part 2

Hello everyone, this is continuation to previous blog, Part 1 of this series where we have seen, steps to create custom table in reporting database. Link for the same is here Part 1 This part, we will be concentrating more one the code logic required to update data in the custom table. Let's start with the code part without any delay. We will create 4 classes respectively: CampaignVisitKey.cs : Which will have the key on which the table entry will be done CampaignVisitValue.cs : The value for our columns which will be inserted CampaignVisit.cs : This class is inheriting from Fact table. It merges the current datatable of Campaign visits to existing table CampaignVisitProcessor.cs : This processor executes the actual logic of reading and assigning the values to our model. Let's see the code for all the classes one by one CampaignVisitKey.cs using Sitecore.Analytics.Aggregation.Data.Model; using System; using System.Collections.Generic; using Syste...