Posts

Sitecore - Extending Coveo results with CoveoProcessParsedRestResponseArgs

There are some cases where we need to modify, on the fly, the results that Coveo gives us for certain queries. In order to achieve this, we will tap into the coveoProcessParsedRestResponse pipeline.

First, we need to modify the Coveo.SearchProvider.Rest.Custom.cfg and add our new processor: 
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <pipelines> <coveoProcessParsedRestResponse> <processor type="XXX.XXX.XXX.RecommendationsProcessor, XXX.XXX.XXX" /> </coveoProcessParsedRestResponse> </pipelines> </sitecore> </configuration>
Let's now create the processor we specified on the patch above, this processor will be in charge of modifying the results, it should look something like this:

public class RecommendationsProcessor : IProcessor<CoveoProcessParsedRestResponseArgs> { public void Process(CoveoProcessParsedRestRespons…

Sitecore Constants

I have seen a lot of projects where developers create constants or hardcode things that do not need to be hardcoded. This post will serve as an example so that developers are aware of the constant values that already come with the Sitecore binaries. I will not include all the constants since there are a lot, but I will go over the most important ones. These constants have been tested with Sitecore 9.1:

Sitecore.Constants: AnonymousUserName = "Anonymous" AshxExtension = "ashx"AspxExtension = "aspx"ContentPath = "/sitecore/content"CoreDatabaseName = "core"DefaultAspNetSessionIdCookieName = "ASP.NET_SessionId"DefaultCulture = "en-US"EmailRegExp = "^\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$"EveryoneRoleName = "Everyone"GuidLength = 38MediaLibraryPath = "/sitecore/media library"MediaRequestPrefix = "-/media/"MinimalPageEditorRoleName = "sitecore\\Sitecore Minimal…

Sitecore User Group Conference (SUGCON) 2019 - Recap

Image
SUGCON is one of the biggest events for the Sitecore community and this year it took place a couple of days ago (April 4th and 5th) in London. This conference is the place were a lot of developers gather to gain knowledge and network with the Sitecore community from around the world. This was my first SUGCON ever and I couldn't have enjoyed it more!

In this post, I will summarize what I think were the most important aspects of the conferences I attended to:
Sitecore is giving a lot of importance to the microservices architecture. At SUGCON they talked a lot about Sitecore Host, which is basically a common platform used by some of the new Sitecore services (.NET Core 2.1 is required - which means cross platform, yes!). Sitecore Host can be used by developers to create plugins that can be installed on a Sitecore instance without having to recompile the code base. Currently, xConnect, Identity Service and Publishing services run on Sitecore Host and more services will be migrated to H…

Sitecore Guest Speaker - UDLA

Image
Back in January, I was invited to Universidad de las Américas (UDLA) to give a talk about Sitecore to Computer Science Students (for the second year in a row!):


The talk was focused on letting students know about the Sitecore Platform and how it is used around the world to build amazing web experiences for very demanding clients! It's important to keep in mind that the audience was 3rd-year students with basic knowledge of Content Management Systems, therefore, the topics covered were not very advanced. Some of the topics covered were:

LaunchpadDatabasesTemplatesItemsRenderingsPersonalizationScheduled TasksUser ManagerAccess ViewerContent EditorExperience EditorMarketplaceDeveloper Trial License The goal of these talks I intend to give twice a year (every year) is to let the young generations know what Sitecore is and its benefits. This is an ongoing effort on technically evangelizing computer science students in Ecuador so that when they graduate they can contribute and benefit fr…

How to implement recommendations using Coveo for Sitecore Hive

Image
When building marketplaces, having recommended products based on previous users' interactions is a feature that can have a tremendous impact on how people interact with a website. Having recommended products (or anything) does not only personalize the user experience but it can also improve sales massively. Coveo for Sitecore Hive (and also the legacy framework) has a built-in module that uses Machine Learning and the user history to recommend things that might be of interest to the context user.

This blog is not intended to replace the documentation Coveo has put in place on how to implement the Recommendations component (https://docs.coveo.com/en/648/coveo-for-sitecore-v4/getting-recommendations), however, it can serve as an auxiliary document to make the implementation of this module even easier.

There are several steps in the official documentation which I will explain here:

1. First, we need to set up the Coveo Page View Analytics component which will be in charge of logging t…

Richard Leiva - Sitecore MVP 2019

Image
I am very proud and honored to have been recognized as a Sitecore Most Valuable Professional in the Technology category. This past year was challenging and I am glad that my contributions to the community had an impact. I have now joined the selected and talented group of only 315 people among 12000 certified developers and 20000 active community members. The Sitecore community is undoubtedly one of the most active and engaging communities I have had the chance to work with and I am more than happy to be able to share my knowledge and experiences to help with the growth of the community.

I will make sure to keep it up with the good work and honor the MVP distinction. Full press release link: https://www.sitecore.com/company/press-and-media/press-releases/2019/01/sitecore-announces-2019-most-valuable-professionals

I am excited to see you all at SUGCON London and Symposium Orlando this year!

Export Sitecore Workflow History

Image
Because of audit purposes, exporting the workflow history might be a useful tool. In this post I will show you how we can create a custom button to export the workflow history to a csv file.

First, we need to create a button in the Core Database. We are going to use a Small Button and the path I chose to create the item at is: /sitecore/content/Applications/Content Editor/Ribbons/Chunks/Workflow/Export History (You can place the button anywhere you like, I just decided to place it in the workflow chunk as shown below):


After creating the small button, we need to fill in some information like the header, icon, click and tooltip fields:


On the click field, we define the command we are going to trigger when the button is clicked. I created a new command called item:ExportWorkflowHistory. In order to register this new command we need to create a config patch like this:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <commands&g…